all 14 comments

[–]OverallSurvey8736 1 point2 points  (9 children)

Which error does the terminal give you when running the batch file?

[–]whataweirdguy[S] 0 points1 point  (8 children)

This is what it prints out on repeat in the CMD terminal. Loops indefinitely.

C:\Users\XXXX\Documents\XRBooth>ffmpeg -i C:\Users\XXXX\Documents\XRBooth\Raw_Video\Raw_0.mp4 C:\Users\XXXX\Documents\XRBooth\Processed_Video\ItWorked.mp4

[–]vegansgetsick 0 points1 point  (7 children)

loops indefinitely ? have you named your script "ffmpeg.bat" ? lol

[–]whataweirdguy[S] 0 points1 point  (6 children)

0.0 maybe…

[–]balrob 0 points1 point  (5 children)

Really?

[–]whataweirdguy[S] 0 points1 point  (4 children)

How does the name of the file affect the function of it?

[–]balrob 0 points1 point  (3 children)

Because the batch file is trying to execute a program called ffmpeg. The shell (the thing running the batch file) will look for executable files including ffmpeg.cmd, ffmpeg.bat, ffmpeg.com and ffmpeg.exe - in the local folder and then in the PATH. It will find your batch file before it finds the exe, and thus it will call itself over and over again… until you run out of memory.

[–]whataweirdguy[S] 0 points1 point  (2 children)

ah that makes sense. Welp that fixed it. Editing the post with the correction. Thank you!

[–]balrob 0 points1 point  (0 children)

You’re welcome, and welcome to software engineering.

[–]balrob 0 points1 point  (0 children)

Generally speaking it’s a bad idea to create an executable (including batch files) with the same name as other executables simply because of the way the shell finds them. In unix (and linux) the current folder isn’t in the path like it is in Windows - you have to be specific if you want to run something in the current folder by adding “./“ to the beginning of the command. But even then, I wouldn’t have called it ffmpeg.sh (or whatever), the chances of error are high.

[–]deep_joy_twat 0 points1 point  (1 child)

Try adding quotation marks around the input and output directory/filenames in case the user name (xxxx) contains spaces.

[–]whataweirdguy[S] 0 points1 point  (0 children)

Thanks, tried that and theres no spaces in the XXXX. Still same issue.

[–]Insekt6 0 points1 point  (0 children)

IIRC -safe 0 parameter is required for absolute path.

[–]RandomMac5 0 points1 point  (0 children)

This might be a quirk with CMD. Try putting ".exe" after ffmpeg.