Process files in original location

Questions and answers on how to get the most out of FFAStrans
Post Reply
Antax
Posts: 5
Joined: Fri Oct 02, 2020 8:57 pm

Process files in original location

Post by Antax »

I have a 9TB drive with video files scattered through the folder structure. I want to crawl the entire drive and convert certain video types but keep them in the original location. I have tried renaming the file after processing but then it process the newly named file and loops. I have tried overwriting the file when it finishes but it errors saying the file is in use. I have thought about moving the file to another location, processing it and then moving it back but I really don't want to hammer the drive that hard since it is a production drive.

Would anyone have any ideas on how I could get it to process the files and leave them in their current location and still delete the old, larger file?
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Process files in original location

Post by emcodem »

Hi Antax,
welcome to the forum and thank you for using ffastrans!

It depends a little on your workflow, i wonder why you have "the file is in use error" - if you use first a transcode node and then a deliver node, the original file should not be "in use" anymore.
The "monitor folder processor" will only remember file "names" (and not any date modified or such of the file), so i guess the way to go for you is to just replace the original file using the deliver processor and check the "replace existing" checkbox. Please note that this is a dangerous operation in an automated scenario as nobody guarantees that the file was processed 100% correctly. If i would do something like this on a large scale, i would at least compare the duration of the original file with the duration of the created file.

Here is my quick test workflow, it works as expected just replacing the original file.
antax_example.json
(3.28 KiB) Downloaded 321 times
emcodem, wrapping since 2009 you got the rhyme?
Antax
Posts: 5
Joined: Fri Oct 02, 2020 8:57 pm

Re: Process files in original location

Post by Antax »

I was using a command executer to delete the original file. I'll take a look at your example

Thank you
Antax
Posts: 5
Joined: Fri Oct 02, 2020 8:57 pm

Re: Process files in original location

Post by Antax »

The example workflow worked great on my test folders/files. When I changed the path to point to my production data folder it didn't start processing anything. I waited for a few minutes. I have the sleep timer set to 60 seconds. Do I just need to wait longer for it to start finding the files and begin processing?

Also I guess I should add that I'm on v1.1.0.2.7
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: Process files in original location

Post by admin »

Hi Antax,

If it's a very large volume with thousands of files, finding files could take some time. Anything happened yet?
The sleep timer is for STARTING to search for files. That does not mean it will actually find new files every 60 seconds.

-steinar
Antax
Posts: 5
Joined: Fri Oct 02, 2020 8:57 pm

Re: Process files in original location

Post by Antax »

So the process started working but it's processing every mp4 file. I have a conditional that checks the bitrate. If its over 820 then convert it and I have Dispel job instance on false enabled. I had 2 conditionals, one for > 820 and one for <= 820 but it was processing both conditions.

Am I using the conditional correctly?
Convert All.zip
(1.77 KiB) Downloaded 325 times
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Process files in original location

Post by emcodem »

Hey Antax,

you are using the conditional correct but you are checking for the wrong value.
%i_v_bitrate% is in bits/second, not in kbits/second, so the value you want to check for is 820000 instead of 820

You can use a Populate Variables processor and set %s_success% to e.g. %i_v_bitrate% to check on the status monitor whats the value of %i_v_bitrate% and any other variable. Just make sure this populate processor is the last thing your workflow does. Actually for testing you can have this populate processor standalone and submit files to it on the workflow editor, then check the status monitor. It will ease your life when working with variables.
emcodem, wrapping since 2009 you got the rhyme?
Antax
Posts: 5
Joined: Fri Oct 02, 2020 8:57 pm

Re: Process files in original location

Post by Antax »

Thank you, that worked great.

One more thing and maybe I should start a new thread for it but my videos all have different settings too, e.g. bitrate, frame size, frame rates etc. I want to reduce the high res and high frame rate videos but if the original setting is already lower than what I'm setting I don't want to increase the video size. Can I use the Populate variable before a Conditional to put the settings in the H.264 converter?

If bitrate is higher than 800k then set it to 800k, if its lower then set it to what the Populate variable read it to be
if frame rate is higher than 24 then set it to 24, if its lower then set it to what the Populate variable read it to be
if frame height is higher than 1080 then set it to 1080, if its lower then set it to what the Populate variable read it to be
emcodem
Posts: 1811
Joined: Wed Sep 19, 2018 8:11 am

Re: Process files in original __cpLocation

Post by emcodem »

I would probably do it like this. Note that the input pin of the bottom row of the populate variables has been changed to "execute on error". Additionally, the "dispel" checkbox of the conditions shall not be checked.

What i did is to create 4 user variables, called "target_framerate" etc... and set them to the values of interest in all the populate processors.
Antax_example_tripleO.json
(11.36 KiB) Downloaded 328 times
Are you sure you want to change the framerate? Pease check out if the result of a 29.9 or 25 conversion to 24 satisfies the quality you'd expect.
emcodem, wrapping since 2009 you got the rhyme?
Post Reply