Last active
May 8, 2019 14:31
-
-
Save seandewar/728f556bb4c949fcdffa97b59ac568cc to your computer and use it in GitHub Desktop.
Windows Batch file for converting supported video files to MP4 quickly using ffmpeg (without re-encoding). Useful for converting OBS FLV files to MP4.
This file contains 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 | |
rem Windows Batch file for converting supported video files to MP4 quickly | |
rem using ffmpeg (without re-encoding). Useful for converting OBS FLV to MP4 | |
rem | |
rem Recommended directory structure for OBS recordings: | |
rem | |
rem OBS Recordings | |
rem |-- unconverted | |
rem `-- (Configure OBS to save FLVs to this folder) | |
rem |-- converted | |
rem `-- (Converted FLVs will be moved here - delete these if you want) | |
rem `-- out-mp4 | |
rem `-- (MP4 versions of the FLVs will be outputted here) | |
echo quick XXX to mp4 converter using ffmpeg | |
echo written by: https://github.com/seandewar | |
echo ======================================== | |
set indir=.\unconverted | |
set outdir=.\converted | |
set mp4outdir=.\out-mp4 | |
echo indir=%indir% | |
echo outdir=%outdir% | |
echo mp4outdir=%mp4outdir% | |
echo. | |
for %%f in (%indir%\*) do ( | |
echo converting %%f ... | |
ffmpeg -v level+warning -stats -i "%%f" -c copy -copyts "%mp4outdir%\%%~nxf.mp4" -y | |
mkdir "%outdir%" 2>nul | |
move "%%f" "%outdir%\%%~nxf" >nul | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment