Hishiro64 / av1an-win-script

A Batch script that sets up Av1an with all it's dependencies in a portable workspace
GNU General Public License v3.0
33 stars 4 forks source link

No output is produced with defaults #18

Open JohnTravolski opened 1 week ago

JohnTravolski commented 1 week ago

I downloaded the zip archive just today, ran install.bat (it looked like everything downloaded correctly), and then put a video file (HEVC) into the av1an-winscript\scripts\av1an-batch\input directory. I ran the encode.bat file with the defaults but no file was produced in the output folder. This was the console output:

-----------------------------------
 Encoding | 1 left in queue
-----------------------------------
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
av1an -i "input\hevc_crf9.mp4" -o "./output/output-hevc_crf9_1.mkv" -e svt-av1 -y --resume --verbose -c mkvmerge -m lsmash -a " -c:a copy " -v " --preset 4 --crf 25 --rc 0 "
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Finished Encoding

Press any key to continue . . .

If I copy that command and try to run it directly, I get absolutely no console output at all:

PS C:\Users\John\Downloads\av1an-winscript\dependencies\av1an> .\av1an.exe -i "C:\Users\John\Downloads\av1an-winscript\scripts\av1an-batch\input\completed-inputs\hevc_crf9.mp4" -o "out.mkv"
PS C:\Users\John\Downloads\av1an-winscript\dependencies\av1an>

This is the contents of the last_run file:

av1an -i "input\hevc_crf9.mp4" -o "./output/output-hevc_crf9_1.mkv" -e svt-av1 -y --resume --verbose -c mkvmerge -m lsmash -a " -c:a copy " -v " --preset 4 --crf 25 --rc 0 " 

This is the contents of the params.txt file:

-e svt-av1 -y --resume --verbose -c mkvmerge -m lsmash -a " -c:a copy " -v " --preset 4 --crf 25 --rc 0 "

Any idea what I'm doing wrong? Here's what the directory structure looks like in case you notice anything off:

image

Hishiro64 commented 6 days ago

One thing you can try is to navigate into \dependencies\av1an in Windows file explorer, and manually double-click on the av1an.exe at least once.

If I remember correctly, Microsoft SmartScreen will silently block executables when you try to run them through a shell. So clicking on it from explorer should trigger up the SmartScreen pop-up to allow you to click Run anyway. After that you should get a few dll missing errors since they get linked in the encode script, just click the ok button through those. Then you can try running \scripts\av1an-batch\encode.bat again and see if that fixed it.

You should also re-clone and run the install.bat again as some dependencies were updated today.

JohnTravolski commented 6 days ago

Just re-downloaded it and ran install.bat. Everything appeared to install correctly again.

Windows defender is not enabled on the system I'm testing this on, so there was no smart screen warning when double clicking it. However, I did get the dll missing errors, which I don't get when running from the shell.

image

image

image

image

Unfortunately, even after clicking through these errors, running the encode.bat script still failed to produce output. I'm not sure what else to check now.

Hishiro64 commented 6 days ago

Make a copy of encode.bat, then rename the copy. Right-click the new bat file and edit with notepad. Delete the contents, and replace it with this:

@echo off
TITLE Av1 Encode

cls

setlocal enabledelayedexpansion

:: Set path 
set "AV1=%~dp0"

:: Correct path
cd "%AV1%"

:: Set the base path variable
set PATH=%AV1%\..\..\dependencies

:: Append paths
for /D %%G in ("%AV1%\..\..\dependencies\*") do (
    set PATH=!PATH!;%%G
)

:: Append vapoursynth.dll path
set PATH=!PATH!;%AV1%\..\..\dependencies\vapoursynth64\Lib\site-packages

av1an -h

PAUSE

Save and run it. It should output the help text, which would mean that the dll files were found.

If so start reducing the arguments in params.txt :

-e svt-av1

You can also try a different input file.

JohnTravolski commented 6 days ago

The only output I get is "press any key to continue":

image

I see a crash dump (.dmp file) was created in appdata local.

Same thing if I double click the batch file instead of run it from Powershell.

Could it be that something on my system path is interfering with this? I have ffmpeg on my system path, for example.

Hishiro64 commented 6 days ago

The edited script should have output the help text followed by press any key . Like this:

image

I think it's not finding the dll files. See if the dll files exist, for each one that popped up.

It should be found in these directories:

\dependencies\vapoursynth64\Lib\site-packages\
\dependencies\vapoursynth64\
\dependencies\ffmpeg-7.0.2\

System path could be interfering, but I read the encode script again, and I'm pretty sure it omits current path while its running.

Since install.bat does hide some errors, you can remove @echo off, and every case of > nul, to read the full output of install.bat before running it. It's not the first time something in the System path caused the install part of the script to fail. #11

I have no clue about the crash dump file. Didn't find it in appdata local.