Advertisement
slyfox1186

ffmpeg_recursively_convert_flac_to_mp3.bat

Jun 1st, 2021 (edited)
622
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.35 KB | None | 0 0
  1. @ECHO OFF
  2. SETLOCAL ENABLEEXTENSIONS
  3. COLOR 0A
  4. TITLE CONVERT FLAC TO MP3
  5.  
  6. :-----------------------------------------------------------------------------------------------------------------
  7.  
  8. REM Created By: SlyFox1186
  9. REM Profile: https://pastebin.com/u/slyfox1186
  10.  
  11. REM Recursively converts all found FLAC files into MP3 using high settings at 320kbps.
  12. REM This will extract any embedded jpg files inside the FLAC files and embed them in the created MP3 file.
  13. REM The original FLAC file will remain untouched.
  14.  
  15. REM You must point the 'FF' variable below to the path of ffmpeg.exe
  16.  
  17. :-----------------------------------------------------------------------------------------------------------------
  18.  
  19. PUSHD "%~dp0"
  20. IF NOT "%1"=="MAX" START /MAX CMD /D /C %0 MAX & GOTO :EOF
  21.  
  22. :-----------------------------------------------------------------------------------------------------------------
  23.  
  24. SET FF="FULL\PATH\TO\ffmpeg.exe"
  25.  
  26. :-----------------------------------------------------------------------------------------------------------------
  27.  
  28. FOR /R %%G IN (*.flac) DO (
  29.     %FF% -hide_banner -y -i "%%~fG" "%AppData%\%%~nG.jpg"
  30.     %FF% -hide_banner -y -i "%AppData%\%%~nG.jpg" -y -i "%%~fG" -ab 320k -map_metadata 0 -id3v2_version 3 "%%~dpnG.mp3"
  31.     RECYCLE -f "%AppData%\%%~nG.jpg" >NUL 2>&1
  32. )
  33.  
  34. COLOR 03
  35. ECHO=
  36. ECHO FFMPEG COMPLETE!
  37. ECHO=
  38. TIMEOUT 300 >NUL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement