On 01/15/2011 01:54 AM, Jörn Nettingsmeier wrote:
On 01/13/2011 12:59 PM, Robin Gareus wrote:
On 01/13/2011 11:32 AM, Jörn Nettingsmeier wrote:
You do realize that you can also just use raw PCM
for audio on DVDs:
48 kHz or 96 kHz, 16 or 24 bit, 2-6 channels; but only up to 6144 kbit/s
better yet, i'd like to use five uncompressed
pcm streams, and the
wikipedia article on dvd-video seems to indicate it's possible
oh, you did realize :)
- has anyone done it
stereo PCM: yes. 5chan: no
i'll try it. does anyone have an idea what the format should be? channel
order?
1 2 3 4 5 :) - I don't know.
IIRC 5.1 is L,R,C,LFE,LS,RS - but double check that.
interleaved?
yes
sample rate?
48kSPS or 96kSPS
bit depth?
signed 16 or 24 bits - big-endian
The ffmpeg dvd-muxer is somewhat broken. It produces a lot of "packet
too large" errors when muxing PCM into a mpeg/dvd container. Apparently
one can fix that using ffmpeg's -packetsize -bufsize -muxrate options,
but I never found out the right parameters for those.
What works is using 'mplex' (from mjpeg-tools
http://mjpeg.sf.net ) for
doing the muxing.
Here's a walk-though:
1) generate a raw PCM file of the audio - it needs to be signed
big-endian and (re)name the file to end with .lpcm (mplex does recognize
it by extension) - I used rezound but many tools can do that job.
2) generate a dummy video (black-frame or sth. 720x576) of the same
length as (or longer than) the audio. I sym-linked a black_frame.png to
bf_000.png, bf_001.png, bf_002.png and created a 5 min video with:
ffmpeg -r 1/100 -i /tmp/bf_%03d.png \
-f mpeg2video -an -r 25 -aspect 4:3 /tmp/video.mpg
3) MUX the two together: (adjust the -L param to match the audio format.
e.g. '-L 48000:5:24' for a 5 channel 24 bps file.)
mplex -f 8 -o /tmp/dvdout.mpg -L 48000:2:16 \
/tmp/video.mpg \
/tmp/audio-pcm_s16be.lpcm
4) Master it:
I whipped up a dvdauthor XML file and mastered it with
dvdauthor -o /tmp/dvd/ -x /tmp/movie.xml
mkisofs -dvd-video -o /tmp/dvd.iso /tmp/dvd/
You can use the 'devede' GUI to create dvdauthor XML files and create
the ISO. Note: When adding a file with 'devede' check the
Advanced->Misc->This file is already a DVD-suitable MPEG-PS file
option. Otherwise 'devede' will transcode it again.
5) test it:
ogle /tmp/dvd.iso
Note: you may need to edit your ~/.oglerc and change the audio-driver
from oss to alsa. - `man oglerc` explains how.
It should be possible to put an audio-track without video on a DVD,
'mplex' accepts that, but I could not convince 'dvdauthor' to create a
.vob from that.
If you know or find out how, please let me know.
HTH,
robin
--
Robin Gareus
web:
http://gareus.org/ mail: robin(a)gareus.org
lab:
http://citu.fr/ chat: xmpp:rgareus@ik.nu
Public Key at
http://pgp.mit.edu/ http://gareus.org/public.asc
Fingerprint : 7107 840B 4DC9 C948 076D 6359 7955 24F1 4F95 2B42