Opened 13 years ago
Closed 12 years ago
#1242 closed defect (fixed)
Remuxing Matroska to MPEG transport stream with -copyts errors out with non monotonically increasing dts
Reported by: | Chucks | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | git-master | Keywords: | av_interleaved_write_frame mkv copyts |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
I am using http://serviio.org/ as a media server to a media device not supporting Matroska container formats, ffmpeg errors out with "Application provided invalid, non monotonically increasing dts to muxer in stream ...".
After testing differences between the frozen source version that the Serviio project distributes, there appears to be a regression between the working ffmpeg version 0.9 distributed by Serviio as a source tarball built on x86_64, the non-working ffmpeg versions 0.9.1-54 and 0.10.2-54 distributed by http://atrpms.net/ as Fedora 16 x86_64 RPMs, and the git sources from git://source.ffmpeg.org/ffmpeg.git as of commit b21ba20cc83c80fe56192fee3626a8087f37d806 on Sun Apr 22 03:47:53 2012 +0200.
Past experience has shown that omitting the -copyts may cause Matroska remuxed to MPEGts without -copyts may cause video and audio losing synchronization when rendering the resulting files on the client devices.
Attached are ffmpeg report logs and sample media file.
Attachments (4)
Change History (11)
comment:1 by , 13 years ago
follow-up: 5 comment:2 by , 13 years ago
Logs and sample media file provided. The choice to include -copyts was from the serviio team due to captures CLI output with /bin/ps. Previous experience with transcoding has shown that omitting the -copyts may result in files without properly synchronized audio and video streams. Research into this issue appears to show that the Matroska format doesn't appear to store timestamps as often as other formats, but that is the limit of my understanding of media formats.
by , 13 years ago
Attachment: | ffmpeg-20120422-161053.log added |
---|
Command line similar to what is captured from serviio
by , 13 years ago
Attachment: | ffmpeg-20120422-161104.log added |
---|
Command line where audio is simply remuxed, not transcoded.
by , 13 years ago
Attachment: | ffmpeg-20120422-161113.log added |
---|
Command line where audio is simply remuxed, not transcoded without -copyts
comment:3 by , 13 years ago
Just thought I'd mention that the Serviio-distributed version of FFmpeg includes a patch specifically to fix this issue, which I believe has still never been in any release version of FFmpeg. So it's not a 'clean' version of 0.9, and therefore what you describe is not a regression as such.
I can't find the thread now, but this question comes up on the Serviio forum and I seem to recall that Zip (Serviio's developer) mentioned something of how this fix is considered by the FFmpeg developers as a somewhat dirty workaround, which is why it isn't committed.
comment:4 by , 12 years ago
Keywords: | av_interleaved_write_frame mkv added; matroska mpegts non-monotonic dts removed |
---|
I don't think there is a problem, after all, FFmpeg by default copies the video stream fine, but I may of course be wrong.
comment:5 by , 12 years ago
Replying to chucks:
Previous experience with transcoding has shown that omitting the -copyts may result in files without properly synchronized audio and video streams.
Sounds like an important bug, did you report this?
comment:6 by , 12 years ago
I'll see what I can do to locate the offending file that was exhibiting the audio/video stream sync issues when remuxing to file a separate report concerning the issue, but spare time is a precious commodity I have little spare of at the present.
comment:7 by , 12 years ago
Component: | undetermined → avformat |
---|---|
Reproduced by developer: | set |
Resolution: | → fixed |
Status: | new → closed |
Please provide a minimal command line together with complete, uncut console output and a sample.
Since you mention a reason why you have to use -copyts: Did you report this problem?