lisamelton/video_transcoding

Dolby Digital Plus support

ylor opened this issue · 21 comments

ylor commented

Reading the tech specs for the new Apple TV, it supports Dolby Digital Plus 7.1 which Handbrake supports encoding to with aencoder=eac3. Dolby Digital Plus is reportedly twice as efficient as AC3, has more channels, and allows for higher overall bitrate. Would it be possible to add support to use Dolby Digital Plus for surround tracks? Thanks!

@rolyreyes Funny, I was just talking to Rene Ritchie of iMore about this last week wondering if they had added support. :)

In the short term, you may be able to do this now with a nightly build of HandBrakeCLI along with a few transcode-video hacks like --handbrake-option aencoder=eac3 and such.

In the long term, I want to add this. So, my answer is, "Yes!" :) But it's likely I won't add it until the HandBrake team enables E-AC3 encoding in a release build. And I don't know when that will happen. For now, it's not available in version 0.10.2.

I'll leave this open for discussion and until the feature is implemented.

Thanks again for giving me the heads up!

Excellent! As most streaming content is encoded in DD+ it would be a good default with high compatibility (most cheap streaming boxes, mobiles and playbars support it) and DTS like quality (mainly because it allows 7.1 with 1536 kbit for the audio streams).

@terveer OK, I've added a new "FAQ" section and answer to the "README" document explaining the status of Dolby Digital Plus support:

https://github.com/donmelton/video_transcoding#can-you-add-support-for-enhanced-ac-3-audio

So, I'll close this for now.

Any chance this has changed in the past year??

@dorgan Yes! There's a good chance this is my next major feature. But, as I wrote in the FAQ, "Unfortunately, Enhanced AC-3 output is currently limited to 5.1 audio channels in HandBrake." So I'm still waiting on the HandBrake team to change that.

@ylor @terveer @dorgan OK, I'm re-opening this now because I've implemented Dolby Digital Plus (aka Enhanced AC-3) support in both transcode-video and convert-video and plan to release that sometime in the next few days.

However, keep in mind that Enhanced AC-3 output is still limited to 5.1 audio channels in both HandBrake and FFmpeg.

And while I will allow E-AC-3 bitrates of 768 and even 1536 Kbps, the default for E-AC-3 will be 640 Kbps, just like it is with plain old AC-3. Seriously, bitrates above 640 Kbps for an audio track kind of miss the whole point of transcoding as size reduction. :) Also, keep in mind that some streaming systems and E-AC-3 decoders can't always handle bitrates above 640 Kbps.

@ylor @terveer @dorgan BTW, Dolby Digital Plus output is currently NOT COMPATIBLE with the MP4 file format when using transcode-video due to a limitation in HandBrakeCLI. This means that adding both --mp4 and --ac3-encoder eac3 to your command line will fail with the error "incompatible encoder 'eac3' for muxer 'av_mp4'."

Oddly enough, ffmpeg doesn't have this limitation so you'll be able to use convert-video --ac3-encoder eac3 to convert your MKV files into MP4 format without any problems. Go figure.

@ylor @terveer @dorgan OK, I've released version 0.19.0 with this feature. Just gem update video_transcoding to get it. Thanks for all your feedback!

dm30 commented

Hi! What did end up happening with DD+? It is still not available as an output choice with Handbrake 1.1. Is it a way to implement through command line? How do you define mixdown choice, bitrate, etc?
Thank you!

@dm30 See my previous comments in this issue here or in the release notes:

https://github.com/donmelton/video_transcoding#0190

TL;DR: Dolby Digital Plus (aka Enhanced AC-3) is now supported by HandBrake, transcode-video and convert-video. However, Dolby Digital Plus output is currently NOT COMPATIBLE with the MP4 file format when using transcode-video due to a limitation inHandBrakeCLI. This means that adding both --mp4 and --ac3-encoder eac3 to your command line will fail with the error "incompatible encoder 'eac3' for muxer 'av_mp4'."

Mixdown and bitrate work the same as they always have in transcode-video. Mixdown is normally automatic but it can be tweaked via --handbrake-option. Bitrate is specified via the --ac3-bitrate option.

I hope that helps.

dm30 commented

Thank you so much for your quick reply. I did. But I meant why is not implemented on the UI or, considering your comment, whether was solved that CLI limitation since.
Anyway, if I understood right, I can still use E-AC3 if I encode to .mkv container right? Or using convert-video as well? I will dive in the CLI documentation!
Kind regards
Javier

@dm30 Yes, you can use Dolby Digital Plus (aka Enhanced AC-3) as long as your transcoding output format is MKV or you use the convert-video tool to convert a MKV file to MP4 format.

dm30 commented

thank you. Couldn't find how to use those commands in the handbrake documentation. Where can I learn to master the CLI? Excuse my ignorance

dm30 commented

I'm reading the release notes. I will figure out.
Thanks a lot.

@dm30 Do you mean HandBrakeCLI or my tools? For my tools, the README file should be sufficient:

https://github.com/donmelton/video_transcoding/blob/master/README.md

You can also get built-in help for each tool, for example:

transcode-video --help

@ylor @terveer @dorgan OK, I'm re-opening this now because I've implemented Dolby Digital Plus (aka Enhanced AC-3) support in both transcode-video and convert-video and plan to release that sometime in the next few days.

However, keep in mind that Enhanced AC-3 output is still limited to 5.1 audio channels in both HandBrake and FFmpeg.

And while I will allow E-AC-3 bitrates of 768 and even 1536 Kbps, the default for E-AC-3 will be 640 Kbps, just like it is with plain old AC-3. Seriously, bitrates above 640 Kbps for an audio track kind of miss the whole point of transcoding as size reduction. :) Also, keep in mind that some streaming systems and E-AC-3 decoders can't always handle bitrates above 640 Kbps.

Why can't I find the E-AC-3 Encoder both in old and latest version of HandBrake or in the Nightly version?

@DUGUJACK I'm not sure I understand what you mean, but if you try HandBrakeCLI --help on your command line then you should see a line in that output like this:

   -E, --aencoder <string> Select audio encoder(s):

Listed below that line are all the supported audio encoders in your version of HandBrakeCLI. If one of those lines is this:

                               eac3

... then your version of HandBrakeCLI supports E-AC-3.

Does that help?

@DUGUJACK I'm not sure I understand what you mean, but if you try HandBrakeCLI --help on your command line then you should see a line in that output like this:

   -E, --aencoder <string> Select audio encoder(s):

Listed below that line are all the supported audio encoders in your version of HandBrakeCLI. If one of those lines is this:

                               eac3

... then your version of HandBrakeCLI supports E-AC-3.

Does that help?

Sorry, I don't know how to use the command line of HandBrakeCLI , what I mentioned before was HandBrake GUI.

@DUGUJACK This project only works with HandBrakeCLI and not the HandBrake GUI. You should direct your questions and comments to the actual HandBrake project here:

https://github.com/HandBrake/HandBrake/issues

@DUGUJACK This project only works with HandBrakeCLI and not the HandBrake GUI. You should direct your questions and comments to the actual HandBrake project here:

https://github.com/HandBrake/HandBrake/issues

Ok, thanks a lot.

@donmelton Now I know how to use HandBrakeCLI to encode the video with a bat file after watching a video of YouTube(https://www.youtube.com/watch?v=zn6k4YuQR98&t=81s). Although its output format is MP4 , I have to convert it to MKV format in order to extract the EAC3_CORE with MeGUI HD Stream Extractor, but it turns out that its filename includes "DELAY -5ms", I doubt that it was because the EAC3 audio was programmed to be delayed 5ms during its encoding.