Skip to content

Instantly share code, notes, and snippets.

@ianchen06
Created September 15, 2015 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianchen06/c6d1f4e805f07f72b548 to your computer and use it in GitHub Desktop.
Save ianchen06/c6d1f4e805f07f72b548 to your computer and use it in GitHub Desktop.
BAT script for running python qtfaststart on the current directory
@echo off
echo Preparing video for Fast Start...
IF EXIST "Output" (
echo Output directory is present
) else (
echo Writing Output directory
mkdir "Output"
)
:CHECK
IF "%1"=="" (
echo Running in directory mode
GOTO DIRECTORY
) else (
echo Running in single file mode
GOTO SINGLEFILE
)
:DIRECTORY
for %%2 in ("*.MOV", "*.MP4") DO (
python -m qtfaststart "%%~f2"
)
GOTO END
:SINGLEFILE
python -m qtfaststart "%~f1" "%~dp1Output\%~nx1"
GOTO END
:END
Pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment