[FFmpeg-trac] #1329(undetermined:open): A/V desync with mpeg1video and mp2 in mpeg-ps
FFmpeg
trac at avcodec.org
Fri Jun 15 08:21:16 CEST 2012
#1329: A/V desync with mpeg1video and mp2 in mpeg-ps
-------------------------------------+-------------------------------------
Reporter: burek | Owner:
Type: defect | Status: open
Priority: normal | Component:
Version: git-master | undetermined
Keywords: mpegps | Resolution:
desync | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Comment (by lvm):
I have the same issue when using "asyncts" audio filter:
{{{
ffmpeg -i udp://@237.255.1.10:1234 -codec:v copy -af
asyncts=compensate=1:min_delta=0.1 -acodec libfaac -f mpegts
tcp://example.com:9992
}}}
{{{
ffmpeg version 0.11 Copyright (c) 2000-2012 the FFmpeg developers
built on Jan 19 2012 07:34:53 with gcc 4.6.2
configuration: --shlibdir=/usr/lib64 --prefix=/usr
--mandir=/usr/share/man --libdir=/usr/lib64 --enable-shared --disable-
static --enable-debug --disable-stripping --extra-cflags='-O2 -g -m64
-fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -fPIC -I/usr/include/gsm' --enable-gpl
--enable-x11grab --enable-version3 --enable-pthreads --enable-libfaac
--enable-nonfree --enable-avfilter --enable-libpulse --enable-libvpx
--enable-libmp3lame --enable-libvorbis --enable-libtheora --enable-
libspeex --enable-libxvid --enable-libx264 --enable-libschroedinger
--enable-libgsm --enable-libopencore-amrnb --enable-libopencore-amrwb
--enable-postproc --enable-libdc1394 --enable-librtmp --enable-libfreetype
libavutil 51. 54.100 / 51. 54.100
libavcodec 54. 23.100 / 54. 23.100
libavformat 54. 6.100 / 54. 6.100
libavdevice 54. 0.100 / 54. 0.100
libavfilter 2. 77.100 / 2. 77.100
libswscale 2. 1.100 / 2. 1.100
libswresample 0. 15.100 / 0. 15.100
libpostproc 52. 0.100 / 52. 0.100
[mpegts @ 0x62d140] Unable to seek back to the start
[mpeg2video @ 0x657a80] mpeg_decode_postinit() failure
Last message repeated 4 times
[mp3 @ 0x65de00] Header missing
[mpegts @ 0x62d140] max_analyze_duration 5000000 reached at 5016000
[mpegts @ 0x62d140] Estimating duration from bitrate, this may be
inaccurate
Input #0, mpegts, from 'udp://@237.255.1.10:1234':
Duration: N/A, start: 69244.458456, bitrate: 15096 kb/s
Program 1
Metadata:
service_name : MyChannel
service_provider: MyChannel
Stream #0:0[0x134]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002),
yuv420p, 720x576 [SAR 16:15 DAR 4:3], 15000 kb/s, 25.61 fps, 25 tbr, 90k
tbn, 50 tbc
Stream #0:1[0x100](eng): Audio: mp2 ([4][0][0][0] / 0x0004), 48000 Hz,
mono, s16, 96 kb/s
[AVAudioResampleContext @ 0x6d86a0] Using s16p as internal sample format
[mpegts @ 0x695e60] muxrate VBR, pcr every 2 pkts, sdt every 200, pat/pmt
every 40 pkts
Output #0, mpegts, to 'tcp://truba.com:9992':
Metadata:
encoder : Lavf54.6.100
Stream #0:0: Video: mpeg2video ([2][0][0][0] / 0x0002), yuv420p,
720x576 [SAR 16:15 DAR 4:3], q=2-31, 15000 kb/s, 25.61 fps, 90k tbn, 25
tbc
Stream #0:1(eng): Audio: aac, 48000 Hz, mono, s16, 128 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Stream #0:1 -> #0:1 (mp2 -> libfaac)
Press [q] to stop, [?] for help
[mp2 @ 0x65de00] Header missing
Error while decoding stream #0:1
Error in av_buffersink_get_buffer_ref(): Invalid argument
frame= 166 fps=103 q=-1.0 size= 4698kB time=00:00:06.44
bitrate=5970.8kbits/s
}}}
Everything seems to be OK until source runs out of data (EOF and
connnection close are tested) or user decides to abort ffmpeg execution.
In both cases ffmpeg does not terminate and starts to produce huge amount
of messages (thousands per second) to stderr:
{{{
Que input is backward in time
[libfaac @ 0x7fef00] Que input is backward in time
Last message repeated 3 times
[mpegts @ 0x66c700] Audio timestamp 477587 < 477592 invalid, cliping
[libfaac @ 0x7fef00] Que input is backward in time
[mpegts @ 0x66c700] Audio timestamp 477583 < 477593 invalid, cliping
[mpegts @ 0x66c700] Audio timestamp 477579 < 477594 invalid, cliping
[libfaac @ 0x7fef00] Que input is backward in time
[mpegts @ 0x66c700] Audio timestamp 477576 < 477595 invalid, cliping
[libfaac @ 0x7fef00] Que input is backward in time
[mpegts @ 0x66c700] Audio timestamp 477572 < 477596 invalid, cliping
[libfaac @ 0x7fef00] Que input is backward in time
[mpegts @ 0x66c700] Audio timestamp 477568 < 477597 invalid, cliping
[libfaac @ 0x7fef00] Que input is backward in time
}}}
until kill or ctrl+c is issued by user.
Problem occurs only when asyncts filter is used.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1329#comment:6>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list