zink's Blog

Anything stupid

Creating fake Audio DVDs

2013-09-23 by zink, tagged as audio, linux

I tried to create DVDs containing only audio. After fiddling around with dvda-author I realized that my DVD player isn't able to play DVD-A.
Playing around with graphical tools for DVD authoring was disappointing for me. Most of them simply weren't able to create videos containing highres audio (448kBit/s) and lowres video (320kBit/s)
As media I'm using MiniDVDs, which are great in size (form factor).



To use my "script" you need the following file tree:

 +-+ cd1
 | +- 01.flac
 | +- 02.flac
 | +- 03.flac
 +-+ cd2
 | +- 01.flac
 | +- 02.flac
 | +- 03.flac
 +- cover.jpeg
You will also need the following script:
# audio2dvd
# This script converts the selected audiofile together with
# a selected cover to a dvd compliant mpeg2video
# usage: audio2dvd /path/to/cover

for i in *.flac;
  ffmpeg  -threads 4 -y -loop 1 -r 2 -i $1 \
          -i $i -shortest -target pal-dvd \
          -b:v 320k -aspect 4:3 `basename $i .flac`.mpeg;
To run the complete process:
$ convert cover.jpeg -resize 720x576\! cover.jpeg
$ cd ./cd1/
$ audio2dvd ../cover.jpeg
$ cd ../cd2/
$ audio2dvd ../cover.jpeg
$ cd ..
$ dvdauthor -o ./dvdv -t ./cd1/*.mpeg ./cd2/*.mpeg
$ dvdauthor -o ./dvdv -T
$ mkisofs -o dvdv.iso -dvd-video ./dvdv/
$ cdrecord dvdv.iso
You will get nearly 70 songs onto one MiniDVD (even more if you add your choice: -a:b 192k/224k/320k), which is really great, as most new Electro/House/Metal/whatever compilations are published on 3 Discs. Have fun!