GNOME Bugzilla – Bug 588546
Add AC3 audio codec to DVD Muxer
Last modified: 2009-07-20 09:49:49 UTC
Hello, Currently the DVD Muxer does not support AC3 audio, that is in fact the most common audio format for commercial DVD discs. Attached you have a patch that adds AC3 support. Regards, Jordi,
Created attachment 138397 [details] [review] Proposed patch
If the muxer can handle it, it's probably worth adding DTS as well?
Hello Jan, According to some information in the Net[1] on top of DTS also PCM can be used, however I never have seen a DVD encoded with PCM or DTS or tried myself. According to several sources, support for DTS is optional and PCM can vary a lot from player to player. My patch only proposes AC3 because that is what I know for sure and what I have tried myself in several DVD units. If you indicate me which codecs do you think are correct for DTS and PCM, I can try to encode so samples and try them on my DVD player. Regards, Jordi, [1] http://en.wikipedia.org/wiki/DVD_Video#Audio_data
DTS is indeed optional - all DVDs are supposed to carry an AC3 version of any audio track, to support players that don't handle DTS. The PCM they talk about is 'DVD LPCM'. We have the 'dvdlpcmdec' decoder element for it, but not an 'encoder' (even though the encoding is just byte rearrangement). I'm not sure what FFmpeg has for encoding the correct LPCM format. A quick glance suggests they might only support encoding 16-bit LPCM in the muxer (I can only see references to CODEC_ID_PCM_S16BE in the code) DVD LPCM is used mainly for (for example) music concerts, where sound fidelity is important.
Hola Jan, Regarding DTS, do we have an encoder in GStreamer? I have found a a decoder but not an encoder. Regards, Jordi,
No, we have no DTS encoder but support in the muxer might still be useful if someone wants to mux an existing DTS stream.
Hello, Following your indications I have reworked the patch to include DTS and PCM too. I'm additionally removing MP3, since this is not supported by DVD-Video (only MP2). Any comment is appreciated, if it is OK, please do commit it. Regards, Jordi,
Created attachment 138788 [details] [review] Proposed patch for the bug
commit c27b4babf10a17160fd0d984c0926eefc4877d6a Author: Jordi Mas <jordimash@gmail.com> Date: Mon Jul 20 11:48:45 2009 +0200 ffmpegmux: Add proper audio mapping for DVD muxer. Fixes #588546