On 16/06/16 03:34, Bernard Giannetti wrote:
> Hi,
> I have been using avconv to cut up and then stitch together audio/video files 
> which originally came from a MythTV recording.  In short I note the times 
> when a commercial break is on and then repeatedly get avconv to split at 
> those times and then finally stitch all back together.
> Typically a cut is done by this:
>     avconv -i in.mpg -ss 00:12:00 -t 0:03:00 -codec copy -f mpegts out.mpg
> I was using the concat option to do the stitching, but now it has been 
> disabled.
> After chatting with someone (elenril) on an IRC channel a while back, I was 
> told why the option was disabled and then suggested that I instead cat the 
> files to avconv and use pipe:0...for example:
>     cat 0.mpg 1.mpg 2.mpg 3.mpg 4.mpg 5.mpg 6.mpg 7.mpg 8.mpg 9.mpg 10.mpg 
> 11.mpg 12.mpg | avconv -v verbose -y -i pipe:0 -f mpegts -c copy out.mpg
> which then produced a short file and this error:
>     [mpegts @ 0x822900] Application provided invalid, non monotonically 
> increasing dts to muxer in stream 1: 424716480 >= 
> 424716480av_interleaved_write_frame(): Invalid argument
> I was told on IRC that it could be the timestamps within the cut files that 
> are causing the issue.  I ensure that the timestamps I've used to create each 
> cut file are increasing (in terms of passing them to avconv to do the cutting 
> and there is no overlap of times).  Also I was told that streamcopy + concat 
> will not work well in general.
> So does anyone have an idea please on how I can either reinstate the concat 
> option, or an alternative way to cut and put back together?
> BTW: Yes, MythTV has a cutlist function which I've tried using (with more 
> anguish than success); however I have to use the MythTV interface and I'd 
> rather do all this via scripts as I have a large number of files that I 
> typically slice and dice.
> 
> Thanks in advance,
> Bernmeister.
>                                         

cat and the removed concat avio work exactly the same.

assuming the .mpg are ps files and you want to generate a ts file of the
sum of them you can do:

    avconv -i in.mpg -ss 00:12:00 -t 0:03:00 -codec copy out${item}.ts

cat out01.ts out02.ts ... > final.ts

alternatively you can build an hls playlist and use it.

lu

_______________________________________________
libav-tools mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-tools

Reply via email to