[FFmpeg-devel] help --- RTP AAC packetizer problem
Luca Abeni
lucabe72
Mon Mar 3 11:08:42 CET 2008
Hi Manas,
Manas Bhattacharya wrote:
> Hi
> i was trying to stream AAC audio to rtp from the ffmpeg version 11870 but
> neither Quicktime nor ffplay was able to play the stream .
[...]
> ffmpeg -re -i sample.mpeg -acodec libfaac -ac 2 -vn -f rtp
> rtp://localhost:8090
> FFmpeg version SVN-r11870, Copyright (c) 2000-2008 Fabrice Bellard, et al.
> configuration: --enable-libfaac --enable-pthreads --enable-memalign_hack
> libavutil version: 49.6.0
> libavcodec version: 51.50.0
> libavformat version: 52.7.0
> libavdevice version: 52.0.0
> built on Feb 28 2008 18:38:48, gcc: 3.4.4 (cygming special, gdc 0.12,
> using dm
> d 0.125)
> Input #0, mpeg, from 'sample.mpeg':
> Duration: 00:03:04.9, start: 0.661544, bitrate: 703 kb/s
> Stream #0.0[0x1e0]: Video: mpeg1video, yuv420p, 320x240 [PAR 200:219 DAR
> 800
> :657], 500 kb/s, 29.97 tb(r)
> Stream #0.1[0x1c0]: Audio: mp2, 44100 Hz, stereo, 192 kb/s
> Output #0, rtp, to 'rtp://localhost:8090':
> Stream #0.0: Audio: libfaac, 44100 Hz, stereo, 64 kb/s
> Stream mapping:
> Stream #0.1 -> #0.0
> [libfaac @ 0x75a530]AAC with no global headers is currently not supported
As the message suggest, the SDP generator currently needs global headers to
generate a valid SDP description. If you add "-flags +global_header" to your
command line, a correct SDP will be generated, and you will be able to
receive the stream (I could not test QT player, but both VLC and ffplay are
happy).
Patches for fixing this issue are welcome (basically, the code for generating
AAC config information is missing).
Note that the problem is not in the RTP packetizer, but in the SDP
generator; so, once you generated a correct SDP you can remove
"-flags +global_header" if you want.
One more warning: "-re" does not seem to work correctly if "-vn"
is specified (again, patches or investigation of this issue are
welcome). The command line which works for me is:
./ffmpeg -re -i test.mpg -vcodec mpeg2video -an -f rtp rtp://127.0.0.1:10000 -vn -ac 2 -ar 44100 -flags +global_header -acodec libfaac -f rtp rtp://127.0.0.1:20000 -newaudio
You can easily adapt it to you needs.
Luca
More information about the ffmpeg-devel
mailing list