Rip CD/DVD with ffmpeg

4

Is this possible with ffmpeg? Do you have any links that explain how to do this?

I have searched with Google but had not many results.

I just want to be able to convert a CD or DVD to MP3 audio files.

alexandertr

Posted 2014-05-03T20:47:15.283

Reputation: 241

3You want to convert audio CD to mp3 and DVD to mp4? Could you explain? And if this about 2 things- DVD and CD- maybe 2 separate questions are better. – Rajib – 2014-05-04T07:17:48.887

Answers

3

From DVDs, you can access the VOB files directly though, but you have to concatenate them:

cd /path/to/dvd/
cat VOB1.VOB VOB2.VOB VOB3.VOB | ffmpeg -i - -c:a libmp3lame -vn /path/to/output.mp3

For CD, if your ffmpeg was compiled with libcdio support, @M132 gives us a solution:

ffmpeg -f libcdio -ss 0 -i /dev/sr0 dump.flac

To get libcdio with ffmpeg under Windows, check out the Media Autobuild Suite. It can then read from a .cue file.

slhck

Posted 2014-05-03T20:47:15.283

Reputation: 182 472

ffmpeg -f libcdio -ss 0 -i /dev/sr0 dump.flac (works at least on Linux) – m132 – 2014-08-23T05:44:09.823

@M132 Thanks, sounds good. I added it to the post. Will have to try to compile it again at some point. – slhck – 2014-08-23T05:47:29.933

When I call ffmpeg -f libcdio -ss 0 -i /dev/sr0 dump.flac on Windows, I get the following error: Unknown input format: 'libcdio'. – Shimmy – 2017-10-31T15:17:12.843

1@Shimmy As written above, this only works under Linux (/dev/sr0 is Linux-specific) and requires libcdio to be installed on your system as well as ffmpeg compiled with --enable-libcdio. – slhck – 2017-10-31T16:08:46.753

Thank you. Is there a trustable compiled ffmpeg download for Windows with all flags and all codecs enabled? – Shimmy – 2017-10-31T16:11:39.360

1

@Shimmy This building suite works for Windows: https://github.com/jb-alvarado/media-autobuild_suite — but you have to compile yourself.

– slhck – 2017-10-31T17:04:00.270

1There is this in configure: --enable-libcdio enable audio CD grabbing with libcdio, but I know nothing of it and haven't investigated. Might be worth a look. – llogan – 2014-05-06T03:48:04.790