PDA

View Full Version : F23: How to Get Sox Support for .mp3?



bob p
16th November 2015, 07:53 PM
I've just upgraded to F23. The process of upgrading broke .mp3 support for SoX.


/bin/rec FAIL formats: no handler for file extension `mp3'

Can anyone recommend a simple way to get it back? I seem to have lost my notes on how I did it the last time.

Thx.

bob p
16th November 2015, 08:26 PM
I'm on F23 with an X11 server that has been downgraded to F22 to enable nvidia driver support.
Tried to install sox plugins but had no luck. Ideas?


# dnf install sox-plugins-freeworld --allowerasing
Last metadata expiration check performed 2:44:55 ago on Mon Nov 16 10:27:44 2015.
Error: nothing provides libsox.so.2 needed by sox-plugins-freeworld-14.4.1-4.fc22.i686

nsnbm
16th November 2015, 11:17 PM
From: http://sox.sourceforge.net/soxformat.html


Users who require SoX with MP3 support must currently compile and build SoX with the MP3 libraries (LAME & MAD) from source code, or, in some cases, obtain pre-built dynamically loadable libraries.

In the past I installed from the compressed archive (the tarball) after installing libmad and lame and few other audio packages that slip my mind. There may be an rpm out there somewhere that you could hunt for or make yourself.

bob p
16th November 2015, 11:36 PM
I've installed SoX with MP3 support many times using package management. I've never had to compile from source. The problem is that I can't find the libraries now.

If anyone can provide a hint as to where the library might be found, or how to compile it, I'd appreciate it.

nsnbm
17th November 2015, 12:18 AM
I get a 404 message from rpmfusion.org for f23 repos at the moment, so if their repos aren't ready, that might explain the error message in post #2. Perhaps wait, or install the f22 versions which are there.

bob p
17th November 2015, 01:46 AM
What's interesting is that I've still got MP3 support in Audacity, even though it's not supported in Fedora. I think those packages might have come from the rpmfusion repos during the distro upgrade. I guess it's just the SoX packages that seem to be missing. Do you know if there is a facility for package requests/bug reports at rpmfusion? I'm willing to provide a heads-up in the event that they're not aware of the problem, but I'm not familiar with the process there.

bob p
17th November 2015, 02:34 AM
Can anyone explain how the dnf-command(repoquery) feature works?

nsnbm
17th November 2015, 02:36 AM
I guess it's just the SoX packages that seem to be missing.

Yes, I think that is likely. I have been able to dnf other packages from rpmfusion for f23 like mplayer, but not sox-plugins-freeworld. There is a bugzilla link on the front page of the rpmfusion site, but I'm more inclined to think of this problem as more a slowness in updating the repos than a bug.

nsnbm
17th November 2015, 02:55 AM
Can anyone explain how the dnf-command(repoquery) feature works?


Here are a couple of commands that I find useful:
This one lists the files in the package telnet:


dnf repoquery -l telnet

This one outputs the package from which the file comes:


dnf repoquery -f /usr/bin/cowsay

This one asks which package the "capability" comes from, or, what provides that capability:


dnf repoquery --whatprovides libldb.so.1


Other than that, the manpage is not too bad: dnf.plugin.repoquery.

bob p
17th November 2015, 03:51 AM
thanks for the examples. i'm still adapting to the new package manager.

on a related note, i tried downgrading sox using a command like this one:


dnf downgrade sox* --releasever=22 --allowerasing

Unfortunately, I'm still not able to get mp3 support out of SoX. Am I doing something blatantly wrong?

nsnbm
17th November 2015, 04:19 AM
[root@owl ~]# dnf install --releasever=22 sox-plugins-freeworld
<snip>
Error: nothing provides libsox.so.2()(64bit)
[root@owl ~]# dnf repoquery --whatprovides libsox.so.2
<no result>

On rpmfind.net, it found libsox.so.2 in fedora 21 updates: sox-14.4.1-7.fc21.i686.rpm. That is a 32 bit rpm which is found for Fedora 21 updates for x86_64. So, that file exists in f21.

DBelton
17th November 2015, 04:47 AM
The newer versions of sox-plugins-freeworld and sox-plugins-nonfree need to be recompiled to use the newer libsox.so.3 instead of libsox.so.2, and I guess rpmfusion just hasn't rebuilt the packages yet.

nsnbm
17th November 2015, 06:05 AM
Thanks for that info. It looks like libsox.so.3 is in sox-14.4.2.0-5.fc23.i686.rpm which is in Fedora 23 testing updates for i386 and Fedora 23 testing updates for x86_64. Found on rpmfind.net.

bob p
24th January 2016, 07:28 AM
i have that version of sox, but it still won't play mp3:


# dnf install sox
Last metadata expiration check performed 1:30:43 ago on Sat Jan 23 22:52:21 2016.
Package sox-14.4.2.0-5.fc23.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!

# play post-time.mp3
play FAIL formats: no handler for file extension `mp3'

Even though it looks like the proper version of sox is installed, when invoking the "play" commend the mp3 audio format is still not supported -- notice it's absence in the list of supported formats below:

# play
play: SoX v14.4.2

play FAIL sox: Not enough input filenames specified

Usage summary: [gopts] [[fopts] infile]... [fopts] [effect [effopt]]...

SPECIAL FILENAMES (infile, outfile):
- Pipe/redirect input/output (stdin/stdout); may need -t
-d, --default-device Use the default audio device (where available)
-n, --null Use the `null' file handler; e.g. with synth effect
-p, --sox-pipe Alias for `-t sox -'

SPECIAL FILENAMES (infile only):
"|program [options] ..." Pipe input from external program (where supported)
http://server/file Use the given URL as input file (where supported)

GLOBAL OPTIONS (gopts) (can be specified at any point before the first effect):
--buffer BYTES Set the size of all processing buffers (default 8192)
--clobber Don't prompt to overwrite output file (default)
--combine concatenate Concatenate all input files (default for sox, rec)
--combine sequence Sequence all input files (default for play)
-D, --no-dither Don't dither automatically
--dft-min NUM Minimum size (log2) for DFT processing (default 10)
--effects-file FILENAME File containing effects and options
-G, --guard Use temporary files to guard against clipping
-h, --help Display version number and usage information
--help-effect NAME Show usage of effect NAME, or NAME=all for all
--help-format NAME Show info on format NAME, or NAME=all for all
--i, --info Behave as soxi(1)
--input-buffer BYTES Override the input buffer size (default: as --buffer)
--no-clobber Prompt to overwrite output file
-m, --combine mix Mix multiple input files (instead of concatenating)
--combine mix-power Mix to equal power (instead of concatenating)
-M, --combine merge Merge multiple input files (instead of concatenating)
--multi-threaded Enable parallel effects channels processing
--norm Guard (see --guard) & normalise
--play-rate-arg ARG Default `rate' argument for auto-resample with `play'
--plot gnuplot|octave Generate script to plot response of filter effect
-q, --no-show-progress Run in quiet mode; opposite of -S
--replay-gain track|album|off Default: off (sox, rec), track (play)
-R Use default random numbers (same on each run of SoX)
-S, --show-progress Display progress while processing audio data
--single-threaded Disable parallel effects channels processing
--temp DIRECTORY Specify the directory to use for temporary files
-T, --combine multiply Multiply samples of corresponding channels from all
input files (instead of concatenating)
--version Display version number of SoX and exit
-V[LEVEL] Increment or set verbosity level (default 2); levels:
1: failure messages
2: warnings
3: details of processing
4-6: increasing levels of debug messages
FORMAT OPTIONS (fopts):
Input file format options need only be supplied for files that are headerless.
Output files will have the same format as the input file where possible and not
overridden by any of various means including providing output format options.

-v|--volume FACTOR Input file volume adjustment factor (real number)
--ignore-length Ignore input file length given in header; read to EOF
-t|--type FILETYPE File type of audio
-e|--encoding ENCODING Set encoding (ENCODING may be one of signed-integer,
unsigned-integer, floating-point, mu-law, a-law,
ima-adpcm, ms-adpcm, gsm-full-rate)
-b|--bits BITS Encoded sample size in bits
-N|--reverse-nibbles Encoded nibble-order
-X|--reverse-bits Encoded bit-order
--endian little|big|swap Encoded byte-order; swap means opposite to default
-L/-B/-x Short options for the above
-c|--channels CHANNELS Number of channels of audio data; e.g. 2 = stereo
-r|--rate RATE Sample rate of audio
-C|--compression FACTOR Compression factor for output format
--add-comment TEXT Append output file comment
--comment TEXT Specify comment text for the output file
--comment-file FILENAME File containing comment text for the output file
--no-glob Don't `glob' wildcard match the following filename

AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb au avr caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lu mat mat4 mat5 maud nist ogg opus paf prc pvf raw s1 s16 s2 s24 s3 s32 s4 s8 sb sd2 sds sf sl sln smp snd sndfile sndr sndt sou sox sph sw txw u1 u16 u2 u24 u3 u32 u4 u8 ub ul uw vms voc vorbis vox w64 wav wavpcm wv wve xa xi
PLAYLIST FORMATS: m3u pls
...


any ideas?

nsnbm
24th January 2016, 09:51 AM
Do you also have sox-plugins-freeworld and sox-plugins-nonfree installed? They are at rpmfusion.org, updates-testing, free and nonfree.



Name : sox-plugins-freeworld
Arch : x86_64
Epoch : 0
Version : 14.4.2
Release : 1.fc23
Size : 54 k
Repo : rpmfusion-free-updates-testing
Summary : A general purpose sound file conversion tool
URL : http://sox.sourceforge.net/
License : GPLv2+ and LGPLv2+ and MIT
Description : SoX (Sound eXchange) is a sound file format converter SoX can convert
: between many different digitized sound formats and perform simple
: sound manipulation functions, including sound effects.
:
:
: This package provides the plugin for MPEG-2 audio layer 3 audio (MP3) support.

bob p
25th January 2016, 08:12 PM
that fixed it. thank you!