Eac3to/How to Use

Software needed to run eac3to
Taking the most out of eac3to involves using several external filters. These can be audio decoders and encoders or media splitters and muxers. As eac3to puts quality on top, it uses the best audio decoders available, but since most of them are commercial software, there also freeware alternatives (usually of lower sound quality though). Depending on what is the user's goal more or less of the filters below are needed. Evaluation of them is based on the comprehensive testing of the Doom9 forum members.

Audio Decoders
AC3 decoding can be achieved through:
 * Nero 7 (version 7.8.5.0 or newer, Nero 8 won't work) accompanied with Nero Blu-ray / HD DVD plugin (commercial software)
 * libav / ffmpeg decoder (freeware, ships with eac3to package)

E-AC3 decoding can be achieved through:
 * Nero 7 (version 7.8.5.0 or newer, Nero 8 won't work) accompanied with Nero Blu-ray / HD DVD plugin (commercial software)
 * Libav / ffmpeg decoder (freeware, ships with eac3to package)

TrueHD decoding can be achieved through:
 * Nero 7 (version 7.8.5.0 or newer, Nero 8 won't work) accompanied with Nero Blu-ray / HD DVD plugin (commercial software)
 * Libav / ffmpeg decoder (freeware, ships with eac3to package)

DTS decoding can be achieved through:
 * Nero 7 (version 7.8.5.0 or newer, Nero 8 won't work) accompanied with Nero Blu-ray / HD DVD plugin (commercial software)
 * Libav / ffmpeg decoder (freeware, ships with eac3to package)
 * "Sonic Cinemaster Audio Decoder 4.3" DirectShow filter (commercial software)
 * ArcSoft TotalMedia Theatre (commercial software)

DTS-HD decoding can be achieved through:
 * "Sonic Cinemaster Audio Decoder 4.3" DirectShow filter (commercial software)
 * ArcSoft TotalMedia Theatre (commercial software)

FLAC decoding can be achieved through the official Free Lossless Audio Codec (ships with eac3to package)

Audio Encoders

 * For AC3 encoding Aften - A/52 Audio Encoder is needed. (freeware, ships with eac3to package)
 * For DTS encoding SurCode DVD DTS (version 1.0.21 or newer) is needed. (commercial software)
 * For FLAC encoding Free Lossless Audio Codec is needed. (freeware, ships with eac3to package)
 * For AAC encoding Nero AAC Encoder is needed. (freeware, no longer available - only as external download)

Splitters and Muxers

 * For Matroska muxing, Haali Matroska Muxer is needed (it's part of Haali Media Splitter package).

Command Line Syntax
There are basically 3 ways to use eac3to depending on the input file(s): 1. audio or video file, 2. Container file or 3. Disc folder.

Using audio or video files as input
In this category we deal with inputs like simple audio files (AC3, TrueHD, DTS-HD, WAV, etc.) or simple video files (e.g. raw H.264, VC-1 or MPEG-2 streams). In this case the command line will look like this:


 * ~ It's the file to be processed. eac3to can accept various audio formats like RAW, (L)PCM, WAV (PCM only), W64 (like WAV without the 4 GB limit), RF64 (like W64), AC3, E-AC3, DTS, DTS-ES, DTS-96/24, DTS-HD Hi-Res, DTS-HD Master Audio, MLP, TrueHD, TrueHD/AC3, FLAC, video formats like VC-1, H.264, MPEG-2.
 * ~ Multiple input files (of the same format) are accepted. This is useful when the input file is split among several parts. Use the + symbol to add more.
 * ~ This is the output file that eac3to will create. It could be an audio format like RAW, (L)PCM, WAV (PCM only), WAVs (multiple mono WAV files, PCM only), W64, RF64, AC3, DTS, FLAC, video format like VC-1, H.264, MPEG-2 or Matroska (MKV) container. eac3to can also output audio (only) data to stdout for further processing by other applications.
 * ~ Here you can set the options that tell eac3to how to operate. Not all of them are applicable to all input / output formats. If none set, the default is used when necessary. When using an audio or video file as input, the following options are available:

Examples


 * Convert an AC3 track to a 384 kbps AC3 one, using Nero AC3 decoder (default) and Aften AC3 encoder:


 * Convert an E-AC3 track to a 1536 kbps DTS one, using Nero E-AC3 decoder (default) and Surcode DTS encoder:


 * Convert a DTS-HD Master Audio track to a FLAC one, using ArcSoft DTS-HD decoder (default) and FLAC encoder:


 * Convert a DTS track to a AC3 one, using libav encoder:


 * Convert a TrueHD track to a 640 kbps AC3 one, using Nero TrueHD decoder (non default) and Aften AC3 encoder:


 * Decode a 24 bit 96 kHz MLP track using MLP libav / ffmpeg decoder (default), downsample it to 16 bit 44.1 kHz and output data to stdout (e.g. for encoding to MP3, ACC or OGG format):


 * Extract the DTS core of a DTS-HD track:


 * Extract the AC3 core of a TrueHD track:


 * Delay an E-AC3 track by +178ms:


 * Reverse PAL speedup to an E-AC3 track and convert it to a 192 kbps AC3 one, using Nero E-AC3 decoder (default) and Aften AC3 encoder:


 * Convert a 16 bit 48 kHz 5.1 LPCM track to 6 mono WAV tracks, when eac3to detects the LPCM track parameters automatically:


 * Convert a 16 bit 48 kHz 5.1 LPCM track to 6 mono WAV tracks, when eac3to can't figure out the LPCM track parameters (manual setting is necessary):


 * Convert a Blu-ray 7.1 PCM track to a 5.1 640 kbps AC3 one, using Aften AC3 encoder:


 * Multiplex a VC-1 video stream to MKV container while removing the pulldown flags (default behavior):


 * Multiplex an H.264 video stream to MKV container while keeping the pulldown flags:

Using container files as input
These files contain one or more audio and video streams (tracks). By setting such file as input, eac3to can list all streams inside and give numbers (stream/track number) to each one. This way the user can explicitly set which stream wants to process. eac3to command line will look like this:


 * ~ Container inputs can only be in EVO, M2TS, TS and VOB format.
 * ~ Multiple input files (of the same format) are accepted. This is useful when the input file is split among several parts (e.g. a set of 2 main movie EVO files in a HD DVD or 2 or more M2TS parts of a seamless branching Blu-ray Disc). Use the + symbol to add more. With Blu-ray Disc we can use also like input the .mpls files in PLAYLIST folder.
 * ~ This is the output file that eac3to will create. It could be an audio format like RAW, (L)PCM, WAV (PCM only), WAVs (multiple mono WAV files, PCM only), W64, RF64, AC3, DTS, FLAC, video format like VC-1, H.264, MPEG-2 or Matroska (MKV) container. eac3to can also output audio (only) data to stdout for further processing by other applications.
 * ~ It applies only to container source files and refers to the tracks/streams inside them.
 * ~ Here you can set the options that tell eac3to how to operate. Not all of them are applicable to all input / output formats. If none set, the default is used when necessary.

The logic behind this is simple: Using the various streams inside the container as source, eac3to can output one or more of them to their original or not format. Here rises the question: How can i choose the stream i want? This can be done using the stream/track numbers (e.g. 3: ). The output files can be from all audio and video formats that have been used in the previous case. All options listed in the previously plus the following can be used when we are dealing with container inputs:

To get an idea how the stream/track list looks like when we feed eac3to with container files will use the 2 main movie EVO files of an HD DVD. Running  we get:

EVO, 1 video track, 3 audio tracks, 5 subtitle tracks, 1:55:33 1: Joined EVO file 2: h264/AVC, 1080p24 /1.001 (16:9) with pulldown flags 3: E-AC3, 5.1 channels, 1536kbps, 48khz, dialnorm: -27 dB, -65ms 4: E-AC3, 5.1 channels, 768kbps, 48khz, dialnorm: -27 dB, -76ms 5: AC3, 2.0 channels, 192kbps, 48khz, dialnorm: -27 dB, -92ms 6: Subtitle 7: Subtitle 8: Subtitle 9: Subtitle 10: Subtitle

Here we are informed of all video, audio and subtitle stream inside our source files. To process one of them we just have to add the appropriate number before the output file, like this:

In the following examples various containers are used as source and we have already obtain the stream numbers.


 * Demux 1st video track and all audio tracks of a set of two HD DVD EVO files:


 * Demux the H.264 video stream [id 2] of a blu-ray M2TS file:


 * Demux the VC-1 video stream [id 2], TrueHD audio track [id 3] and E-AC3 audio track [id 5] of a 3 part seamless branching Blu-ray movie (files 00001.m2ts, 00002.m2ts and 00003.m2ts) to the specified directories:


 * Convert 1st video track of an EVO file to MKV, convert all lossless audio tracks to FLAC and demux all compressed audio tracks at once:


 * Convert an HD DVD video stream [id 2] (set of two EVO files) to MKV and also convert a DTS-HD audio track [id 4] to a FLAC one:


 * Convert an HD DVD VC-1 video stream [id 3] (set of two EVO files) to MKV while skipping the first 3 erroneous sequence headers, convert a TrueHD audio track [id 4] to a FLAC one while downconverting it from 24 bit to 16 bit and convert an E-AC3 audio track [id 5] to a 768 kbps DTS one using libav / ffmpeg E-AC3 decoder (non default):

Using complete disc structure as input
This is the most exciting possibility of eac3to and requires complete disc structure, like HD DVD or Blu-ray Disc. Why is exciting? Because we get the correct playback order of the numerous M2TS parts (seamless branching Blu-ray Discs) automatically. Also we get additional info like chapters and subtitle and audio track languages.

It takes 3 steps: 1. Read the root folder of the disc. This way you get a list of all available titles/playlists in the disc. 2. Select the appropriate title/playlist. This actually means you select the actual files (containers) to process. 3. Convert/edit and output the streams inside the container to a different format.

As examples we 'll use an HD DVD (Galapagos) and a Blu-ray Disc (Rambo IV), both ripped to the hard disc.

STEP 1: By typing  the title playlist of the disc is generated.

1) EPISODE1.EVO+EPISODE2_1.EVO+EPISODE2_2.EVO+EPISODE3.EVO, 2:26:44   "PlayAll"    - VC-1, 1080i (16:9)    - E-AC3, 2.0, 48 kHz 2) EPISODE1.EVO, 0:49:02 "Episode1" - VC-1, 1080i (16:9) - E-AC3, 2.0, 48 kHz 3) EPISODE2_1.EVO+EPISODE2_2.EVO, 0:48:55   "Episode2"    - VC-1, 1080i (16:9)    - E-AC3, 2.0, 48 kHz  4) EPISODE3.EVO, 0:48:47 "Episode3" - VC-1, 1080i (16:9) - E-AC3, 2.0, 48 kHz 5) PLANETEARTHTRL.EVO, 0:01:02   "Planet Earth Trailer"    - VC-1, 1080p (16:9)    - E-AC3, 2.0, 48 kHz

STEP 2: By adding the title number you want, the above command changes to  and the stream/track list of the specific title is generated.

EVO, 1 video track, 1 audio track, 1 subtitle track, 0:48:58 "Episode2" 1: Joined EVO file 2: Chapters, 6 chapters with names 3: VC-1, 1080i60 /1.001 (16:9) 4: AC3, 2.0 channels, 448kbit/s, 48khz, dialnorm: -27 dB 5: Subtitle, English

STEP 3: Finally, choose the tracks that are going to be processed and output like this:

EVO, 1 video track, 1 audio track, 1 subtitle track, 0:48:58 "Episode2" 1: Joined EVO file 2: Chapters, 6 chapters with names 3: VC-1, 1080i60 /1.001 (16:9) 4: AC3, 2.0 channels, 448kbit/s, 48khz, dialnorm: -27 dB 5: Subtitle, English Creating file "galapagos.ep2.chapters.txt"... Extracting primary video track... Muxing video to Matroska... Extracting audio track number 4... Removing dialog normalization... Extracting subtitle track number 5... Creating file "galapagos.ep2.ac3"... ... ... ...

Now, let's try the Blu-ray disc. This is a seamless branching disc and reveals eac3to's power:

STEP 1: By typing  the title playlist of the disc is generated.

1) 00041.mpls, 2:00:22   [112+127+115+128+117+129+119+130+121+131+123+132+125].m2ts    - h264/AVC, 1080p24 /1.001 (16:9)    - h264/AVC, 480p24 /1.001 (16:9)    - DTS Master Audio, English, multi-channel, 48 kHz    - AC3, French, multi-channel, 48 kHz    - AC3, English, stereo, 48 kHz 2) 00042.mpls, 2:00:22 [112+127+115+128+117+129+119+130+121+131+123+132+125].m2ts - h264/AVC, 1080p24 /1.001 (16:9) - h264/AVC, 480p24 /1.001 (16:9) - DTS Master Audio, English, multi-channel, 48 kHz - AC3, French, multi-channel, 48 kHz - AC3, English, stereo, 48 kHz 3) 00040.mpls, 1:31:32   [112+114+115+116+117+118+119+120+121+122+123+124+125].m2ts    - h264/AVC, 1080p24 /1.001 (16:9)    - h264/AVC, 480p24 /1.001 (16:9)    - DTS Master Audio, English, multi-channel, 48 kHz    - AC3, French, multi-channel, 48 kHz    - AC3, English, stereo, 48 kHz 4) 00037.mpls, 1:10:56 [87+88+89+90+91+92+93].m2ts - MPEG2, 1080i30 /1.001 (16:9) - AC3, English, stereo, 48 kHz 5) 00056.mpls, 00125.m2ts, 0:25:16   - h264/AVC, 1080p24 /1.001 (16:9)    - h264/AVC, 480p24 /1.001 (16:9)    - DTS Master Audio, English, multi-channel, 48 kHz    - AC3, French, multi-channel, 48 kHz    - AC3, English, stereo, 48 kHz 6) 00046.mpls, 00115.m2ts, 0:22:32 - h264/AVC, 1080p24 /1.001 (16:9) - h264/AVC, 480p24 /1.001 (16:9) - DTS Master Audio, English, multi-channel, 48 kHz - AC3, French, multi-channel, 48 kHz - AC3, English, stereo, 48 kHz 7) 00011.mpls, 00087.m2ts, 0:19:45   - MPEG2, 1080i30 /1.001 (16:9)    - AC3, English, stereo, 48 kHz

STEP 2: By adding the title number you want, the above command changes to  and the stream/track list of the specific title is generated (note: not always the title with the longer runtime is the main movie).

M2TS, 2 video tracks, 3 audio tracks, 2:00:22 1: Chapters, 17 chapters 2: h264/AVC, 1080p24 /1.001 (16:9) 3: h264/AVC, 480p24 /1.001 (20:11) 4: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz 5: AC3, French, 5.1 channels, 640kbit/s, 48khz, dialnorm: -27 dB 6: AC3, English, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27 dB

STEP 3: Finally, choose the tracks that are going to be processed and output like this:

M2TS, 2 video tracks, 3 audio tracks, 2:00:22 1: Chapters, 17 chapters 2: h264/AVC, 1080p24 /1.001 (16:9) 3: h264/AVC, 480p24 /1.001 (20:11) 4: DTS Master Audio, English, 5.1 channels, 24 bits, 48khz 5: AC3, French, 5.1 channels, 640kbit/s, 48khz, dialnorm: -27 dB 6: AC3, English, 2.0 channels, 192kbit/s, 48khz, dialnorm: -27 dB Creating file "c:\rambo\rambo.chapters.txt"... [v02] Extracting video track number 2... [a04] Extracting audio track number 4... [a04] Extracting audio track number 4... [a05] Extracting audio track number 5... [v02] Muxing video to Matroska... [a04] Extracting DTS core... [a04] Decoding with DirectShow (Sonic Audio Decoder)... [a05] Removing dialog normalization... [a04] DirectShow reports 5.1 channels, 24 bits, 48 kHz [a04] Encoding FLAC... [a04] Creating file "c:\rambo\rambo.flac"... [a04] Creating file "c:\rambo\rambo.dts"... [a05] Creating file "c:\rambo\rambo.comm.ac3"... --

Recommended & Not Recommended Conversions
This is some basic advice on what audio conversion should and shouldn't be done. Generally, dealing with movie audio requires 4 things to have in mind:


 * What is the original (source) format?
 * How much space do you have to consume?
 * How will the audio be transmitted to the receiver/speakers?
 * Do you own an expensive high fidelity home cinema system?

Usually, people convert lossless audio tracks to FLAC, high bitrate lossy tracks (e.g. 1536 kbit/s E-AC3 and DTS-HD Hi Res) to 640 kbit/s AC3 or 1536 kbit/s DTS, and lower bitrate lossy tracks to 448 kbit/s AC3 audio or 768 kbit/s DTS. Of course, when both lossless and lossy audio tracks are available for a movie, it is recommended that the lossless track should be used as the source file for the new audio creation. Another thing to have in mind is whether the audio will be passed through HDMI, S/PDIF, or analog connection. AC3 & DTS can be transmitted through S/PDIF, unlike FLAC, which makes them very popular.