[MEncoder-users] Edit Decision List - exact frame cut problem.

Bill Crockett wsc4 at optusnet.com.au
Mon Dec 12 00:46:29 CET 2011



On 11/12/2011 1:51 PM, The Wanderer wrote:
> On 12/09/2011 12:41 AM, Bill Crockett wrote:
>
>> I am trying to remove advertisements from an MPEG-TS video using the 
>> Edit
>> Decision List commands.
>>
>> mplayer  -edlout cut.dat videoTS.mpg
>>
>> mencoder -edl cut.dat -ovc copy -oac copy -noskip -mc 0 -of mpeg 
>> -mpegopts
>> format=mpeg2:muxrate=9088:interleaving2:tsaf:adelay=160 videoTS.mpg -o
>> cut_test.mpg
>>
>> Using -edlout, if I cut right on where the film starts, it cuts out 
>> approximately 30 seconds off the start of the film.  If I cut 
>> slightly before
>> the film starts, it then shows too much of the ad.  The same happens 
>> when
>> cutting out the advertisements from their start to their end during 
>> the film.
>> I just can't get it to cut exactly on the black spots where the film 
>> or ad
>> fades out.
>
> I haven't used it myself, but I think -hr-edl-seek is what you're after.
>

Thanks, but that also is not guaranteed to work with -ovc copy.  I tried 
my luck with it anyway, but this resulted:

============ Sorry, this file format is not recognized/supported 
=============
=== If this file is an AVI, ASF or MPEG stream, please contact the 
author! ===
Cannot open demuxer.

Anyway, I'm still using -ovc copy -edl and not bothering about starting 
at non-keyframe boundaries at the moment.

After getting the A/V perfectly in sync by adjusting the -delay option, 
the audio is now out of sync only after the second advertisement cut 
(bad enough to be awful).  It is then back in sync after the third 
advertisement cut and fine from then on.  Trying -ofps 25 and even -fps 
25 -ofps 25 together made no difference.  320delay.mpg is in perfect 
sync after this encode:

mencoder -ovc copy -oac copy -noskip -mc 0 -of mpeg -mpegopts /
format=mpeg2:muxrate=9088:tsaf:interleaving2:vdelay=320  /
videoPS.mpg -o 320delay.mpg

This plays in perfect sync:  mplayer 320delay.mpg -edl cut.dat

Parameters of cut.dat:
1.160000 56.160000 0
210.839996 366.040009 0
903.040039 1102.959961 0
1641.320068 1801.599976 0

mencoder -ovc copy -oac copy -noskip -mc 0 -of mpeg -mpegopts /
format=mpeg2:muxrate=9088:tsaf:interleaving2 320delay.mpg -o edl_cut.mpg 
-edl cut.dat

 From 366.040009 - 903.040039 "edl_cut.mpg" is out of sync; the rest is 
fine.

Any ideas please and thanks for your help,

BC



More information about the MEncoder-users mailing list