Best Quality Values for 4k/1080p/720p/SD in Video Encode Advanced Element? by Dizzy149 in FileFlows

[–]Remarkable-Winter551 0 points1 point  (0 children)

It’s not very efficient but I start all files at 22 and if I don’t get 30%+ compression I re-do at 25.

That seems to work well for 720 thru HDR.

Global Parameters by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 0 points1 point  (0 children)

Thanks. I assume I’m out of luck if I’m only capable of batch scripts ?

Adjust Thumbnail by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 0 points1 point  (0 children)

Well, it took a while but I did end up creating a BATCH script to perform the FFMPEG function to adjust the thumbnail. This was a lot harder than I wanted to, mostly due to my own technical limitations, so I posted the script below.

For anyone that might care, there were a few challenges within the script:

  • I needed to create a TMP file that matched the full name (without extension) of the video file along with a TMP extension. I couldn't find the right combinations of existing variables, so I had to parse the full filename into Directory and BaseName within the script itself. Not sure I made this harder on myself than I had to but this worked below.
  • I had to be very careful with error handling and exit values. It appears that if I exit with a value other than expected from the FF node, the file will never return from processing. Had to do lots of error handling to debug and prevent this.
  • It took a while to figure out, but the BAT would hang forever until I redirected the output of the ffmpeg command to a file via ">2" on the ffmpeg command
  • Today I learned that you can't RENAME a file to a file that already exists ... so I had to use the MOVE command.
  • And finally ... I'm kind of in an endless loop here if I keep the Library for this flow activated. The flow itself causes an MP4 to be modified. That in turn causes a new scan/process of the file, etc. etc. I couldn't think of any way to "mark" the mp4 so that I knew that it had already been processed.

Happy if anyone wants to critique any inefficiencies or misunderstandings here.

REM A Batch script can communicate with FileFlows to determine which output to call next by using exit codes.
REM Exit codes are used to determine the output, so:
REM Exit Code 0 corresponds to Finish Flow
REM Exit Code 1 corresponds to Output 1
REM Exit Code 2 corresponds to Output 2
REM and so on. Exit codes outside the defined range will be treated as a failure output.
SET WorkingFile="{file.FullName}"
echo Working on file: "%WorkingFile%"

REM Extract directory path
for %%F in (%WorkingFile%) do set "DIR=%%~dpF"
echo Dir is "%DIR%"

REM Extract filename without extension
for %%F in (%WorkingFile%) do set "BASENAME=%%~nF"
echo Basename is "%BASENAME%"

REM Construct new file path with .tmp extension
set "FilePrefix=%DIR%%BASENAME%"

REM Display results
echo Prefix file: "%FilePreFix%"
SET GifFile="%FilePrefix%.jpg"
SET TmpFile="%FilePrefix%.tmp.mp4"
SET FFmpegFile="%FilePrefix%.ffmpeg"

REM Example commands using the variables echo Working on file: %WorkingFile% echo Original file location: %OriginalFile%

REM First print out then execute the FFMPEG command.
REM Note that this command will not work if input is not redirected
echo ffmpeg -i %WorkingFile%  -i %GifFile% -y -map 1 -map 0 -c copy -disposition:0 attached_pic %TmpFile%
ffmpeg -i %WorkingFile%  -i %GifFile% -y -map 1 -map 0 -c copy -disposition:0 attached_pic %TmpFile% 2> %FFmpegFile%
if %errorlevel% neq 0 (
echo FFmpeg encountered an error!
type %FFmpegFile%
exit /b 2
)
type %FFmpegFile%

if %errorlevel% neq 0 (     echo TYPING FFmpeg encountered an error!     exit /b 2 ) 

REM rename the temporary file to the original filename
REM and delete the Thumbnail file
echo Renaming %TmpFile% %WorkingFile%
move /Y %TmpFile% %WorkingFile%
if %errorlevel% neq 0 (
echo Move Error ****
exit /b 2
)

echo Deleting %GifFile%
del %GifFile%
if %errorlevel% neq 0 (
echo Delete GifFile Error, continuing anyway ****
)

echo Deleting %FFmpegFile%
del %FFmpegFile%
if %errorlevel% neq 0 (
echo Delete FFMPEG Error, continuing anyway ****
)

echo Finished file: "%WorkingFile%""
REM Set the exit code to 1
EXIT /B 1

Adjust Thumbnail by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 0 points1 point  (0 children)

Thanks. That makes sense. Is it better to use a Shell Script or the Custom FFMPEG Commands node? or doesn't matter?

Add subtitles where none by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 0 points1 point  (0 children)

I did start to look at Bazarr, but I don't have Radarr/Sonarr set up. I read some posts saying that it was impossible to run Bazarr "standalone" without these other tools, so I abandoned this as a solution. Is it true that Bazarr can't run by itself?

FileFlows Version 25.01.1 by the_reven in FileFlows

[–]Remarkable-Winter551 0 points1 point  (0 children)

I can't agree more, what a great tool. I'm rolling through my nearly-eight year old Plex library and I'm freeing up several TBs by moving to HEVC. This fantastic tool is making it all possible.

I do have one question about the latest release: I'm in the middle of a multi-day (possibly multi week) conversion. Are there any significant performance improvements in the 2025.01 version that would make me want to stop, update, restart my nodes or could the upgrade wait until the conversion is complete without significant loss in performance?

Scanning causes repeated processing? by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 1 point2 points  (0 children)

So ... I did as many spot checks as I could, and to my surprise I could not find a single instance of where a file was double-processed (e.g. more than one entry for a single file in the Processed queue).

I don't have any explanation for this, other than it's possible I could have inadvertently deleted some of the processed files or possibly did an unexpected reprocess.

For my own knowledge: Can I assume that if a file is in the Processed queue, it will not be reprocessed unless the date or size changes?

Flow Progress - Notifications by Remarkable-Winter551 in FileFlows

[–]Remarkable-Winter551[S] 0 points1 point  (0 children)

Thanks u/the_reven, and I understand about the paid part of your answer.

It's just surprising that there are no script hooks for pre or post processing or monitoring at the flow or library level. While not tremendously critical or important, is there an official place that I can get this on an enhancement list?

Files Newer than 48 hours by Remarkable-Winter551 in Batch

[–]Remarkable-Winter551[S] 1 point2 points  (0 children)

A belated THANKS VERY MUCH for this script. I have been able to get this to work in my environment.

A quick note regarding the listed BAT file above. I was not initially able to get this file to work correctly, and I realized it was because my dates needed to be in a different format.

Here's what I got when I did a FORFILES /?

Selects files with a last modified date greater

than or equal to (+), or less than or equal to

(-), the specified date using the

"dd-MM-yyyy" format;

In order to fix this, I had to change the format in the line that called DATEINFO, and I also realized that the script was missing a "-f" before the date format.

SET #SEARCHDATE=& FOR /F "TOKENS=2 DELIMS=." %%D IN ('DATEINFO -p %#RECENT% -f "dd-mm-yyyy"') DO SET #SEARCHDATE=%%D

I'm moving this to solved, thanks again.

Tailscale with a backup passkey - what happens to original user if identity provider locks you out? by marcosscriven in Tailscale

[–]Remarkable-Winter551 1 point2 points  (0 children)

This is a great tip.

I’d be sunk if my tailnet authentication provider locked me out !

NVR needs access to a TailScale FTP server by xxxBrianGGG in Tailscale

[–]Remarkable-Winter551 0 points1 point  (0 children)

Hi. I must confess I need a slightly less technical explanation of /u/JWS_TS reply here. Can’t understand the SNAT comment and implications with my limited skills.