Discussion:
[SoX-devel] SoX with FFMPEG
Alberto Megia
2014-01-17 13:45:57 UTC
Permalink
How can I set up SoX to work with FFMPEG?
I have asked it here with details ->
http://stackoverflow.com/questions/21187420/ffmpeg-with-sox-configure-error-cannot-find-ffmpeg
But I will copy it here:

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

So I am trying to install in my Ubuntu Desktop 12.04 SoX with FFMPEG
support for m4a files.

I have followed this
<http://trac.ffmpeg.org/wiki/UbuntuCompilationGuide>instructions to
install FFMPEG, installing only certain encoders. Finally,
this is my set up:

ffmpeg version git-2014-01-17-3ca7085 Copyright (c) 2000-2014 the
FFmpeg developers
built on Jan 17 2014 12:36:01 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=~/ffmpeg_build
--extra-cflags=-I~/ffmpeg_build/include
--extra-ldflags=-L~/ffmpeg_build/lib --bindir=~/bin --extra-libs=-ldl
--enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame
--enable-nonfree
libavutil 52. 62.100 / 52. 62.100
libavcodec 55. 48.101 / 55. 48.101
libavformat 55. 23.103 / 55. 23.103
libavdevice 55. 5.102 / 55. 5.102
libavfilter 4. 1.100 / 4. 1.100
libswscale 2. 5.101 / 2. 5.101
libswresample 0. 17.104 / 0. 17.104
libpostproc 52. 3.100 / 52. 3.100
Hyper fast Audio and Video encoder

Then, I wget SoX 14.4.1 version and try to configure with FFMPEG support
like this:

./configure --with-ffmpeg

But I get this error:

checking for FFMPEG... no
checking libavformat/avformat.h usability... no
checking libavformat/avformat.h presence... no
checking for libavformat/avformat.h... no
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
configure: error: in `~/sox-14.4.1':
configure: error: cannot find ffmpeg
See `config.log' for more details

So I try to set PKG_CONFIG_PATH environment variable:

PKG_CONFIG_PATH=~/ffmpeg_build/lib/pkgconfig
./configure --with-ffmpeg

Getting:

checking for FFMPEG... yes
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking for av_open_input_file in -lavformat... no
configure: error: in `~/sox-14.4.1':
configure: error: cannot find ffmpeg
See `config.log' for more details

Checking 'config.log' I see the following error:

| #define HAVE_LIBAVFORMAT_AVFORMAT_H 1
| /* end confdefs.h. */
|
| /* Override any GCC internal prototype to avoid an error.
| Use char because int might match the return type of a GCC
| builtin and then its argument prototype would still apply. */
| #ifdef __cplusplus
| extern "C"
| #endif
| char av_open_input_file ();
| int
| main ()
| {
| return av_open_input_file ();
| ;
| return 0;
| }
configure:15862: result: no
configure:15935: error: in `~/sox-14.4.1':
configure:15937: error: cannot find ffmpeg

What am I missing here?

Thx!
Jan Stary
2014-01-17 16:09:43 UTC
Permalink
Post by Alberto Megia
So I am trying to install in my Ubuntu Desktop 12.04 SoX
with FFMPEG support for m4a files.
You are better off using ffmpeg directly.
The "support" for ffmepg in SoX is broken.

What exactly do you need to do with those m4a files?
Post by Alberto Megia
Then, I wget SoX 14.4.1 version and try to
./configure --with-ffmpeg
I am surprised that it is still there in 14.4.1
and would like to take the opportunity to ask
the SoX developers to tear ffmpeg out completely.

Jan
Alberto Megia
2014-01-17 21:39:37 UTC
Permalink
Post by Jan Stary
Post by Alberto Megia
So I am trying to install in my Ubuntu Desktop 12.04 SoX
with FFMPEG support for m4a files.
You are better off using ffmpeg directly.
The "support" for ffmepg in SoX is broken.
What exactly do you need to do with those m4a files?
I need to merge m4a files. I was trying to use FFMPEG as a library with SoX
trying not to break LGNU license.
Is there a way I could do that with SoX?
Post by Jan Stary
Then, I wget SoX 14.4.1 version and try to
./configure --with-ffmpeg
I am surprised that it is still there in 14.4.1
and would like to take the opportunity to ask
the SoX developers to tear ffmpeg out completely.
Post by Jan Stary
Post by Alberto Megia
So I am trying to install in my Ubuntu Desktop 12.04 SoX
with FFMPEG support for m4a files.
You are better off using ffmpeg directly.
The "support" for ffmepg in SoX is broken.
What exactly do you need to do with those m4a files?
Post by Alberto Megia
Then, I wget SoX 14.4.1 version and try to
./configure --with-ffmpeg
I am surprised that it is still there in 14.4.1
and would like to take the opportunity to ask
the SoX developers to tear ffmpeg out completely.
Jan
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
SoX-devel mailing list
https://lists.sourceforge.net/lists/listinfo/sox-devel
Jan Stary
2014-01-18 07:28:09 UTC
Permalink
Post by Alberto Megia
Post by Jan Stary
Post by Alberto Megia
So I am trying to install in my Ubuntu Desktop 12.04 SoX
with FFMPEG support for m4a files.
You are better off using ffmpeg directly.
The "support" for ffmepg in SoX is broken.
What exactly do you need to do with those m4a files?
I need to merge m4a files.
Do you need the result to be an m4a file as well?
Post by Alberto Megia
I was trying to use FFMPEG as a library with SoX
trying not to break LGNU license.
Is there a way I could do that with SoX?
Convert your input files from m4a to wav using ffmpeg.
Process them in SoX (merge, whatever).
Convert the ouput to the format you need,
using either SoX or ffmpeg.
Post by Alberto Megia
Post by Jan Stary
You are better off using ffmpeg directly.
The "support" for ffmepg in SoX is broken.
Jan
Alberto Megia
2014-01-20 16:01:19 UTC
Permalink
What I want is something like:

cat file1.m4a file2.m4a ... fileN.m4a > file.m4a

But that does not work for m4a format.
Alberto Megia
2014-01-20 16:20:22 UTC
Permalink
I think I have found the solution

http://trac.ffmpeg.org/wiki/How%20to%20concatenate%20%28join,%20merge%29%20media%20files
Post by Alberto Megia
cat file1.m4a file2.m4a ... fileN.m4a > file.m4a
But that does not work for m4a format.
Loading...