Opened 7 years ago

Closed 7 years ago

#6026 closed defect (duplicate)

Fail to remux mpegts (HDTV) to matroska

Reported by: gohar Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords: h264 mpegts av_interleaved_write_frame
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Hello,

When I try to remux the mpegts file from my TV recorder to matroska, I get the following issue:

% ffmpeg -fflags +genpts -y -i sample.ts -codec copy sample.mkv
ffmpeg version N-82854-g2d7aadf Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 5.3.0 (GCC)
  configuration: --enable-gpl --enable-version3
  libavutil      55. 43.100 / 55. 43.100
  libavcodec     57. 68.100 / 57. 68.100
  libavformat    57. 60.100 / 57. 60.100
  libavdevice    57.  2.100 / 57.  2.100
  libavfilter     6. 68.100 /  6. 68.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] SPS unavailable in decode_picture_timing
[h264 @ 0x29b3be0] non-existing PPS 0 referenced
[h264 @ 0x29b3be0] decode_slice_header error
[h264 @ 0x29b3be0] no frame!
[h264 @ 0x29b3be0] mmco: unref short failure
    Last message repeated 1 times
[mpegts @ 0x2990420] start time for stream 5 is not set in estimate_timings_from_pts
[mpegts @ 0x2990420] start time for stream 6 is not set in estimate_timings_from_pts
[mpegts @ 0x2990420] start time for stream 7 is not set in estimate_timings_from_pts
[mpegts @ 0x2990420] PES packet size mismatch
    Last message repeated 3 times
[mpegts @ 0x2990420] 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 @ 0x2990420] Could not find codec parameters for stream 9 (Unknown: none ([11][0][0][0] / 0x000B)): unknown codec
Consider increasing the value for the 'analyzeduration' and 'probesize' options
Input #0, mpegts, from 'sample.ts':
  Duration: 00:00:14.79, start: 42782.891667, bitrate: 3877 kb/s
  Program 1025 
    Metadata:
      service_name    : M6
      service_provider: Multi4
  Program 1026 
    Metadata:
      service_name    : W9
      service_provider: Multi4
  Program 1031 
    Metadata:
      service_name    : Arte
      service_provider: Multi4
    Stream #0:0[0x140]: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x14a](fra): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:2[0x14b](qad): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 96 kb/s
    Stream #0:3[0x14c](qaa): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 128 kb/s
    Stream #0:4[0x14d](deu): Audio: eac3 ([6][0][0][0] / 0x0006), 48000 Hz, stereo, fltp, 96 kb/s
    Stream #0:5[0x154](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006) (hearing impaired)
    Stream #0:6[0x155](fra): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:7[0x156](deu): Subtitle: dvb_subtitle ([6][0][0][0] / 0x0006)
    Stream #0:8[0x172]: Unknown: none ([5][0][0][0] / 0x0005)
    Stream #0:9[0x173]: Unknown: none ([11][0][0][0] / 0x000B)
  Program 1045 
    Metadata:
      service_name    : France 5
      service_provider: Multi4
  Program 1046 
    Metadata:
      service_name    : 6ter
      service_provider: Multi4
Output #0, matroska, to 'sample.mkv':
  Metadata:
    encoder         : Lavf57.60.100
    Stream #0:0: Video: h264 (High) (H264 / 0x34363248), yuv420p(tv, bt709, top first), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 25 fps, 25 tbr, 1k tbn, 90k tbc
    Stream #0:1(fra): Audio: eac3 ([0] [0][0] / 0x2000), 48000 Hz, stereo, fltp, 128 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (copy)
Press [q] to stop, [?] for help
[matroska @ 0x2a347e0] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
[matroska @ 0x2a347e0] Can't write packet with unknown timestamp
av_interleaved_write_frame(): Invalid argument
[matroska @ 0x2a347e0] Can't write packet with unknown timestamp
Error writing trailer of sample.mkv: Invalid argumentframe=  294 fps=0.0 q=-1.0 Lsize=    4484kB time=00:00:12.28 bitrate=2989.1kbits/s speed= 260x    
video:4571kB audio:181kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
Conversion failed!

All the files I've tested fail the same (with or without "-fflags +genpts"), always near the end of the recorded program. I suspect some data is changed in the stream during the transition from a TV program to another, which causes the conversion to fail.

Here is the sample : http://requiescant.tuxfamily.org/sample.ts

In my tests, the conversion fails just after Mark Renton emerges from the toilet. You don't get anything from the other trailer in the mkv.

It might be related to #3339.

Change History (1)

comment:1 by Carl Eugen Hoyos, 7 years ago

Component: ffmpegundetermined
Keywords: h264 mpegts av_interleaved_write_frame added
Resolution: duplicate
Status: newclosed

I believe this is a duplicate of ticket #3369.

Note: See TracTickets for help on using tickets.