FFMetrics icon indicating copy to clipboard operation
FFMetrics copied to clipboard

[Feature] Ability to set different Duration/Skip values per file with custom values

Open glazarov-uk opened this issue 4 years ago • 10 comments

Currently the configured Duration and Skip options are applied to both the Reference and Distorted files. Having an option to set these to different values per file would be ideal as this is needed if manually aligning frames between the files. In the raw ffmpeg command this would translate to having the -ss and -t before each of the inputs specified.

Also it would be very useful to have the ability to specify the Duration and Skip with custom values, i.e. in the timecode format as currently the dropdowns are limited to a predefined set of values which may not be suitable for a number of cases.

glazarov-uk avatar Sep 17 '21 11:09 glazarov-uk

To be honest, I do not see any reason to specify processing duration per file. This would give you strange results.

As for specifying "skip" per file, I'd prefer #8 instead.

fifonik avatar Sep 18 '21 00:09 fifonik

Let me give an example from a live workflow.

  • The source is a multipart mezzanine file that includes slates at the beginning (e.g. 30s) which are trimmed out during the transcode process, the output/distorted files won't have it so we want to shift and align the source with the output before the VQ analysis. This requires trimming of the source.
  • The multipart means that every 10 minutes or so into the file there could be a sequence of black that is also trimmed out and replaced with ads on the output. For that reason we may only want to perform analysis up to the first splice point, and do the other parts separately, and we would need to enter custom start/end timecodes.

Example: ffmpeg.exe -ss 00:00:00.000 -t 00:09:30.000 -i OUTPUT.mp4 -ss 00:00:30.000 -t 00:10:00.000 -i SOURCE.mxf -lavfi [0:v]settb=AVTB,setpts=PTS-STARTPTS[main];[1:v]settb=AVTB,setpts=PTS-STARTPTS[ref];[main][ref]libvmaf='eof_action=endall:n_threads=7:phone_model=0:pool=mean:model_path=vmaf_v0.6.1.json:log_fmt=json:log_path=log.log' -f null

So this is a different use case from the #8 issue.

glazarov-uk avatar Sep 20 '21 06:09 glazarov-uk

I see that your case is different.

However, are you sure that you talking about "-t", not '-to' ('-t' -- duration, '-to' -- end position)? Still not understand what you expecting to get while comparing a piece with length 09:30 with the piece with length 10:00? Well, in your example the 10:00 will be ignored because of 'eof_action=endall', but I'm trying to understand the reason one need to specify different durations.

fifonik avatar Sep 20 '21 10:09 fifonik

Sorry that was a typo! In both places the "-t" duration should be the same eg. "00:09:30.000" whereas the start time is different.

glazarov-uk avatar Sep 20 '21 14:09 glazarov-uk

OK, then lets go to my first "question": why one would like to specify different processing durations on ref file and every distorted file? P.S. I do understand why this might be required for "skip".

fifonik avatar Sep 20 '21 19:09 fifonik

This is a great feature request!

For the Duration it would be better to specify it with custom values, but I agree it should be kept the same for both the Ref and the Distorted outputs.

Only the Skip (start position) could have different values for the in/out files, with the ability to enter custom values as above.

rikinp93 avatar Sep 21 '21 08:09 rikinp93

hey @fifonik, any thoughts on this issue? Will you be implementing the change? Thanks

glazarov-uk avatar Oct 14 '21 09:10 glazarov-uk

I'm planning to.

fifonik avatar Oct 14 '21 10:10 fifonik

great, any timescales..?

glazarov-uk avatar Oct 14 '21 11:10 glazarov-uk

Sorry, no timeframe atm.

fifonik avatar Oct 18 '21 06:10 fifonik