Page 1 of 1

Watch Folder with MPDecimate filter

Posted: Thu Oct 14, 2021 7:39 pm
by Videng_OP
Hello everyone!

I'm just starting to explore FFAStrans and I'd like to thankthe developers for the obvious amount of work put in! It's quite impressive!

Wondering if you could offer any suggestions on how to construct a particular workflow.

I'm looking to set up a watch folder on a network drive that looks at files and runs the mpdecimate filter to look for duplicate frames in footage and then reports the findings in txt file (not actually removing the frames).

The current ffmpeg command I'm using for this is:

-vf mpdecimate -loglevel debug -an -f null - 2>&1 | grep mpdecimate > output.txt

That does the trick for single targeted file but I'm hoping to tie it together in a watch folder drop location for ease of use for the team. I'm currently running a folder processor --> Custom ffmpeg (running the above command in the field) --> Folder for output. So far I'm just getting unknown errors but I feel like there's something I'm missing.

Thanks very much for any help you can provide!

Re: Watch Folder with MPDecimate filter

Posted: Fri Oct 15, 2021 7:31 am
by emcodem
Hey Videng_OP,
no problem but first: welcome to the forum and thank you for using ffastrans :D

You cannot use custom ffmpeg for this as it does not allow you to set the output file (in your case the output is stdout "-") or any other options that come after the output.
So you got to use a commandline processor.

Code: Select all

cmd /C ""%s_ffmpeg%" -i "%s_source%" -vf mpdecimate -loglevel debug -an -f null - 2>&1 | findstr mpdecimate > "%s_source%"_dups.txt"
First, we change grep by findstr. The output txt file is written back to where the original file is and named _dups.txt.
In case the workflow should work with the generated text file after the commandline processor, you need to check "set s_source to" in the cmd processor and give it the value "%s_source%"_dups.txt. Otherwise, the next processor after your cmd will continue working with the file that was dropped into the watchfolder.
Of course, when we write the txt file back to the watchfolder, we must exclude *.txt in the watch settings.

Re: Watch Folder with MPDecimate filter

Posted: Sat Oct 23, 2021 12:25 am
by Videng_OP
Hello emcodem

Yes, that looks like it's working great, thank you so much for your help!