NOTE: This question is superceded by this new one, please do not answer below this post.
What happened?
[Edit] DVB file ('file1') in TS format of H.264/AC3@50i cannot be properly remuxed into any of the following formats: isom/mp4; QuickTime MOV; Matroska
Another DVB file ('file2') in TS format of MPEG-2/[email protected] can be properly remuxed into any of the following formats: MPEG; isom/mp4. QuickTime MOV and Matroska are not tried.
[Update] Still another one in TS format of H.264/[email protected] can be properly remuxed into isom/mp4 without a hitch, not requiring any ffmpeg switches other than -i, -c copy.
Technical details
FFMpeg reports millions of the following error messages, with or without any possible combination of these switches: -fflags +genpts, -fflags +igndts, -fflags +discardcorrupt
- Command line is
ffmpeg.exe -fflags +igndts -fflags +genpts -fflags +discardcorrupt -i INPUT -c copy -format mp4 OUTPUT
- Error Message 1:
[mp4 @ address] pts has no value
Last message repeated xxx times - Error Message 2:
[mp4 @ address] Non-monotonous DTS in output stream 0:0. Previous ... Current ... Changing to ... , blah blah
- Command line is
AVIDemux completes operation with wrong metadata and faulty playback. File properties and playback behaviour resembles that created by FFMpeg
- Frame-rate becomes variable, should be 50i
- Average frame-rate is not the correct value, showing very strange numbers
- Playback frame-rate is abnormal, oscillating btw. 59.94 and 39.xx
[Edit] MP4box reports the following warnings for 2 times, and produces jagged picture with wrong frame-rate as mentioned above. If you view the resultant video very carefully you will see the image with many blocks; this is not found in the original file.
- Command line is
mp4box.exe -fps 50 -add "INPUT#video" OUTPUT
- Error Message:
[MPEG-2 TS] PID xx PCR discontinuity signaled but diff is small (diff xx us - PCR diff xx vs prev PCR diff 0) - ignore it
- Command line is
My questions, in detail
1 What on earth is "DTS" and "PTS"? They seem to be obsructing a successful remux.
2 Is this due to corrupted file or software bug (see https://trac.ffmpeg.org/ticket/4768 and https://trac.ffmpeg.org/ticket/502)?
3 If this is a software bug what are the work-arounds?
4 Any workable solution that remuxes MPEG Transport Streams to MP4 are welcome. MPEG-TS takes up too much overhead and are not well supported across platforms and systems.
Diagnostic Information
- MediaInfo dump of file1, file2, and file1 remuxed into mp4 by FFMpeg
http://pastebin.ca/3966322
store method
of file1 is unusual. Try with ffmbc. If you can't compile, get an older binary from videohelp.com/software/ffmbc-mpegts_service_type advanced_codec_digital_hdtv -mpegts_m2ts_mode false -mpegts_flags system_b
; works in FFMbc with-fflags +genpts
specified. TS→mp4 succeeded in FFMbc (0.7.2) with-fflags +genpts -f mp4
specified. The ffmbc hack worked for this file and some others, the rest still failed. The issue appears to be centered around timestamping. A new question has been posted to supercede this one.