Useful Batch Files

How To Use:

Create a new text file and copy your desired text below into file. Rename text file with your chosen file name, but change the EXTENSION from *.txt to *.bat and double click file when you are ready to use. PLEASE USE CAUTION!!! This will create a copy of new files into a new sub-directory “FIXED” with the same file name as the original file.
 


 

Increase volume MP3

NOTES: This code will INCREASE volume to all MP3’s in directory. Change the “volume=??.?” to what ever you desire. Below is 5.8 which is equivalent to 580% of the original volume.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mp3”) do “PATH TO FFMPEG.EXE” -i “%%f” -af “volume=5.8” “fixed\%%~nf.mp3”

REM ———–END COPY HERE———–

 


 

Increase volume MP4

NOTES: This code will INCREASE volume to all MP4’s in directory and copy new files into a new sub-directory “FIXED” with the same file name. Change the “volume=??.?” to what ever you desire. Below is 5.8 which is equivalent to 580% of the original volume.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mp4”) do “PATH TO FFMPEG.EXE” -i “%%f” -vcodec copy -af “volume=5.8” “fixed\%%~nf.mp4”

REM ———–END COPY HERE———–

 


 

Copy all MP4’s to MKV

NOTES: This code will convert all MP4 files to MKV. THIS WILL RE-ENCODE! That will take time, depending on machine and file size. THIS DOES INCLUDE SUBTITLES! If the MP4 does not have subtitles embedded, that part will be ignored.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mp4”) do “PATH TO FFMPEG.EXE” -i “%%f” -strict experimental -f matroska -map_chapters -1 -map 0:0 -map 0:1 -map 0:2 -c:s:0 srt -c:a:0 aac -b:a:0 192k -c:v:0 copy -y “fixed\%%~nf.mkv”

REM ———–END COPY HERE———–

 


 

Convert all MKV’s to MP4

NOTES: This code will convert all MKV files to MP4. THIS WILL RE-ENCODE! That will take time, depending on machine and file size.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mkv”) do “PATH TO FFMPEG.EXE” -i “%%f” -c:a copy -c:v libx264 -flags global_header -pix_fmt yuv420p -shortest “fixed\%%~nf.mp4”

REM ———–END COPY HERE———–

 


 

Convert all MKV’s to MP4 WITHOUT Re-Encoding

NOTES: This code will convert all MKV files to MP4. This does NOT re-encode! This is much faster than the above code.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mkv”) do “PATH TO FFMPEG.EXE” -i “%%f” -c:a copy -c:v copy “fixed\%%~nf.mp4”

REM ———–END COPY HERE———–

 


 

Convert all MP3’s to MP4 

NOTES: This code will convert all MP3 files to MP4. You need to specify an image file!  The larger the file, the longer this will take. Change the “!folder.jpg” to whatever file name you have IN THE SAME DIRECTORY! Or specify a path to the image file.

REM ———START COPY BELOW———

@echo off
if not exist “fixed” mkdir fixed
for %%f in (“*.mp3”) do “PATH TO FFMPEG.EXE” -i “%%f” -loop 1 -i “!folder.jpg” -vf “scale=trunc(iw/2)*2:trunc(ih/2)*2” -map_metadata -1 -c:a copy -c:v libx264 -flags global_header -pix_fmt yuv420p -shortest “fixed\AUDIO — %%~nf.mp4”

REM ———–END COPY HERE———–

 


 

MORE COMING SOON!

 

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *