Opened 12 years ago

Closed 11 years ago

#2143 closed defect (fixed)

Desync for h264 transport stream

Reported by: Carl Eugen Hoyos Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: desync regression mpegts h264
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

http://thread.gmane.org/gmane.comp.video.ffmpeg.user/43173
The user provided a sample that plays fine with mplayer -demuxer mpegts, shows massive A/V desync with current ffmpeg, current ffplay and current mplayer -demuxer lavf.
For ffplay this is a regression since 01d4619 (can only be tested by merging 4dece8c, crashes without), for ffmpeg this is a regression since 0ff4f0c.
Until FFmpeg 0.10, -async 1 could be used as a work-around (the start of the output file contained dropouts but the rest of the output file played fine), this does not work since FFmpeg 0.11.

$ ffmpeg -i input.mpg -qscale 2 -t 30 out.avi
ffmpeg version N-48940-ge7a39e1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jan 16 2013 01:04:18 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 15.100 / 52. 15.100
  libavcodec     54. 89.100 / 54. 89.100
  libavformat    54. 60.101 / 54. 60.101
  libavdevice    54.  3.102 / 54.  3.102
  libavfilter     3. 32.100 /  3. 32.100
  libswscale      2.  1.103 /  2.  1.103
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  2.100 / 52.  2.100
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!

[...]

[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS referenced
[h264 @ 0x1dd1dc0] non-existing SPS 0 referenced in buffering period
[h264 @ 0x1dd1dc0] non-existing PPS 0 referenced
[h264 @ 0x1dd1dc0] decode_slice_header error
[h264 @ 0x1dd1dc0] no frame!
[h264 @ 0x1dd1dc0] mmco: unref short failure
    Last message repeated 3 times
Input #0, mpegts, from 'input.mpg':
  Duration: 00:00:30.90, start: 0.419044, bitrate: 12256 kb/s
  Program 1
    Stream #0:0[0x1011]: Video: h264 (Main) (HDMV / 0x564D4448), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 59.94 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x1100]: Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 384 kb/s
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf54.60.101
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 29.97 tbn, 29.97 tbc
    Stream #0:1: Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 192 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (h264 -> mpeg4)
  Stream #0:1 -> #0:1 (ac3 -> ac3)
Press [q] to stop, [?] for help
[h264 @ 0x2dcd660] Missing reference picture, default is 0
[h264 @ 0x2dcd660] decode_slice_header error
[h264 @ 0x2dcd660] mmco: unref short failure
    Last message repeated 1 times
frame=  753 fps= 76 q=2.0 Lsize=   79693kB time=00:00:30.03 bitrate=21739.9kbits/s
video:78937kB audio:704kB subtitle:0 global headers:0kB muxing overhead 0.066782%

Change History (2)

comment:1 by Carl Eugen Hoyos, 12 years ago

Keywords: mpegts h264 added
Status: newopen

comment:2 by Michael Niedermayer, 11 years ago

Resolution: fixed
Status: openclosed
Note: See TracTickets for help on using tickets.