Re: [PLUG] Converting audio files

2017-12-03 Thread Tomas Kuchta
mp3 patents expired earlier this year, if I am not mistaken and it wasn't
in 2016 already.

So at this point, it does not matter other than on technical merit such as
encoder efficiency, perceived quality, etc.

Tomas

On Dec 3, 2017 11:21 AM, "Galen Seitz"  wrote:

> On 12/03/17 10:54, Rich Shepard wrote:
> > On Sun, 3 Dec 2017, Galen Seitz wrote:
> >
> >> Why do you want to convert these files to mp3?
> >
> > Galen,
> >
> >   Because the .wav file (1032704 bytes) is much larger than the .mp3 file
> > (391488 bytes).
> >
> >> What is your goal? Do you really need mp3? If not, you should be able to
> >> convert the files to any one of a number of other formats. sox would
> >> be my
> >> first choice for this.
> >
> >   There are other audio formats supported by audio players on linux yet
> > .mp3
> > seems to be the most common. I've no preference for any one of them.
>
> mp3 is patent encumbered.  That's probably why your sox doesn't include
> it by default.  If the files are for your own use, I suggest converting
> them to ogg vorbis or to ogg opus.  opus is the latest and greatest open
> codec, so your sox might not support it.  It certainly should support
> the vorbis codec.
>
> If you can't make it work, email me a small example wave file.  I should
> be able to make it work.
>
>
> galen
> --
> Galen Seitz
> gal...@seitzassoc.com
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread King Beowulf
On 12/03/2017 11:55 AM, Rich Shepard wrote:
> On Sun, 3 Dec 2017, Rich Shepard wrote:
> 
>> Audacity translated the file from .wav to .mp3. I'll look to see if it
>> supports the ogg flavors (I suspect so). If not, ffmpeg will do the job.
> 
>   Yes, audacity-2.1.3 exports to ogg vorbis.
> 
> Rich

mp3 patent expired in May 2017.  Lame and ffmpeg are now part of
Slackware-current (15.0 "real soon now").

ogg vorbis is OK, but for audio fidelity I prefer FLAC, lossless
compression, unless I need to save space.  Every linux distro on the
planet and elsewhere can encode/decode flac.  A few portable players
have been adding it as well.
TIP: iOS 11 added FLAC support.  Most Android devices as well since 3.1.

mp3 vs ogg: Compression rates are about the same.  mp3 provides superior
audio at higher bitrate (>128 kbps) and when using VBR encoding.

opus/speex are good for VOIP applications, not so much for archival needs.

audacity is my "go-to' for odd formats when I can't seem to figure out
what WAV file a stupid cheap device generates.

-Ed

PS:
BTW, you may have noticed this earlier, but ffmpeg has a complex command
line, and your earlier ffmpeg post was in error.

ffmpg  -i   

e.g.
https://trac.ffmpeg.org/wiki/Encode/MP3

The ffmpg an page can be hard to follow.  the wiki has lots of good
explanations and examples.  Note that to support all formats ffmpeg can
handle, appropriate adjustments to the buildscript are needed along with
install a whole heck of a lot of codecs.




signature.asc
Description: OpenPGP digital signature
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sun, 3 Dec 2017, Rich Shepard wrote:


Audacity translated the file from .wav to .mp3. I'll look to see if it
supports the ogg flavors (I suspect so). If not, ffmpeg will do the job.


  Yes, audacity-2.1.3 exports to ogg vorbis.

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sun, 3 Dec 2017, Galen Seitz wrote:


mp3 is patent encumbered.


Galen,

  Oh. That makes a difference.


If the files are for your own use, I suggest converting them to ogg vorbis
or to ogg opus. opus is the latest and greatest open codec, so your sox
might not support it. It certainly should support the vorbis codec.


  I opt for ogg opus. I'll write a script to convert all .mp3 to .ogg.


If you can't make it work, email me a small example wave file. I should be
able to make it work.


  Audacity translated the file from .wav to .mp3. I'll look to see if it
supports the ogg flavors (I suspect so). If not, ffmpeg will do the job.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sun, 3 Dec 2017, Galen Seitz wrote:


Why do you want to convert these files to mp3?


Galen,

  Because the .wav file (1032704 bytes) is much larger than the .mp3 file
(391488 bytes).


What is your goal? Do you really need mp3? If not, you should be able to
convert the files to any one of a number of other formats. sox would be my
first choice for this.


  There are other audio formats supported by audio players on linux yet .mp3
seems to be the most common. I've no preference for any one of them.


Looks like format 0x0011 is Intel IMA/DVI ADPCM.


  Thank you. My search for that format did not find this.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Galen Seitz
On 12/03/17 05:58, Rich Shepard wrote:
> On Sat, 2 Dec 2017, King Beowulf wrote:
> 
>> The "wav" files can be in a number of formats, not just straight
>> uncompressed MS Windows audio PCM. You may want to search what format the
>> device uses for storage and/or compression, perhaps amr, awb, 3gp,
>> wavpack, or some other format. codecs exist for these on Slackbuilds.org,
>> or via gst-plugins-{bad,ugly}. Wavpack is included in Slackware.
> 
> Ed,
> 
>   Other than playing downloaded .mp3 files I've not done anything with
> audio
> before now. I've no idea what format this Chinese (brand name Yemenren)
> device uses but lame tells me it's "Unsupported data format: 0x0011".

I haven't been following this thread closely, so I might have missed
this.  Why do you want to convert these files to mp3?  What is your
goal?  Do you really need mp3?  If not, you should be able to convert
the files to any one of a number of other formats.  sox would be my
first choice for this.

Looks like format 0x0011 is Intel IMA/DVI ADPCM.

galen
-- 
Galen Seitz
gal...@seitzassoc.com
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Michael Barnes
Don't know if it is relevant, and don't have time to look it up right now,
but my feeble memory just recalled using mpeg321 or mpeg123 or something
like that in processing mp3 files.

Might help, might not. Just throwing it out.

Michael


On Dec 3, 2017 06:03, "Rich Shepard"  wrote:

> On Sat, 2 Dec 2017, Tomas Kuchta wrote:
>
> The only way to workaround with your fstab way would be to do all below:
>> a) mount your USB disk to other place than media, so it is not of the way
>> for normal hotplug schemes
>>
>
>   Nothing's mounted on /media other than links to /mnt/.
>
> Thanks,
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sat, 2 Dec 2017, Tomas Kuchta wrote:


The only way to workaround with your fstab way would be to do all below:
a) mount your USB disk to other place than media, so it is not of the way
for normal hotplug schemes


  Nothing's mounted on /media other than links to /mnt/.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sat, 2 Dec 2017, King Beowulf wrote:


The "wav" files can be in a number of formats, not just straight
uncompressed MS Windows audio PCM. You may want to search what format the
device uses for storage and/or compression, perhaps amr, awb, 3gp,
wavpack, or some other format. codecs exist for these on Slackbuilds.org,
or via gst-plugins-{bad,ugly}. Wavpack is included in Slackware.


Ed,

  Other than playing downloaded .mp3 files I've not done anything with audio
before now. I've no idea what format this Chinese (brand name Yemenren)
device uses but lame tells me it's "Unsupported data format: 0x0011".


sox-14.4.2 is include with the full Slackware-14.2 installation.


  Huh! I didn't look, just went to SBo where I found soxr which does not
have built-in support for .mp2 or .mp3.


On http://sox.sourceforge.net/Docs/Features mp2/mp3 is supported if you
install twolame and lame from Slackbuilds.org (libmad is already part of
Slackware). Not every lib needs to be compiled into sox to work but can be
supported as a run time dependency. For example, installing ffmpeg allows
sox to handle MP4, AAC, AC3, WAVPACK, AMR-NB, AVI, WMV, Ogg Theora, and
MPEG video files


  Both lame and ffmpeg are installed here; twolame (isn't that the name of a
university in New Orleans?) is not.


you can also use lame or ffmpeg to convert wav to mp3 directly.


  Not as installed here:

$ ffmpeg sr-500.wav roaster.mp3
ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib 
--docdir=/usr/doc/ffmpeg-3.2.4/html --mandir=/usr/man --disable-debug 
--enable-shared --disable-static --enable-gpl --enable-version3 
--enable-avresample --arch=i486 --enable-libfontconfig --enable-libfreetype 
--enable-libfribidi --enable-gnutls --enable-libcaca --enable-libcdio 
--enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvorbis 
--enable-libvpx --enable-opengl --enable-libopenjpeg --enable-libpulse 
--enable-libsmbclient --enable-libwavpack --enable-x11grab
  libavutil  55. 34.101 / 55. 34.101
  libavcodec 57. 64.101 / 57. 64.101
  libavformat57. 56.101 / 57. 56.101
  libavdevice57.  1.100 / 57.  1.100
  libavfilter 6. 65.100 /  6. 65.100
  libavresample   3.  1.  0 /  3.  1.  0
  libswscale  4.  2.100 /  4.  2.100
  libswresample   2.  3.100 /  2.  3.100
  libpostproc54.  1.100 / 54.  1.100
Output #0, wav, to 'sr-500.wav':
Output file #0 does not contain any stream


Also, audacity (slackbuilds.org) may be of help in importing those wav
files as it understands many wav format variants.



xmms (GUI)


  Doesn't like the .wav file from this recorder.


mplayer (CLI, GUI)


  Neither did this.

Many thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-03 Thread Rich Shepard

On Sat, 2 Dec 2017, Tomas Kuchta wrote:


lame
ffmpeg


Tomas,

  lame requires another library (faad2) and both are installed. There
apparently is an expected format that is not what the recorder provides. The
script I tried is:

#!/bin/sh
# name of this script: wav2mp3.sh
# wav to mp3

for i in *.wav; do
 if [ -e "$i" ]; then
   file=`basename "$i" .wav`
   lame -h -b 192 "$i" "$file.mp3"
 fi
done

  When I run the script with the .wav file's name I get this output:

Unsupported data format: 0x0011

  Knowing nothing about audio formats I looked on the Web and found sox.
Apparently did not use it properly. Audacity does the trick and ffmpeg is
installed although I've not used it before.


Should both work from command line given input.wav output.mp3 with optional
compression options.


  Not knowing what compression options would be appropriate there were none
on the script's command line and that might well be why it failed.


ffmpeg in particular is the real "Swiss army knife" type of a tool.


  I'll read the man page.

Thanks,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-02 Thread Tomas Kuchta
I wanted to post separately on your continued external disk troubles.

Unless you leave external USB resource management to standard hotplug you
will continue to have these kind of issues and conflicts.

The only way to workaround with your fstab way would be to do all below:
a) mount your USB disk to other place than media, so it is not of the way
for normal hotplug schemes
b) use uuid instead of /dev/... in fstab. That way it is guaranteed to
mount only the right disk/partition to the mount dir from a)

Good luck,
Tomas

On Dec 2, 2017 3:11 PM, "Rich Shepard"  wrote:

>   I bought a small digital voice recorder which saves files in .wav format.
> I found a script to convert from .wav to .mp3, but this device apparently
> has a non-standard format (0x0011).
>
>   Another web search found Sound eXchanger (SoX) which will not only change
> wav formats but convert among many different types. Unfortunately, the
> build
> script available at SlackBuilds.org does not compile with mp2 and mp3
> support (I've written the maintainer about this). But, ...
>
>   Until I get sox working to convert from .wav to .mp3 another search
> taught
> me that the 'play' capability within sox produces sounds from .wav files on
> linux. This is an interim solution. Are there other audio format converters
> that I might try on these files?
>
>   On a related issue, /var/log/messages shows that the recorder is seen as
> the SCSI disk /dev/sdb. I have an entry in /etc/fstab for my 3T external
> hard drive (ext3 file system) which the kernel sees as /dev/sdb assigned to
> /mnt/hd/. Root can mount the vfat file system recorder on /mnt/hd/; can two
> devices (with different file systems) be listed in /etc/fstab to be mounted
> on the same mount point?
>
> Rich
> ___
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files

2017-12-02 Thread Tomas Kuchta
lame
ffmpeg

Should both work from command line given input.wav output.mp3 with optional
compression options.

ffmpeg in particular is the real "Swiss army knife" type of a tool.

-Tomas


On Dec 2, 2017 3:48 PM, "Dale Snell"  wrote:

On Sat, 2 Dec 2017 15:11:45 -0800 (PST), in message
alpine.lnx.2.20.1712021502330.21...@salmo.appl-ecosys.com, Rich Shepard
wrote:

>I bought a small digital voice recorder which saves files in .wav
> format. I found a script to convert from .wav to .mp3, but this
> device apparently has a non-standard format (0x0011).
>
>Another web search found Sound eXchanger (SoX) which will not only
> change wav formats but convert among many different types.
> Unfortunately, the build script available at SlackBuilds.org does not
> compile with mp2 and mp3 support (I've written the maintainer about
> this). But, ...
>
>Until I get sox working to convert from .wav to .mp3 another
> search taught me that the 'play' capability within sox produces
> sounds from .wav files on linux. This is an interim solution. Are
> there other audio format converters that I might try on these files?

Audacity has always worked well for me when it comes to converting
sound files.  FFMPEG is pretty good at conversions, too.

>On a related issue, /var/log/messages shows that the recorder is
> seen as the SCSI disk /dev/sdb. I have an entry in /etc/fstab for my
> 3T external hard drive (ext3 file system) which the kernel sees
> as /dev/sdb assigned to /mnt/hd/. Root can mount the vfat file system
> recorder on /mnt/hd/; can two devices (with different file systems)
> be listed in /etc/fstab to be mounted on the same mount point?

Give your 3TB hard drive a label, and use that label in fstab to
reference the drive when mounting it.  Or you could use a UUID,
but those are much longer to type.  :-)  The kernel assigns drive
locations on a first-come first-served basis, so using a label of
some sort is much more reliable than a drive location.

Hope this helps.

--Dale

--
Imagine if every Thursday your shoes exploded if you tied them the
usual way.  This happens to us all the time with computers, and
nobody thinks of complaining.-- Jeff Raskin
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug


Re: [PLUG] Converting audio files [RESOLVED]

2017-12-02 Thread Rich Shepard

On Sat, 2 Dec 2017, Dale Snell wrote:


Audacity has always worked well for me when it comes to converting
sound files.  FFMPEG is pretty good at conversions, too.


Dale,

  Thanks. Dick Steffens suggested that and after upgrading audacity to the
latest version I found that it does do a good job of converting.


Give your 3TB hard drive a label, and use that label in fstab to reference
the drive when mounting it.


  Ah, of course. I'll read how to do this and make it happen.

Regards,

Rich
___
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug