Skip to content

Instantly share code, notes, and snippets.

@peaeater
Created March 7, 2018 15:51
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save peaeater/231722749233f9378a952107ab3a829f to your computer and use it in GitHub Desktop.
Windows batch file that uses VLC to rip an audio CD
@ECHO OFF
setlocal ENABLEDELAYEDEXPANSION
SET /a x=0
FOR /R E:\ %%G IN (*.cda) DO (CALL :SUB_VLC "%%G")
GOTO :eof
:SUB_VLC
call SET /a x=x+1
ECHO Transcoding %1
REM Here's where the actual transcoding/conversion happens. The next line
REM fires off a command to VLC.exe with the relevant arguments:
REM CALL "C:\Program Files\VideoLAN\VLC\vlc" -I http cdda:///E:/ --cdda-track=!x! :sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access="file",mux=raw,dst="Track!x!.mp3"} vlc://quit
CALL "C:\Program Files\VideoLAN\VLC\vlc.exe" -I dummy cdda:///E:/ --cdda-track=!x! :sout="#transcode{acodec=mp3}:std{access=file,mux=raw,dst=Track!x!.mp3}" vlc://quit
:eo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment