antiboredom / videogrep

automatic video supercuts with python
https://antiboredom.github.io/videogrep
Other
3.33k stars 257 forks source link

Question about resyncsubs & padding #131

Open Dean-Corso opened 9 months ago

Dean-Corso commented 9 months ago

Hi @antiboredom,

I was trying to check both commands in case the audio does not match for 100 %. I see when using the resyncsubs command then the origin gets moved to the right side ( --resyncsubs 0.3) = starts & end later for 0.3 secs. When using ( --padding 0.2) then 0.2 secs getting added st start and end. Everything understand so far. My question now is what to do when I want to add ONLY at the start X secs without to add ALSO at the end or the other way round by just adding X secs at the end only. Somehow it seems I can not do that only adding at start & end. Somehow that's bad and I would prefer having an padding option for both directions only doing it at the start or end or both (default flag). Lets say I just need more time at the start to hit the right audio start point of any word / sentence in case when default does just hit incorrectly middle point or just a little after first letter etc. In this case I would use the padding command with 0.2 maybe but then the same time gets also added at the end which makes the cutout longer and not same anymore at the end even when the end point was matching correctly you know. So you see the problem right. Example:

audio cutout: 5 seconds
--padding 1 // audio = 7 seconds (start / end adding 1 second)
Start = start -1 & End = end + 1 secs.

But I just want to add at the start or end only. How to manage that at the moment? Lets say I wanna just add 1 second at the start then I have to do... --padding 0.5 --resyncsubs -0.5 ...right? Not tried yet whether neg values are possible to use. But also if this would work it's still confusing so would be better to set start / end for padding extra like...

--padding secs      // Adding secs to both sides
--padding-left secs // Adding secs to left side only
--padding-right secs    // Adding secs to right side only

What do you think about that?

antiboredom commented 8 months ago

Hi - yes you're correct you can use resync + padding to add padding to just one end or the other. I'm open to adding padding to just one side as a new feature so will leave this open...