Vship icon indicating copy to clipboard operation
Vship copied to clipboard

Add control for seperate start and end for source file in FFVSHIP

Open GreatValueCreamSoda opened this issue 1 year ago • 4 comments

For projects like av1an and its derivative that only encode a partial part of the video at a time it would be very valuable to be able to only compare a section of the source at a time.

GreatValueCreamSoda avatar Jun 14 '25 19:06 GreatValueCreamSoda

I added --source-offset option that automatically set the source-end depending on the offset to match size with --start

example: if --source-offset 1 is used alone (on a video with 5 frames) source will use 1, 2, 3, 4 encoded will use 0, 1, 2, 3

if --source-offset -1 is used alone (on a video with 5 frames) source will use 0, 1, 2, 3 encoded will use 1, 2, 3, 4

what do you think about it? The only issue I got with this implementation is that it disable the check for having both videos of the same size, now it will automatically change --end by default to match both

Line-fr avatar Jun 17 '25 16:06 Line-fr

so if you have --encoded representing frames 10 to 20 of a --source with 40 frames you can do

--start 0 --end 10 --source-offset -10

and it will match them correctly. Basically, --start --end is for encoded, and you move the window negatively with source-offset

Line-fr avatar Jun 17 '25 16:06 Line-fr

I think that having --encoded-offset would be better honestly, since in most cases, encoded is smaller than source and not the opposite, that we would have source-offset negative all the time

Line-fr avatar Jun 17 '25 16:06 Line-fr

I changed this to --encoded-offset now, it will do the same as - --source-offset

Line-fr avatar Jun 17 '25 17:06 Line-fr