How to compile SoX with m4a support.

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

How to compile SoX with m4a support.

bat guano

Hi
I'm using SoX with Ubuntu 11.04 Natty.

Please can you explain how to compile SoX from git so that it will handle m4a files.
Perhaps it needs to have FFmpeg used in "Optional file formats".
Is there some config option needed?

When I use this command:-
git pull && autoreconf -i && ./configure

I can see that during config it says:-
checking for FFMPEG... yes

But after config it says:-
OPTIONAL FILE FORMATS
ffmpeg.....................no

After make it shows all these formats, but no mention of ffmpeg or m4a.

AUDIO FILE FORMATS: 8svx aif aifc aiff aiffc al amb amr-nb amr-wb anb au avr awb caf cdda cdr cvs cvsd cvu dat dvms f32 f4 f64 f8 fap flac fssd gsm gsrt hcom htk ima ircam la lpc lpc10 lu mat mat4 mat5 maud mp2 mp3 nist ogg 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

The config output is here ---> http://pastebin.com/DHqCYweb
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

Jan Stary
On Apr 19 17:47:11, bat guano wrote:
> Please can you explain how to compile SoX from git so that it will handle m4a files.
> Perhaps it needs to have FFmpeg used in "Optional file formats".
> Is there some config option needed?
>
> When I use this command:-
> git pull && autoreconf -i && ./configure

./configure --help | less


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

Ulrich Klauer-2
In reply to this post by bat guano
[hidden email]:

> I can see that during config it says:-
> checking for FFMPEG... yes

It also says a few lines below (libavformat is a part of ffmpeg):

> checking for av_open_input_file in -lavformat... no

So there seems to be some kind of version mismatch.

Ulrich

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

bat guano



----------------------------------------

>
> So there seems to be some kind of version mismatch.
>
Thanks Ulrich
My FFmpeg is from git


Is this why there's a mismatch?
What can I do about it?

ffmpeg version N-39951-g601d072 Copyright (c) 2000-2012 the FFmpeg developers
built on Apr 18 2012 20:15:09 with gcc 4.5.2
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

bat guano



----------------------------------------

>
> ffmpeg version N-39951-g601d072 Copyright (c) 2000-2012 the FFmpeg developers
> built on Apr 18 2012 20:15:09 with gcc 4.5.2
>

Maybe more information is needed about git-FFmpeg.
Here ---

ffmpeg version N-39951-g601d072 Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr 18 2012 20:15:09 with gcc 4.5.2
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --disable-encoder=vorbis --enable-libvo-amrwbenc --enable-libvo-aacenc --enable-libspeex --enable-libaacplus
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 70.100 /  2. 70.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 11.100 /  0. 11.100
  libpostproc    52.  0.100 / 52.  0.100
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

bat guano




>
Hello again.
I've (temporarily) un-installed the git FFmpeg.
And (temporarily) installed old FFmpeg from Ubuntu repository.
This one:-
FFmpeg version 0.6.4-4:0.6.4-0ubuntu0.11.04.1, Copyright (c) 2000-2010 the Libav developers
  built on Jan  4 2012 16:09:40 with gcc 4.5.2
...
libavutil     50.15. 1 / 50.15. 1
  libavcodec    52.72. 2 / 52.72. 2
  libavformat   52.64. 2 / 52.64. 2
  libavdevice   52. 2. 0 / 52. 2. 0
  libavfilter    1.19. 0 /  1.19. 0
  libswscale     0.11. 0 /  0.11. 0
  libpostproc   51. 2. 0 / 51. 2. 0


And now when I run SoX config...
it says
checking for av_open_input_file in -lavformat... yes
and
OPTIONAL FILE FORMATS
ffmpeg.....................yes

The config output is here ---> http://pastebin.com/efhTEDmV
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

Doug Cook-2
Unfortunately, the ffmpeg library is not very easy for a project like
sox to link against. To do a simple thing like decode or encode an
audio file, you have to link against several different ffmpeg
libraries and pull in a whole bunch of headers. You then have to do
complicated work within sox to understand the results returned by
ffmpeg, and it is easy to make mistakes since the results returned by
ffmpeg are not simple. And all of the above changes with each new
version of ffmpeg. To make a long story short, keeping sox working
with native ffmpeg is almost impossible, and this has led to a
distinct lack of enthusiasm for keeping sox's ffmpeg support
up-to-date. Even if you get it to compile and link, there are several
bugs that will probably cause you confusion. (libsox is also guilty of
some of the above flaws, and I'm working to eliminate them bit by
bit.)

On the other hand, the ffmpeg program does work quite well with sox.
Use the ffmpeg program to decode the input, and have ffmpeg pipe the
output in "sox" format to the sox program.

ffmpeg -i inputfilename -f sox - | sox -p outputfilename

Or have sox decode and have sox pipe its output in "sox" format to
ffmpeg to have ffmpeg encode.

sox inputfilename -p | ffmpeg -f sox -i - outputfilename

This pretty much works perfectly for me, and avoids the need to keep
sox and ffmpeg in perfect sync. I think in most cases it even runs
more quickly than the built-in ffmpeg does since the separate ffmpeg
and sox processes can pipeline to take advantage of multiple cores.

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

bat guano



----------------------------------------
To make a long story short, keeping sox working
> with native ffmpeg is almost impossible, and this has led to a
> distinct lack of enthusiasm for keeping sox's ffmpeg support
> up-to-date...

Hi

Thanks for your reply.

I understand the difficulties linking against git-FFmpeg...
It's a moving target, lol.

The methods you suggested using FFmpeg and SoX (and vice versa) with a pipe look OK.
 ;-)
     
------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

Jan Stary
In reply to this post by Doug Cook-2
On Apr 19 18:27:58, Doug Cook wrote:
> Unfortunately, the ffmpeg library is not very easy for a project like
> sox to link against. To do a simple thing like decode or encode an
> audio file, you have to link against several different ffmpeg
> libraries and pull in a whole bunch of headers. You then have to do
> complicated work within sox to understand the results returned by
> ffmpeg, and it is easy to make mistakes since the results returned by
> ffmpeg are not simple. And all of the above changes with each new
> version of ffmpeg.

Please kick ffmpeg out.

All it does in sox now is decode certain file formats
(if it doesn't crash immediately), which is more
straightforwardly done in ffmpeg(1) itself anyway,
possibly piped as you suggested.


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users
Reply | Threaded
Open this post in threaded view
|

Re: How to compile SoX with m4a support.

Pascal Giard
On Fri, Apr 20, 2012 at 2:03 AM, Jan Stary <[hidden email]> wrote:
> Please kick ffmpeg out.
>
> All it does in sox now is decode certain file formats
> (if it doesn't crash immediately), which is more
> straightforwardly done in ffmpeg(1) itself anyway,
> possibly piped as you suggested.

While doing some work on SoX for Debian tonight, that subject came back to me.
It's not the first time this comes around and as Jan, I don't see
current ffmpeg "support" as being worth the trouble/confusion.
As far as I know, in the current state of affairs the ffmpeg "support"
within SoX brings more bad than good e.g. a user expects it to work
while most of the time (if not always), it does not.

Mostly for that reason, I'm considering dropping ffmpeg in the future
Debian packages of SoX unless some dramatic changes occur.
I think it'd be in the best user interest to be informed about
ffmpeg's sox format instead.

Cheers,

-Pascal
--
Homepage (http://organact.mine.nu)
Debian GNU/Linux (http://www.debian.org)
COMunité/LACIME: École de technologie supérieure (http://www.comunite.ca)
Integrated Microsystems Laboratory: McGill (http://www.iml.ece.mcgill.ca)

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Sox-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/sox-users