Skip to content

Instantly share code, notes, and snippets.

@willnode
Created March 16, 2018 05:48
Show Gist options
  • Save willnode/e3e8e7b9590d4eeaaf39cd61e9df4f01 to your computer and use it in GitHub Desktop.
Save willnode/e3e8e7b9590d4eeaaf39cd61e9df4f01 to your computer and use it in GitHub Desktop.
RIP Ogg files in a folder to single mp3 using FFMPEG. (Caveat: check for single quotes in any file or concatting won't work)
for %%* in (.) do set CurrDirName=%%~nx*
for %%v in (*.ogg) do ffmpeg -loglevel panic -i ^"%%v^" -vn -ar 44100 -ac 2 -ab 192k -f mp3 ^"%%~nv.mp3^"
for %%v in (*.mp3) do echo file ^'%%v^'>>list.txt
ffmpeg -safe 0 -f concat -i list.txt -c copy "%CurrDirName%.mp3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment