pocarist / ffmbc

Automatically exported from code.google.com/p/ffmbc
0 stars 0 forks source link

Non monotonically increasing dts to muxer #61

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I was slicing a large MPEG2 file into smaller segments, when the following 
error was thrown:

[mpeg @ 00000000004E76C0] Application provided invalid, non
monotonically increasing dts to muxer in stream 0: 176284380 >=
176284380
av_interleaved_write_frame(): Invalid argument 

I was using a file with the following properties:

>ffmbc -i TVE.mpg
FFmbc version 0.7-rc3
Copyright (c) 2008-2011 Baptiste Coudurier and the FFmpeg developers
[mpeg @ 0x10be640] max_analyze_duration 5000000 reached at 5000000
Input #0, mpeg, from 'TVE.mpg':
  Duration: 00:25:38.04, start: 0.305833, bitrate: 6966 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 6000 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
    Stream #0:1[0x1c0]: Audio: mp2, 48000 Hz, stereo, s16, 224 kb/s

My command was:

> ffmbc -i TVE.mpg -ss 00:00:00 -t 00:04:45 -vcodec copy TVE_Kids_Stuff_1.mpg

Subsequent segments later in the file worked fine. E.g, this worked without 
error:

> ffmpeg -i TVE.mpg -ss 00:04:55 -t 00:04:45 -vcodec copy TVE_Kids_Stuff_1.mpg

I downloaded the latest version of FFmpeg from Git, built and installed it. I 
then tried splitting the original file again, and the error did not occur.

After some web research, I see a few FFmpeg bug reports for this and it looks 
like a patch has been applied. I am guessing that with the next FFmbc synch on 
FFmpeg this error may be fixed.

Original issue reported on code.google.com by phillclarke@gmail.com on 12 Oct 2011 at 12:45

GoogleCodeExporter commented 9 years ago
Slicing is kinda unstable and unreliable, and a sample file is needed.

Original comment by baptiste...@gmail.com on 12 Oct 2011 at 7:18

GoogleCodeExporter commented 9 years ago
Hi,
i solved bypass control in the libavformat/utils.c (you find in attachment, add 
comment row 3067 and close row 3074) and recompile everything again :
I try and the issue is solved for me.
/*
    if(st->cur_dts && st->cur_dts != AV_NOPTS_VALUE && ((!(s->oformat->flags & A
VFMT_TS_NONSTRICT) && st->cur_dts >= pkt->dts) || st->cur_dts > pkt->dts)){
        av_log(s, AV_LOG_ERROR,

               "Application provided invalid, non monotonically increasing dts t
o muxer in stream %d: %"PRId64" >= %"PRId64"\n",
               st->index, st->cur_dts, pkt->dts);
        return AVERROR(EINVAL);
    }
*/

To cut an f4v i use this command :

ffmbc -ss hh:mm:ss -t hh:mm:ss -i <inputvideo>.f4v -vcodec copy -acodec copy -f 
f4v -async 1 <outputcroppedvideo>.f4v

Bye

Original comment by simone.c...@interact.it on 6 Feb 2012 at 11:43

Attachments: