Multiple WatchFolders - I have multiple issues

Questions and answers on how to get the most out of FFAStrans
Post Reply
kalamazandy
Posts: 6
Joined: Tue Jun 18, 2024 6:24 pm

Multiple WatchFolders - I have multiple issues

Post by kalamazandy »

I have attached my current workflow. I am fairly new to FFAStrans, so only Just learned how to name a node, and that I can populate a variable from within the watch folder node, which will simplify this whole workflow a bit.
I know there are several issues here. I plan on populating variables in the folder node.
I would also like to move the original file once transcode is complete so that I know which completed, and probably move to a folder within folder to know if a file failed just by looking at the folders on the network.
Right now I've moving files from the AME output folder, if they are .mp4 since it doesn't create that until it is finished, before using that file. I don't think that's working properly though. It moved the file, but I don't think it attempted to transcode it. Do I have to create another watch folder to watch That folder? I thought I could just use the output of that folder, no?

I copied over a fair amount of files at the end of the day once it looked like things were going to work, but when I came in this morning, only Some files worked, and in odd ways. I've set a user variable as camera_nickname, then for the output folder \\192.168.254.79\MediaStorage\Transcoding\Output_Previews\%s_camera_nickname%
It Seems to have worked, but like I had said in the title, I have multiple things going wrong here.

For example: I dropped 24 files in the 00_DJI_Mini4Pro_wLut folder.
2 of those made it to A2S folder.
8 files made it to the correct M4P (stands for mini pro 4) folder, but it encoded 2 of the files twice, so only 6 files are what I had intended. The 2 files that are duplicates are also the 2 files that ended up in the A2S folder as well.
I have 81 files in the 00_R4D_wLut folder, but only 24 of them completed.

It seems most/all of the files that didn't work I got: Command executor@TEKNA130: Process exited with error code: 3752568763 (ffmpeg stats and -progress period set to 1.7.\r\n[avisynth @ 000001e77f71ebc0] Stream #0: not enough frames to estimate rate; consider increasing probesize\r\nInput....
This all seems to be DJI footage, either from a drone or from the R4D, but quite a few within there also worked fine. I just mentioned it because I saw someone having similar errors due to misreported framerates from the R4D.
Attachments
full_log.json
(238.7 KiB) Downloaded 200 times
ColorWaterPreviews.json
(31.08 KiB) Downloaded 204 times
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Re: Multiple WatchFolders - I have multiple issues

Post by ThomasM »

Hi Kalamazandy,

welcome ot the forum!
kalamazandy wrote: Wed Jun 26, 2024 2:58 pm
I would also like to move the original file once transcode is complete so that I know which completed, and probably move to a folder within folder to know if a file failed just by looking at the folders on the network.
Right now I've moving files from the AME output folder, if they are .mp4 since it doesn't create that until it is finished, before using that file. I don't think that's working properly though. It moved the file, but I don't think it attempted to transcode it. Do I have to create another watch folder to watch That folder? I thought I could just use the output of that folder, no?
You can move the original file to a subsequent folder inside your Watchfolder by using a Command-Executor-Node with a command like this:

Code: Select all

%comspec% /C "
MOVE
"%s_original_full%"
"%s_original_path%\AlreadyProcessedFiles\"
"
Be aware to exclude this folder from the Watchfolder-Node. You can achieve this by ticking "recurse" in the Watchfolder-Node, then "Deny Folders" appears. The Folder has to exist.

Also be aware of "Forget Missing Files" as this will re-encode already transcoded files. In your case you will check this tickbox off.

In your Workflow there are several Populate-Variables-Nodes in sequence. You can minify this by just adding User-Variables one after another in one Populate-Variables-Node. Also it is a good idea to name the nodes properly by Double-Clicking in the Text-Field of a Node. With this done for every node you can check the Log in the Status-Monitor or, even more convenient, in the Web-Interface by @emcodem.

The whole Workflow - I guess - was intended to sort the original files to different folders named by the Camera-Nicknames and should also be processed with watermark and transcodes to h264 for Preview/Proxy. You added a Populate-Variable-Node after the h264-Processor followed by a Command-Executor-Node. Both Nodes do not work as you may expect. In the Variables-Node you put a value for %s_custom_encode_cmd% twice - the second entry will overwrite the first one.

The following Command-Executor cannot execute a

Code: Select all

$regreplace("%s_custom_encode_cmd%","libx264","h264_nvenc")
because it is a FFAStrans-internal-Function.

In the Command-Executor-Nodes you are able to execute CMD (check ss64 on the web for quick reference), or Powershell and so on.

The REGREPLACE-Function works with Regular-Expressions. Check https://regex101.com for example.

If you want to use H264_nvenc you have to do it with a Customized FFMPEG.exe-Command in a Command-Executor. I´m not quite sure if every FFMPEG-Distri is capable of using HWACCEL, just check this first.

Maybe you overlook your Workflow and test it with very small clips first to get to know how things work. Also check the Wiki: https://ffastrans.com/wiki/doku.php

So, happy coding!

Cheers,
Thomas
emcodem
Posts: 1692
Joined: Wed Sep 19, 2018 8:11 am

Re: Multiple WatchFolders - I have multiple issues

Post by emcodem »

ThomasM wrote: Thu Jun 27, 2024 6:01 am You added a Populate-Variable-Node after the h264-Processor followed by a Command-Executor-Node. Both Nodes do not work as you may expect. In the Variables-Node you put a value for %s_custom_encode_cmd% twice - the second entry will overwrite the first one.

The following Command-Executor cannot execute a

Code: Select all

$regreplace("%s_custom_encode_cmd%","libx264","h264_nvenc")
because it is a FFAStrans-internal-Function.

In the Command-Executor-Nodes you are able to execute CMD (check ss64 on the web for quick reference), or Powershell and so on.

The REGREPLACE-Function works with Regular-Expressions. Check https://regex101.com for example.

If you want to use H264_nvenc you have to do it with a Customized FFMPEG.exe-Command in a Command-Executor. I´m not quite sure if every FFMPEG-Distri is capable of using HWACCEL, just check this first.
@ThomasM might just not be aware about the new functionality to disable encoding using s_options explained here:
viewtopic.php?t=1547
Looking at your workflow, this part around the encoding seems to be fine. But as it adds some complexity, it might be a good idea to test everything with normal encoding and only if everything works, move on to the version where we modify the internal encoding cmd.

But yeah, the workflow is already somewhat complex, we need to separate each and every single problem, reproduce it and debug it.
The log you uploaded seems to have processed and delivered everything correctly, it says it delivered the output file:
Output_Previews\R4D\A007C0012_240618_K91R06_WebProxy.mp4

Has this output file not been delivered?
You got more logs of jobs that really did something wrong?
Do you already use webinterface to investigate job logs?
emcodem, wrapping since 2009 you got the rhyme?
ThomasM
Site Admin
Posts: 231
Joined: Wed Feb 22, 2017 6:36 am

Re: Multiple WatchFolders - I have multiple issues

Post by ThomasM »

Hey guys,

sorry for messing this up - I definately was not aware of the workflow from @emcodem :idea: . And yes - the way the UserVariable is built is totally correct.

Maybe... it was too early in the morning :roll:

cheers,
thomas
Post Reply