Opened 4 years ago

Last modified 6 months ago

#3369 open defect

Copying from MPEG TS to MKV fails with "Can't write packet with unknown timestamp"

Reported by: gerph Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: h264 mpegts av_interleaved_write_frame regression
Cc: michael Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

When copying from a DVB recording of a channel, to change the container type from MPEG TS to Matroska, the copy aborts as soon as it encounters a missing timestamp with the message:

"Can't write packet with unknown timestamp"

The equivalent operation to change the container to MP4 merely reports a warning message and continues encoding to the end of the file:

"pts has no value"

How to reproduce:

% ffmpeg-2014-02-03 -y  -i TestFiles/BBC3HD_Sherlock_Cut.mpg -vcodec copy -acodec copy  -map 0:0 -map 0:15 -map 0:1 test.mkv
ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb  3 2014 17:36:04 with gcc 4.3.2 (Debian 4.3.2-1.1)
  configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --disable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --disable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libfreetype --disable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --enable-libzvbi --extra-cflags='-I/home/justin/ffmpeg/x264-2014-01-04/ -I/home/justin/ffmpeg/xvidcore-2014-01-04/src/ -I/home/justin/ffmpeg/libogg-1.3.1/include -I/home/justin/ffmpeg/libtheora-1.1.1/include -I/home/justin/ffmpeg/libvorbis-1.3.3/include -I/home/justin/ffmpeg/libvpx-2014-01-12/libvpx' --extra-ldflags='-L/home/justin/ffmpeg/x264-2014-01-04/ -L/home/justin/ffmpeg/xvidcore-2014-01-04/build/generic/=build/ -L/home/justin/ffmpeg/libogg-1.3.1/src/.libs/ -L/home/justin/ffmpeg/libtheora-1.1.1/lib/.libs/ -L/home/justin/ffmpeg/libvorbis-1.3.3/lib/.libs/ -L/home/justin/ffmpeg/libvpx-2014-01-12/libvpx' --extra-libs=-ldl
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 49.101 / 55. 49.101
  libavformat    55. 29.100 / 55. 29.100
  libavdevice    55.  7.100 / 55.  7.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[h264 @ 0x93bdc00] non-existing PPS referenced
[h264 @ 0x93bdc00] non-existing PPS 0 referenced
[h264 @ 0x93bdc00] decode_slice_header error
[h264 @ 0x93bdc00] no frame!
[mpegts @ 0x93b9de0] Stream #3: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #4: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #5: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #6: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #7: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #8: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #9: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #10: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #11: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #12: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #13: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #14: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #16: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x93b9de0] Stream #17: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x93bf520] start time is not set in estimate_timings_from_pts
[NULL @ 0x93bfd80] start time is not set in estimate_timings_from_pts
[NULL @ 0x93c05e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x93c16e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x93c1f40] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d48e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d5100] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d5960] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d61c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d6a20] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d72c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d8400] start time is not set in estimate_timings_from_pts
[NULL @ 0x93d8d00] start time is not set in estimate_timings_from_pts
[mpegts @ 0x93b9de0] PES packet size mismatch
    Last message repeated 1 times
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 3 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 7 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 8 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 9 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 10 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 11 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 12 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 13 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 14 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 16 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x93b9de0] Could not find codec parameters for stream 17 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'TestFiles/BBC3HD_Sherlock_Cut.mpg':
  Duration: 00:00:14.26, start: 39086.002622, bitrate: 11765 kb/s
  Program 1 
    Stream #0:0[0x15e0]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x15e2](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:2[0x15e3](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
    Stream #0:3[0xf06]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:4[0xf07]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:5[0xf09]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:6[0x15e4](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:7[0xf00]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:8[0xf01]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:9[0xf02]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:10[0xf03]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:11[0xf04]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:12[0x911]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:13[0x912]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:14[0x913]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:15[0x15e1](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:16[0x15e5]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:17[0x15e6]: Unknown: none ([5][0][0][0] / 0x0005)
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf55.29.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc
    Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:2(NAR): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:15 -> #0:1 (copy)
  Stream #0:1 -> #0:2 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x93d9dc0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 0x93d9dc0] Can't write packet with unknown timestamp
frame=  173 fps=0.0 q=-1.0 Lsize=    6494kB time=00:00:08.06 bitrate=6594.1kbits/s    
video:7021kB audio:395kB subtitle:0 data:0 global headers:0kB muxing overhead -12.425578%

Using '-fflags +genpts' as recommended in some other reports has no effect on the output, thus:

% ffmpeg-2014-02-03 -y -fflags +genpts -i TestFiles/BBC3HD_Sherlock_Cut.mpg -vcodec copy -acodec copy  -map 0:0 -map 0:15 -map 0:1 test.mkv

ffmpeg version 2.1.git Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb  3 2014 17:36:04 with gcc 4.3.2 (Debian 4.3.2-1.1)
  configuration: --enable-libdc1394 --prefix=/usr --extra-cflags='-Wall -g ' --enable-shared --enable-libmp3lame --enable-gpl --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --disable-x11grab --enable-libgsm --enable-libtheora --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --disable-libspeex --enable-nonfree --disable-stripping --enable-avfilter --enable-libfreetype --disable-libschroedinger --disable-encoder=libschroedinger --enable-version3 --enable-libopenjpeg --enable-libvpx --enable-librtmp --extra-libs=-lgcrypt --disable-altivec --disable-armv5te --disable-armv6 --disable-vis --enable-libzvbi --extra-cflags='-I/home/justin/ffmpeg/x264-2014-01-04/ -I/home/justin/ffmpeg/xvidcore-2014-01-04/src/ -I/home/justin/ffmpeg/libogg-1.3.1/include -I/home/justin/ffmpeg/libtheora-1.1.1/include -I/home/justin/ffmpeg/libvorbis-1.3.3/include -I/home/justin/ffmpeg/libvpx-2014-01-12/libvpx' --extra-ldflags='-L/home/justin/ffmpeg/x264-2014-01-04/ -L/home/justin/ffmpeg/xvidcore-2014-01-04/build/generic/=build/ -L/home/justin/ffmpeg/libogg-1.3.1/src/.libs/ -L/home/justin/ffmpeg/libtheora-1.1.1/lib/.libs/ -L/home/justin/ffmpeg/libvorbis-1.3.3/lib/.libs/ -L/home/justin/ffmpeg/libvpx-2014-01-12/libvpx' --extra-libs=-ldl
  libavutil      52. 63.100 / 52. 63.100
  libavcodec     55. 49.101 / 55. 49.101
  libavformat    55. 29.100 / 55. 29.100
  libavdevice    55.  7.100 / 55.  7.100
  libavfilter     4.  1.102 /  4.  1.102
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[h264 @ 0x8549c20] non-existing PPS referenced
[h264 @ 0x8549c20] non-existing PPS 0 referenced
[h264 @ 0x8549c20] decode_slice_header error
[h264 @ 0x8549c20] no frame!
[mpegts @ 0x8545e20] Stream #3: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #4: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #5: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #6: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #7: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #8: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #9: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #10: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #11: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #12: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #13: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #14: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #16: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x8545e20] Stream #17: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x854b5c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x854be20] start time is not set in estimate_timings_from_pts
[NULL @ 0x854c6e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x854d7a0] start time is not set in estimate_timings_from_pts
[NULL @ 0x854e000] start time is not set in estimate_timings_from_pts
[NULL @ 0x8560960] start time is not set in estimate_timings_from_pts
[NULL @ 0x85611c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x8561a20] start time is not set in estimate_timings_from_pts
[NULL @ 0x8562280] start time is not set in estimate_timings_from_pts
[NULL @ 0x8562ae0] start time is not set in estimate_timings_from_pts
[NULL @ 0x8563340] start time is not set in estimate_timings_from_pts
[NULL @ 0x8564400] start time is not set in estimate_timings_from_pts
[NULL @ 0x8564d00] start time is not set in estimate_timings_from_pts
[mpegts @ 0x8545e20] PES packet size mismatch
    Last message repeated 1 times
[mpegts @ 0x8545e20] Could not find codec parameters for stream 3 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 7 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 8 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 9 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 10 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 11 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 12 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 13 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 14 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 16 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x8545e20] Could not find codec parameters for stream 17 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'TestFiles/BBC3HD_Sherlock_Cut.mpg':
  Duration: 00:00:14.26, start: 39086.002622, bitrate: 11765 kb/s
  Program 1 
    Stream #0:0[0x15e0]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x15e2](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 256 kb/s
    Stream #0:2[0x15e3](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006), 492x250
    Stream #0:3[0xf06]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:4[0xf07]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:5[0xf09]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:6[0x15e4](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:7[0xf00]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:8[0xf01]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:9[0xf02]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:10[0xf03]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:11[0xf04]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:12[0x911]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:13[0x912]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:14[0x913]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:15[0x15e1](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:16[0x15e5]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:17[0x15e6]: Unknown: none ([5][0][0][0] / 0x0005)
Output #0, matroska, to 'test.mkv':
  Metadata:
    encoder         : Lavf55.29.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc
    Stream #0:1(eng): Audio: ac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, 192 kb/s
    Stream #0:2(NAR): Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, 256 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:15 -> #0:1 (copy)
  Stream #0:1 -> #0:2 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x8565aa0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 0x8565aa0] Can't write packet with unknown timestamp
frame=  173 fps=0.0 q=-1.0 Lsize=    6494kB time=00:00:08.06 bitrate=6594.1kbits/s    
video:7021kB audio:395kB subtitle:0 data:0 global headers:0kB muxing overhead -12.425578%

Example file for problem, and the related logs can be found here:

http://usenet.gerph.org/FFMPEG/Copy-BBC-HD-To-MKV-Fails/

  • BBC3HD_Sherlock_Cut.mpg
    • Example file.
  • ffmpeg-fileinfo-2014-02-03.txt
    • Output from "ffmpeg -i" from snapshot as at 2014-02-03.
  • ffmpeg-fileinfo.txt
    • Output from "ffmpeg -i" from 2.1.3.
  • ffmpeg-mkv-copy-fails-2014-02-03+genpts.txt
    • Output from "ffmpeg -fflags +genpts ... test.mkv" from snapshot as at 2014-02-03.
  • ffmpeg-mkv-copy-fails-2014-02-03.txt
    • Output from "ffmpeg ... test.mkv" from snapshot as at 2014-02-03.
  • ffmpeg-mkv-copy-fails.txt
    • Output from "ffmpeg ... test.mkv" from 2.1.3.
  • ffmpeg-mp4-copy-works-2014-02-03.txt
    • Output from "ffmpeg ... test.mp4" from snapshot as at 2014-02-03; for comparison of a working conversion.
  • ffmpeg-mp4-copy-works.txt
    • Output from "ffmpeg ... test.mp4" from 2.1.3; for comparison of a working conversion.

Tested on 2.1.1, 2.1.3 and snapshot from 2014-02-03. All fail in the manner described. The '-fflags +genpts' option has no effect on any of these versions.

Change History (7)

comment:1 Changed 3 years ago by cehoyos

Not a duplicate of ticket #3339, maybe related to tickets #1150 and #1598
The sample is ~12 seconds long, ~346 frames.

$ ffmpeg -i BBC3HD_Sherlock_Cut.mpg -vcodec copy -map 0:0 out.mkv
ffmpeg version N-60799-g20fa3fb Copyright (c) 2000-2014 the FFmpeg developers
  built on Feb 21 2014 09:05:35 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl
  libavutil      52. 65.100 / 52. 65.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  1.103 /  4.  1.103
  libswscale      2.  5.101 /  2.  5.101
  libswresample   0. 17.104 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[h264 @ 0x2b80a60] non-existing PPS 0 referenced
    Last message repeated 1 times
[h264 @ 0x2b80a60] decode_slice_header error
[h264 @ 0x2b80a60] no frame!
[mpegts @ 0x2b7c900] Stream #3: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #4: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #5: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #6: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #7: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #8: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #9: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #10: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #11: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #12: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #13: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #14: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #16: not enough frames to estimate rate; consider increasing probesize
[mpegts @ 0x2b7c900] Stream #17: not enough frames to estimate rate; consider increasing probesize
[NULL @ 0x2b82980] start time is not set in estimate_timings_from_pts
[NULL @ 0x2b833e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x2b83e80] start time is not set in estimate_timings_from_pts
[NULL @ 0x2b9f580] start time is not set in estimate_timings_from_pts
[NULL @ 0x2b9ff00] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba0960] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba13c0] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba1e20] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba2880] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba32e0] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba3d40] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba5240] start time is not set in estimate_timings_from_pts
[NULL @ 0x2ba5ca0] start time is not set in estimate_timings_from_pts
[mpegts @ 0x2b7c900] PES packet size mismatch
    Last message repeated 1 times
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 3 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 4 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 5 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 7 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 8 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 9 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 10 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 11 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 12 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 13 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 14 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 16 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
[mpegts @ 0x2b7c900] Could not find codec parameters for stream 17 (Unknown: none ([5][0][0][0] / 0x0005)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'BBC3HD_Sherlock_Cut.mpg':
  Duration: 00:00:14.26, start: 39086.002622, bitrate: 11765 kb/s
  Program 1
    Stream #0:0[0x15e0]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x15e2](NAR): Audio: mp2 ([3][0][0][0] / 0x0003), 48000 Hz, stereo, s16p, 254 kb/s
    Stream #0:2[0x15e3](eng,eng): Subtitle: dvb_teletext ([6][0][0][0] / 0x0006)
    Stream #0:3[0xf06]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:4[0xf07]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:5[0xf09]: Unknown: none ([11][0][0][0] / 0x000B)
    Stream #0:6[0x15e4](eng): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:7[0xf00]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:8[0xf01]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:9[0xf02]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:10[0xf03]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:11[0xf04]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:12[0x911]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:13[0x912]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:14[0x913]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:15[0x15e1](eng): Audio: ac3 ([129][0][0][0] / 0x0081), 48000 Hz, stereo, fltp, 192 kb/s
    Stream #0:16[0x15e5]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:17[0x15e6]: Unknown: none ([5][0][0][0] / 0x0005)
Output #0, matroska, to 'out.mkv':
  Metadata:
    encoder         : Lavf55.33.100
    Stream #0:0: Video: h264 (H264 / 0x34363248), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 1k tbn, 90k tbc
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x2ba77c0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
frame=  147 fps=0.0 q=-1.0 Lsize=    6054kB time=00:00:06.26 bitrate=7922.0kbits/s
video:6070kB audio:0kB subtitle:0 data:0 global headers:0kB muxing overhead -0.269782%

comment:2 Changed 3 years ago by cehoyos

  • Keywords h264 mpegts added
  • Reproduced by developer set
  • Status changed from new to open
  • Version changed from 2.1.3 to git-master

comment:3 Changed 3 years ago by cehoyos

  • Keywords av_interleaved_write_frame added

comment:4 Changed 8 months ago by cehoyos

Looks like a long-time regression.

comment:5 Changed 8 months ago by cehoyos

  • Keywords regression added
  • Priority changed from normal to important

Uploaded this sample and the sample from ticket #6026 to http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket3369

comment:6 Changed 6 months ago by michael

  • Cc michael added

Is this really a regression ?
Before which commit was timestamp interpolation for h264 working?

comment:7 Changed 6 months ago by cehoyos

Regression since d17e7070 / 38a4be3f

Note: See TracTickets for help on using tickets.