Dealing with Dolby E


Those with FTA satellite receiving capabilities may have come across audio streams in the Dolby E format. There is currently no consumer oriented or open-source based utility to decode these tracks. I've stacked up a bunch of such recordings, and finally decided to dispose of these in some manner or another. This write-up outlines an approach for converting Dolby E streams to something more readily decoded. VRD TVS 4/h.264 is a useful tool in this process because it will edit transport streams containing Dolby E, and particularly with its multistream audio feature, one can use an alternate audio track to guide the editing while retaining the Dolby E steams for post-processing once the editing is complete. I do not not believe VRD has intentional compatibility for Dolby E, but it does accept SMPTE PCM audio, which Dolby E masquerade as. What I'm outlining here is not really a sustainable solution. It's nothing really new and probably too much of a hassle for most. But it is completely legal and perhaps will save someone some time.

As a quick review, Dolby E is a distribution format for audio. It is designed for better transparency than other compressed formats, and especially to minimize sonic degradation from multiple generations of decoding and re-encoding. This can be quite useful for networks and broadcast stations, but has been one of the banes of the FTA community. Dolby E was never intended for home or private use, and thus the encoders and decoders have only been available as pricey, commercial software. There has been some activity in the open-source world on the Dolby E front, with someone associated with ffmpeg/VLC indicating he has reverse-engineered the format and produced a workable decoder. However for what ever reason the news has changed little over the past year or so. This approach could potentially also suffer from patent and other legal issues within the US.

The crux move is thus to decode the Dolby E tracks. There is a commercial decoder available for a 14 day trial period at that I chose to 'evaluate'. This worked for me because of my Dolby E accumulations, but is useless for 24/7/365 needs unless you're willing to cough up the money. I downloaded the Mac version which has an adequate standalone application along with plug-ins for professional audio software. I assume the Windows version is comparable. Some of the controls are a bit odd if you're not from the pro sound world.

The first step is to liberate the Dolby E tracks from a recorded transport stream. Or maybe to record Dolby E in the first place. Several of the usual Windows DVB apps I use have no clue what Dolby E is and do not record it even when you tell them to record all audio pids. This was never an issue for me because I always use Linux to record an entire transponder. Apps like TSReader also have little clue what is going on and are of limited utility. However Dolby E is fairly easily spotted as it masquerades as uncompressed PCM stereo streams. I had hoped my usual Windows TS demuxing tools would be of use in separating Dolby E into an elementary stream, but none could do the job. Instead I built a current version of ffmpeg so I could strip the SMPTE stream into a PCM files. This was pretty straightforward and doesn't require any dubious codecs:

ffmpeg -i input.ts -map 0:2 -acodec pcm_s24le output.wav

The output file immediately opened in the Dolby E Decoder trial software and was recognized as a 5.1 (6 channel encode). I turned off the 'pcm thru' and 'auto name' options (the latter is very dangerous as it can easily overwrite the input file). One has a choice to have single files for each channel (split format) or an interleaved file. The choice will depend on what you do with the decoded files - some apps require one or the other. This decoder outputs interleaved WAV in the MS standard order of L-R-C-Lf-Ls-Rs. Beware of mostly older applications that may require a custom mapping to make these end up in the right places.

You start the decode by pressing the obvious 'import' option. This results in plain vanilla WAV files, but be careful on Windows if they approach 2 GB in total size or individually - as they are uncompressed audio, they can be quite large and many Windows audio apps are not built to handle > 2 GB files. I was reminded a few times myself.

This may be an embarking point for you. I've worked in the pro audio/video business and own a number of high end apps, although they are a few years old. I wanted to encode the WAV files into formats that would work with my playback hardware. My basic choices were AC-3 or EAC-3 (Final Cut Studio 2, open-source or eac3to), FLAC (open-source) and DTS (SoundCode encoders). I went with the pro applications to justify the exorbitant money I have wasted over the years. There are other possibilities like AAC and MPn that I did not bother with.

The SoundCode encoders are pricey for what they provide, but did a good job on DTS. My Dolby E tracks were 2.304 Mb/s, while the 5.1 uncompressed decode runs at 6.912 Mb/s. High-rate legacy DTS runs at 1.536 Mb/s and sounded a reasonable quality match to Dolby E for the material I had recorded. This encoder likes split files only. I could distinguish a difference between the uncompressed audio and a DTS encode playback, but it was small. However the quality of the Dolby E recordings was not particularly impressive, meaning these differences might be larger with better source material. I don't own any of the newer DTS/Dolby HD, MA, TrueHD, etc. encoders, so I could not evaluate those. To my knowledge encoders for these formats are only available as commercial software.

I played a little with AC-3 using Final Cut Studio (FCS). At the 640 kb/s rate, the result was pretty good, but not a match for the 1.536 Mb/s DTS encode. There are open-source AC-3 encoders that I did not evaluate. I expect these would be good options for people who want to maintain 5.1 multichannel sound with a reasonable data rate. FCS likes split files, while it looks like the open-source encoders generally prefer interleaved.

I then moved onto FLAC, an open compression format that is lossless. This is where Windows bit me several times on > 2 GB files. The stock open-source FLAC converter wants interleaved files, but complains about the Dolby E Decoder format. Solve that with a '--channel-map=none' parameter. I got tired of messing around on Windows and considered Linux for the FLAC encoder. But for a variety of unrelated reasons, I decided on a lark to build a beta version of Audacity on Linux instead.

Audacity is a very basic audio app, but it does have some nice multichannel export facilities lacking in my older pro apps. I imported the split WAV files into Audacity and quickly had a compression level 8 (the max) x 24-bit output encoded into FLAC. For laughs I verified I could export 640 kb/s AC-3 from Audacity, but did only a cursory listening test as my FCS has a Dolby certified encoder (why mess with less?).

With the encoded audio files I was able to mux these into TS files with tsMuxeR and mkv with mkvmerge (required for FLAC, pretty much). These files played well on all my software decoders and all but my oldest hardware decoders; mkv was probably more the culprit on those.

I should mention that I often like to edit out dead spots, commercials, etc. from recordings with VideoReDo. This can work very well, but it can be very finicky about audio formats, especially when there are none that it recognizes. I found that if multichannel audio mode is set in VRD (not available in older versions), I could edit a TS with embedded Dolby E and a VRD-recognized audio format, and then strip and re-encode the result in another audio format. That's very, very nice. However if the there is no VRD-recognizable audio format, editing is either painful or intractable. In those cases I stripped Dolby E, re-encoded it in another format and muxed both back into another TS. I edited this, and then stripped and re-encoded the edited result. An extra step, but not too brain damaging.

I kept some stats for one of the recordings I did. Here are the bit rates for both audio and video, and compression factors for the audio tracks:

Dolby E: 2.304 Mb/s 0.333
6 x split wav: 1.152 Mb/s x 6 = 6.912 Mb/s 1.000
1 x intlv wav: 6.912 Mb/s 1.000
dts: 1.510 Mb/s 0.218
flac: 3.362 Mb/s 0.486
mp2: 0.384 Mb/s 0.056
m2v: 15.653 Mb/s

Here are some muxing results (total rates and muxing overheads):

.mkv with m2v, flac, dts, mp2:
20.910 Mb/s actual, 20.908 Mb/s components, 1.0000189 OH

.ts with m2v, dts, mp2:
18.178 Mb/s actual, 17.546 Mb/s components, 1.0359676 OH

So if you're looking for a HOW-TO from me, this is about the detail I'm willing to offer. Of course I can answer some questions, but you'll need to do much of the leg-work yourself.
Last edited:
Top Bottom