Watch Folder with MPDecimate filter

Questions and answers on how to get the most out of FFAStrans
Post Reply
Videng_OP
Posts: 2
Joined: Thu Oct 14, 2021 6:49 pm

Watch Folder with MPDecimate filter

Post by Videng_OP » Thu Oct 14, 2021 7:39 pm

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!

emcodem
Posts: 1120
Joined: Wed Sep 19, 2018 8:11 am

Re: Watch Folder with MPDecimate filter

Post by emcodem » Fri Oct 15, 2021 7:31 am

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.
emcodem, wrapping since 2009 you got the rhyme?

Videng_OP
Posts: 2
Joined: Thu Oct 14, 2021 6:49 pm

Re: Watch Folder with MPDecimate filter

Post by Videng_OP » Sat Oct 23, 2021 12:25 am

Hello emcodem

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

Post Reply