Skip to content

Instantly share code, notes, and snippets.

@kraj0t
Created May 1, 2022 18:46
Show Gist options
  • Save kraj0t/6393bc724e73d35aaf7760c74958b37e to your computer and use it in GitHub Desktop.
Save kraj0t/6393bc724e73d35aaf7760c74958b37e to your computer and use it in GitHub Desktop.
ffmpeg - Windows batch file - convert m4a audios to videos
@echo off
if not exist *.m4a (
echo This directory contains no m4a files.
) else (
for %%f in (*.m4a) do (
:: Option 1. LOOPING VIDEO
ffmpeg -i "%%f" -stream_loop -1 -i "loop-360p.mp4" -shortest "%%~nf.mp4"
:: Option 2. STATIC BLACK IMAGE
:: ffmpeg -f image2 -loop 1 -i "black.png" -i "%%f" -framerate 1 -shortest "%%~nf.mp4"
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment