FFMpeg native aac decoder
Hi I am having some difficulty decoding audio from an IP camera, the RTSP negotiation for audio is such: v=0 o=- 1266870982069588 1266870982069588 IN IP4 10.11.11.189 s=Media Presentation e=NONE c=IN IP4 0.0.0.0 b=AS:50016 t=0 0 a=control:* a=range:npt=0.000000- m=video 0 RTP/AVP 96 b=AS:50000 a=framerate:10.0 a=control:trackID=1 a=rtpmap:96 H264/90000 a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeKQFAe2AtwEBAaQeJEV,aM48gA== m=audio 0 RTP/AVP 97 b=AS:16 a=control:trackID=2 a=rtpmap:97 mpeg4-generic/16000/1 a=fmtp:97 profile-level-id=15; mode=AAC-hbr;config=1408; SizeLength=13; IndexLength=3;IndexDeltaLength=3; Profile=1; bitrate=16000; in a previous discussion, it has been pointed out that config=1408 corresponds to Low Complexity Sampling Frequency, 16000 Hz, 1 channel So this should be supported by the native aac decoder. I also was unable to transcode the following aac file to vorbis ogg http://www.nch.com.au/acm/sample.aac I am using SVN-r19905
Hi, Vogel Ubrhar wrote:
I also was unable to transcode the following aac file to vorbis ogg
FFmpeg works fine for me with that sample in SVN-r21974. What commandline are you using that fails and how does it fail? -Justin
On Wed, Feb 24, 2010 at 3:58 PM, Justin Ruggles <justin.ruggles at gmail.com>wrote:
Hi,
Vogel Ubrhar wrote:
I also was unable to transcode the following aac file to vorbis ogg
FFmpeg works fine for me with that sample in SVN-r21974. What commandline are you using that fails and how does it fail?
-Justin
Hi Justin, I just upgraded to git-svn-r22041 and the problem persists: $ ffmpeg -i sample.aac -acodec vorbis -aq 60 sample.ogg FFmpeg version git-svn-r22041, Copyright (c) 2000-2010 the FFmpeg developers built on Feb 24 2010 15:15:08 with gcc 4.4.1 configuration: --enable-vdpau --enable-shared --disable-static libavutil 50. 9. 0 / 50. 9. 0 libavcodec 52.55. 0 / 52.55. 0 libavformat 52.54. 0 / 52.54. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 [aac @ 0xf5d3c0]Estimating duration from bitrate, this may be inaccurate Input #0, aac, from 'sample.aac': Duration: 00:01:12.37, bitrate: 0 kb/s Stream #0.0: Audio: aac, 8000 Hz, 1 channels, s16, 0 kb/s [vorbis @ 0xf84250]Current FFmpeg Vorbis encoder only supports 2 channels. Output #0, ogg, to 'sample.ogg': Stream #0.0: Audio: vorbis, 8000 Hz, 1 channels, s16, 64 kb/s Stream mapping: Stream #0.0 -> #0.0 Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height
Vogel Ubrhar wrote:
On Wed, Feb 24, 2010 at 3:58 PM, Justin Ruggles <justin.ruggles at gmail.com>wrote:
Hi,
Vogel Ubrhar wrote:
I also was unable to transcode the following aac file to vorbis ogg
http://www.nch.com.au/acm/sample.aac FFmpeg works fine for me with that sample in SVN-r21974. What commandline are you using that fails and how does it fail?
-Justin
Hi Justin, I just upgraded to git-svn-r22041 and the problem persists:
$ ffmpeg -i sample.aac -acodec vorbis -aq 60 sample.ogg
FFmpeg version git-svn-r22041, Copyright (c) 2000-2010 the FFmpeg developers built on Feb 24 2010 15:15:08 with gcc 4.4.1 configuration: --enable-vdpau --enable-shared --disable-static libavutil 50. 9. 0 / 50. 9. 0 libavcodec 52.55. 0 / 52.55. 0 libavformat 52.54. 0 / 52.54. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0.10. 0 / 0.10. 0 [aac @ 0xf5d3c0]Estimating duration from bitrate, this may be inaccurate Input #0, aac, from 'sample.aac': Duration: 00:01:12.37, bitrate: 0 kb/s Stream #0.0: Audio: aac, 8000 Hz, 1 channels, s16, 0 kb/s [vorbis @ 0xf84250]Current FFmpeg Vorbis encoder only supports 2 channels.
That's your problem. FFmpeg's native Vorbis encoder doesn't support mono. It's not the AAC sample. I would recommend using -acodec libvorbis instead. If you really want to use the native encoder, maybe adding -ac 2 would work to convert it to stereo. -Justin
bitrate, this may be inaccurate
Input #0, aac, from 'sample.aac': Duration: 00:01:12.37, bitrate: 0 kb/s Stream #0.0: Audio: aac, 8000 Hz, 1 channels, s16, 0 kb/s [vorbis @ 0xf84250]Current FFmpeg Vorbis encoder only supports 2 channels.
That's your problem. FFmpeg's native Vorbis encoder doesn't support mono. It's not the AAC sample. I would recommend using -acodec libvorbis instead. If you really want to use the native encoder, maybe adding -ac 2 would work to convert it to stereo.
-Justin
Yes you are right. I used another codec to compress to and it worked Thanks
Thanks for this post. I believe I had the same issue so I am trying to use the libvorbis as recommended. I may be in over my head, but here is what I am doing. First, I am trying to download the libvorbis supporting library via apt-get install, which cannot find libvorbis, so I went to pkgs.org and found out that I needed to get the libvorbis0a, which it said I already had the latest version. I also went to http://packages.debian.org/source/squeeze/libvorbis and made sure I had all the packages it mentions installed, libvorbis-dbg, libvorbis-dev, libvorbis0a, libvorbisenc2, libvorbisfile3 Second, I have tried to enable the decoder/encoder and compile a new ffmpeg with these command sudo ./configure --list-decoders|grep orbis sudo ./configure --enable-encoder=libvorbis --enable-decoder=libvorbis sudo make sudo make install I then try to run the ffmpeg command get this output: ---- ffmpeg -i audio.wav -acodec libvorbis -aq 60 audio.ogg ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 23 2012 08:28:17 with gcc 4.4.5 configuration: --enable-encoder=libvorbis --enable-decoder=libvorbis WARNING: library configuration mismatch avutil configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libaacplus --enable-libx264 avcodec configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libaacplus --enable-libx264 avformat configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libaacplus --enable-libx264 avdevice configuration: --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-shared --enable-nonfree --enable-gpl avfilter configuration: --enable-static --enable-shared --enable-gpl --enable-nonfree --enable-libmp3lame --enable-libaacplus --enable-libx264 swscale configuration: --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-shared --enable-nonfree --enable-gpl swresample configuration: --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-shared --enable-nonfree --enable-gpl libavutil 51. 54.100 / 51. 60.100 libavcodec 54. 23.100 / 54. 29.100 libavformat 54. 6.100 / 54. 11.100 libavdevice 54. 0.100 / 54. 0.100 libavfilter 2. 77.100 / 2. 82.100 libswscale 2. 1.100 / 2. 1.100 libswresample 0. 15.100 / 0. 15.100 [wav @ 0x99a53c0] max_analyze_duration 5000000 reached at 5015510 Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from 'audio.wav': Duration: 00:03:24.49, bitrate: 705 kb/s Stream #0:0: Audio: pcm_s32le ([1][0][0][0] / 0x0001), 22050 Hz, mono, s32, 705 kb/s Unknown encoder 'libvorbis' ---- Do I need a different command-line option? Or maybe I haven't compiled the ffmpeg correctly? Thanks for any insights. -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/FFMpeg-native-aac-decoder-tp1568222... Sent from the FFmpeg-users mailing list archive at Nabble.com.
linuxford <fordgwf <at> gmail.com> writes:
sudo ./configure --enable-encoder=libvorbis --enable-decoder=libvorbis
$ ./configure --enable-libvorbis I suspect using sudo for configure and build is a bad idea. Please do not revive year-old threads, that is also not a bad idea. Carl Eugen
Okay. Sorry about that. I re-downloaded one revision back and did the following and it worked (not sure why I had problems, maybe I messed up my newer one or it had bugs?). # download source code ffmpeg “freedom” tarball #http://ffmpeg.org/download.html #unpack tarball bzip2 -d ffmpeg-0.10.4.tar.bz2 tar -xvf ffmpeg-0.10.4.tar cd ffmpeg-0.10.4 sudo ./configure --enable-libfaac --enable-nonfree --enable-libmp3lame --enable-libvorbis --enable-encoder=libvorbis --enable-decoder=libvorbis --enable-decoder=pcm_s32le --enable-encoder=pcm_s32le sudo make sudo make install #now convert music ffmpeg -i audio.wav -acodec libvorbis -aq 60 audio.ogg -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/FFMpeg-native-aac-decoder-tp1568222... Sent from the FFmpeg-users mailing list archive at Nabble.com.
#now convert music ffmpeg -i audio.wav -acodec libvorbis -aq 60 audio.ogg
Hi This isn't right, -aq 60 is no good. For libvorbis the -aq value needs to be a number in range -1 to 10. Look at the list here ---> http://en.wikipedia.org/wiki/Vorbis#Technical_details
bat guano wrote
#now convert music ffmpeg -i audio.wav -acodec libvorbis -aq 60 audio.ogg
Hi This isn't right, -aq 60 is no good.
For libvorbis the -aq value needs to be a number in range -1 to 10.
Look at the list here ---> http://en.wikipedia.org/wiki/Vorbis#Technical_details
_______________________________________________ ffmpeg-user mailing list ffmpeg-user@ http://ffmpeg.org/mailman/listinfo/ffmpeg-user
Thank you for the link. I got so much to learn, but this is a really excellent forum, and ffmpeg is powerful. -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/FFMpeg-native-aac-decoder-tp1568222... Sent from the FFmpeg-users mailing list archive at Nabble.com.
participants (5)
-
bat guano -
Carl Eugen Hoyos -
justin.ruggles@gmail.com -
linuxford -
vubrhar@gmail.com