Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VLC command line batch file to rip audio CD [closed]

Tags:

vlc

Anyone have a batch file to rip a CD using VLC player, so I don't have to rip one track at a time using the GUI?

like image 218
user2574981 Avatar asked Jul 12 '13 03:07

user2574981


People also ask

Can VLC rip and burn CDs?

You can rip a DVD, Blu-ray, music CDs, VCD to a modern digital format like AVI, FLAC, FLV, MP3, MOV, OGG, MP4 for easy backup and sharing, as well as convert video and audio file to another format. All in all, you are only allowed to play and rip DVD via VLC, but can't burn DVD with VLC Media Player directly.

Can VLC rip audio?

VLC can extract audio from any of the many input sources it supports, and write this audio to an audio-file in a variety of formats. In other words, it discards any video content from the input source, and it converts the audio content to the desired format.


1 Answers

Just replace the D: with your CD drive (2 bold italic occurrences):

@ECHO OFF

    setlocal ENABLEDELAYEDEXPANSION

    SET /a x=0

    FOR /R D:\ %%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:
    CALL "C:\Program Files\VideoLAN\VLC\vlc" -I http cdda:///D:/ --cdda-track=!x! :sout=#transcode{vcodec=none,acodec=mp3,ab=128,channels=2,samplerate=44100}:std{access="file",mux=raw,dst="Track!x!.mp3"} --noloop vlc://quit

    :eof
like image 182
Motes Avatar answered Sep 17 '22 14:09

Motes