Created
December 3, 2024 09:10
-
-
Save lightsongjs/55241af63761ddfa820e32c7ca0d81de to your computer and use it in GitHub Desktop.
converts all .mkv files in the current directory to .mp4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: This script converts all .mkv files in the current directory to .mp4 format | |
:: using ffmpeg. Make sure ffmpeg is installed and available in the system PATH. | |
setlocal enabledelayedexpansion | |
:: Loop through all .mkv files in the current directory | |
for %%f in (*.mkv) do ( | |
:: Set the base name by removing the file extension | |
set "basename=%%~nf" | |
echo Converting "!basename!.mkv" to "!basename!.mp4" | |
:: Call ffmpeg to convert the file | |
ffmpeg -i "%%f" -c:v copy -c:a copy "!basename!.mp4" | |
) | |
echo All conversions are complete. | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment