Mkvtoolnix Dts To Ac3



If you have Matroska Video (MKV) files encoded with AC3 Dolby Digital 5.1 or DTS audio tracks, you may want to simply extract the audio, convert it to a 2-channel stereo format like WAV, MP3 OGG, etc, and then add it back into the MKV as a separate audio track. This is useful when your media player (e.g. Western Digital Media Player WDAVN00) will not downscale the audio from a digital format like AC3 or DTS to stereo when you don’t have a receiver or TV with a built in Dolby Digital decoder. Now you’ll have the choice of either audio format depending on your technical requirements.

To easily convert MKV DTS to MKV AC3, you will need the help from Avdshare Video Converter. Avdshare Video Converter, as the professional MKV DTS to MKV AC3 converter, can flawlessly convert MKV DTS to the standard MKV AC3 5.1 or to other AC3 variants. AAC3, AEAC3: These will be extracted to raw AC-3 files. AALAC: ALAC tracks are written to CAF files. ADTS: These will be extracted to raw DTS files. AFLAC: FLAC tracks are written to raw FLAC files. AMPEG/L2: MPEG-1 Audio Layer II streams will be extracted to raw MP2 files. This script was designed to be very simple and will automatically convert the first DTS track it finds in a Matroska file to AC3 and append it when run without any arguments. Since this was the most common scenario for the developer it is the default action. Mkvdts2ac3.sh Some.Random.Movie.mkv. For users who wish to change the behavior. Aug 16, 2008 Step 2: Audio, this is the hard part.You need to figure out what type of audio your 4K client can direct play.Keep in mind there are only 3 types of audio codecs being used for 4K video files. They are AAC 5.1, AC3 5.1 and ATMOS 7.1 -ATMOS will only work with a compatible surround sound receiver. AudioMuxer can generate a DVD, MPG or MKV files from a selection of MP3, Flac, (multi-channel) Wav, LPCM, DTSWav, DTS, DTS Master Audio, DTS Hi-Res, AC3 audio tracks. MKV files can be exported to AVCHD or Blu-ray, and an ISO file can be created from the DVD, AVCHD or Blu-ray structure.

The great thing about the Matroska multimedia container is that you can easily manipulate these files without having to re-encode, saving lots of time. I’ll be using mkvextract to extract the AC3 audio, ffmpeg to convert ac3 to mp3, and finally mkvmerge to add and remux the new audio track to the MKV container. All of these are available to a number of platforms, but in my examples, I’m using Linux. Check out the MKVToolnix and FFMpeg websites for more info on the software.

If using Ubuntu Linux, install the relevant mkvtoolnix, mkvtoolnix-guiand ffmpeg packages.

sudo apt-get install mkvtoolnix mkvtoolnix-gui ffmpeg libavcodec-unstripped-52

To view the existing tracks of the MKV, use the mkvmerge -i option. In the following example, you see my “Cool.Video.mkv” file has an MPEG4 video in track 1, an AC3 Dolby Digital audio file in track 2, and subtitles in track 3.

mkvmerge -i Cool.Movie.mkv
File 'Cool.Movie.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: subtitles (S_TEXT/UTF8)

Using mkvextract, extract the AC3 Dolby Digital audio from track 2, saving it to a file called audio.ac3.

mkvextract tracks Cool.Movie.mkv 2:audio.ac3
Extracting track 2 with the CodecID 'A_AC3' to the file 'audio.ac3'. Container format: Dolby Digital (AC3)
Progress: 100%

ls -lh audio.ac3
-rw-r--r-- 1 gmendoza gmendoza 432M 2009-09-26 11:58 audio.ac3

Mkvtoolnix Dts To Ac3 Free

Convert the 6-channel ac3 file to a 2-channel stereo MP3 using ffmpeg. If you prefer a higher audio bitrate, adjust the -ab value as desired. e.g. 256, 384, etc, and adjust the audio rate to your liking as well.

Mkvtoolnix Dts To Ac3 Mp3

ffmpeg -i audio.ac3 -acodec libmp3lame -ab 160k -ac 2 audio.mp3
[output omitted for brevity]

ls -lh audio.*
-rw-r--r-- 1 gmendoza gmendoza 432M 2009-09-26 11:58 audio.ac3
-rw-r--r-- 1 gmendoza gmendoza 87M 2009-09-26 12:08 audio.mp3

To simplify things, you could actually skip the digital format extraction process by running ffmpeg against the MKV file directly.

ffmpeg -i Cool.Movie.mkv -acodec libmp3lame -ab 160k -ac 2 audio.mp3

If you prefer encoding with more advanced options, you could extract the audio as a 2-channel WAV file instead, and then process it with LAME, Oggenc, or some other encoder of your choosing. The following shows the extraction to WAV, and then conversion to various formats for fun, e.g. MP3, OGG, and FLAC.

ffmpeg -i Cool.Movie.mkv -acodec pcm_s16le -ac 2 audio.wav
lame -V0 -q0 --vbr-new audio.wav audio.mp3
oggenc -q6 audio.wav
flac audio.wav

Use mkvmerge to combine the original MKV with the MP3 audio track to create a new file called Cool.Movie.New.mkv. Make sure you have enough disk space for both the original and new MKV file.

mkvmerge -o Cool.Movie.New.mkv Cool.Movie.mkv audio.mp3
mkvmerge v2.4.1 ('Use Me') built on Dec 13 2008 21:03:46
'Cool.Movie.mkv': Using the Matroska demultiplexer.
'audio.mp3': Using the MP2/MP3 demultiplexer.
Warning: 'audio.mp3': Skipping 32 bytes at the beginning (no valid MP3 header found).
'Cool.Movie.mkv' track 1: Using the MPEG-4 part 10 (AVC) video output module.
'Cool.Movie.mkv' track 2: Using the AC3 output module.
'Cool.Movie.mkv' track 3: Using the text subtitle output module.
'audio.mp3' track 0: Using the MPEG audio output module.
The file 'Cool.Movie.New.mkv' has been opened for writing.
Progress: 100%
The cue entries (the index) are being written...
Muxing took 270 seconds.

Verify that the audio track has been added. You can see Track ID 4 has been successfully added.

Dts

mkvmerge -i New.Cool.Movie.mkv
File 'New.Cool.Movie.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: subtitles (S_TEXT/UTF8)
Track ID 4: audio (A_MPEG/L3)

That’s really all there is to it. There are quite a few options available when editing MKV container files. For example, I wanted nice descriptions for my tracks since various media players will read and display them for you during menu navigation. I recommend using the mkvmerge gui application as shown in this screenshot.

It’s really just a front-end application to mkvmerge, and the following text shows the commands that were used to specify the language for each tag, re-order the audio tracks, disable subtitles by default, and give useful descriptions to each Track ID.

mkvmerge -o 'Cool.Movie.New.mkv'
--language 1:eng
--track-name '1:Cool Movie (MPEG4)'
--default-track 1:yes
--display-dimensions 1:40x17
--language 2:eng
--track-name '2:Dolby Digital 5.1 (AC3)'
--default-track 2:yes
--language 3:eng
--track-name '3:English Subtitles'
--default-track 3:no
-a 2 -d 1 -s 3 Cool.Movie.mkv
--language 0:eng
--track-name '0:2-Channel Stereo (MP3)'
--default-track 0:no
-a 0 -D -S audio.mp3
--track-order 0:1,0:2,1:0,0:3

Convert Dts To Ac3 5.1

mkvmerge -i Cool.Movie.New.mkv
File 'Cool.Movie.New.mkv': container: Matroska
Track ID 1: video (V_MPEG4/ISO/AVC)
Track ID 2: audio (A_AC3)
Track ID 3: audio (A_MPEG/L3)
Track ID 4: subtitles (S_TEXT/UTF8)

Free Dts To Ac3

Related posts: