New submission from Andriy <[email protected]>:
ffplay can not play mp3 or aac audio over RTP that transcoded using ffmpeg. But
VLC can play this streams.
How to reproduce this bug:
1) Run ffmpeg streamin mp3 or aac over RTP:
mp3:
ffmpeg -re -i test.avi -acodec libmp3lame -flags +global_header -ac 2 -ar 48000
-vn -f rtp rtp://127.0.0.1:1234
or aac:
ffmpeg -re -i test.avi -acodec libfaac -flags +global_header -ac 2 -ar 48000 -vn
-f rtp rtp://127.0.0.1:1234
Input file can be in any supported by ffmpeg format. I tested with different
input files and input streams in different formats and codecs - result will be
the sames.
2) Copy SDP lines generated by ffmpeg and save it to file (1.sdp). For mp3 it
will look like:
v=0
o=- 0 0 IN IP4 127.0.0.1
t=0 0
s=No Name
a=tool:libavformat 52.31.0
c=IN IP4 127.0.0.1
m=audio 1234 RTP/AVP 14
b=AS:64
3) Play this file with ffplay:
ffplay 1.sdp
Audio will be corrupted. But VLC can play this 1.sdp file (both mp3 and aac)
Bug happens only with mp3 and aac codecs. With mp2 codec all is fine and ffplay
can play .sdp well.
I confirm this bug on Ubuntu with latest ffmpeg package:
FFplay version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2003-2009
Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale
--enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-libgsm
--enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394
--disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp
--disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 10 2009 23:18:41, gcc: 4.3.3
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009
Fabrice Bellard, et al.
configuration: --enable-gpl --enable-postproc --enable-swscale
--enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr
--enable-avfilter --enable-avfilter-lavf --enable-libgsm
--enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis
--enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394
--disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp
--disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.20. 0 / 52.20. 0
libavformat 52.31. 0 / 52.31. 0
libavdevice 52. 1. 0 / 52. 1. 0
libavfilter 0. 4. 0 / 0. 4. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Apr 10 2009 23:18:41, gcc: 4.3.3
and with latest ffmpeg from SVN:
FFplay version SVN-r19424, Copyright (c) 2003-2009 Fabrice Bellard, et al.
configuration: --disable-stripping --enable-debug --enable-gpl
--enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-static
--disable-shared
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 13 2009 15:47:28, gcc: 4.3.3
FFmpeg version SVN-r19424, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --disable-stripping --enable-debug --enable-gpl
--enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-static
--disable-shared
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 13 2009 15:47:28, gcc: 4.3.3
Error messages from ffplay in case of mp3:
./ffplay test-mp3.sdp
FFplay version SVN-r19424, Copyright (c) 2003-2009 Fabrice Bellard, et al.
configuration: --disable-stripping --enable-debug --enable-gpl
--enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-static
--disable-shared
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 13 2009 15:47:28, gcc: 4.3.3
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:0 skipping granule 0
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:0 skipping granule 1
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:0 skipping granule 0
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:0 skipping granule 1
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:156 skipping granule 0
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:156 skipping granule 1
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:469, lastbuf:312 skipping granule 0
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:469, lastbuf:312 skipping granule 1
Last message repeated 1 times
[mp3 @ 0x98c5fd0]mdb:470, lastbuf:468 skipping granule 0
[mp3 @ 0x98c5fd0]Header missing
[mp3 @ 0x98c5fd0]overread, skip -4 enddists: -2 -2
Last message repeated 1 times
[mp3 @ 0x98c5fd0]overread, skip -8 enddists: -1 -1
[mp3 @ 0x98c5fd0]Header missing
[mp3 @ 0x98c5fd0]mdb:480, lastbuf:479 skipping granule 0
[mp3 @ 0x98c5fd0]overread, skip -10 enddists: -5 -5
[mp3 @ 0x98c5fd0]overread, skip -8 enddists: -6 -6
[mp3 @ 0x98c5fd0]overread, skip -7 enddists: -4 -4
[mp3 @ 0x98c5fd0]overread, skip -6 enddists: -5 -5
[mp3 @ 0x98c5fd0]Header missing
[mp3 @ 0x98c5fd0]overread, skip -5 enddists: -1 -1
[mp3 @ 0x98c5fd0]overread, skip -6 enddists: -4 -4
[mp3 @ 0x98c5fd0]overread, skip -6 enddists: -1 -1
[mp3 @ 0x98c5fd0]overread, skip -7 enddists: -5 -5
[mp3 @ 0x98c5fd0]overread, skip -7 enddists: -1 -1
[mp3 @ 0x98c5fd0]Header missing
[mp3 @ 0x98c5fd0]mdb:468, lastbuf:462 skipping granule 0
[mp3 @ 0x98c5fd0]overread, skip -6 enddists: -3 -3
[mp3 @ 0x98c5fd0]overread, skip -7 enddists: -5 -5
Last message repeated 1 times
In case of aac there is also error messages:
./ffplay ~mrlika/test-aac.sdp
FFplay version SVN-r19424, Copyright (c) 2003-2009 Fabrice Bellard, et al.
configuration: --disable-stripping --enable-debug --enable-gpl
--enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac
--enable-libfaad --enable-libgsm --enable-libmp3lame --enable-libtheora
--enable-libvorbis --enable-libx264 --enable-libxvid --enable-static
--disable-shared
libavutil 50. 3. 0 / 50. 3. 0
libavcodec 52.32. 0 / 52.32. 0
libavformat 52.36. 0 / 52.36. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 1 / 0. 7. 1
libpostproc 51. 2. 0 / 51. 2. 0
built on Jul 13 2009 15:47:28, gcc: 4.3.3
[aac @ 0x9c7dfd0]Transition from an ONLY_LONG or LONG_STOP to an EIGHT_SHORT
sequence detected. If you heard an audible artifact, please submit the sample to
the FFmpeg developers.
Tell me if you need any additional info.
----------
messages: 6460
priority: normal
status: new
substatus: new
title: ffplay can not play mp3 and aac from ffmpeg over RTP
type: bug
_____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue1265>
_____________________________________________________