[mythtv-users] FFMPeg Commercial cutting puts audio out of sync

Justin Alcorn justin at jalcorn.net
Sat Sep 13 18:06:30 UTC 2014


Sorry, but I'm going to need more basic help.

I'm using the built-in commercial detection, so when my user job runs
there's a cutlist.  I then edit in the mythtv frontend and fix the
commercial detection, to get it right on the commercials.

Does the original cutlist pay attention to key frames?  Are you saying
I shouldn't change the cutlist?

If I do need to change it, how to I tell ffmpeg to only cut at key frames?

I'm missing something here.
--
Justin B. Alcorn
PGP Fingerprint A36D D691 C5B0 BE15 5A2A AF49 AA1C 372C


On Sat, Sep 13, 2014 at 1:27 PM, Mike Perkins
<mikep at randomtraveller.org.uk> wrote:
> On 13/09/14 17:55, Justin Alcorn wrote:
>>
>> On Sat, Sep 13, 2014 at 5:21 AM, Mike Perkins
>> <mikep at randomtraveller.org.uk> wrote:
>>>>
>>>> After hours of reading posts and playing with settings, I've cot a
>>>> couple of theories.
>>>>
>>>> A) the video is cutting on 'key frames', not at exactly the time I say
>>>> to cut, but the audio cuts at the exact mark
>>>> B) The video being in variable bitrate throws off the cutting
>>>>
>>>> But I'm not sure how to solve either of these problems.
>>>>
>>> [snip]
>>>>
>>>>
>>>>
>>> The most obvious thing to say is that you should make sure your cuts are
>>> all
>>> on keyframes. This should reduce any difference between audio and video
>>> to
>>> the minimum.
>>>
>>> If you don't make cuts on keyframes then the video processor has to try
>>> and
>>> bridge data that really belongs to two different scenes and adjust
>>> dynamically, which can look terrible on-screen. Keyframes is the way to
>>> go.
>>
>>
>>
>> That fits with one of my theories so the question is - how do I get
>> ffmpeg to cut at the keyframe closest to the time I specify?
>>
> I think that's more to do with how you specify the cuts.
>
> If you are just allowing the commercial-detecion program to do its thing
> then you really ought to check it afterwards and make sure the edits fall at
> keyframes.
>
> Otherwise, if you do it manually, then again, make sure you select keyframes
> as cut points.
>
> To clarify, cutting at the end of a program segment you want to keep, you
> can run /up to/ but not including the next keyframe (if suitable). That's
> the natural way that the frames will arrive in any event. For the start of
> any wanted segment, you really should begin it on a fresh keyframe to avoid
> flicker and sound discrepancies.
>
>
> --
>
> Mike Perkins
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
> http://wiki.mythtv.org/Mailing_List_etiquette
> MythTV Forums: https://forum.mythtv.org


More information about the mythtv-users mailing list