Log in

View Full Version : eac3to - audio conversion tool


Pages : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 [295] 296 297 298 299 300 301 302 303 304 305 306 307 308

tebasuna51
9th September 2018, 02:53
And what is the fps of extracted video?:

[v02] Creating file "H:\Mux\Video_2.h264"...

Is 27.730p? Or 2: h264/AVC, 1080p 24 /1.001 (16:9)?

I think than the 27.730p is only a wrong info but the video is not changed.

Please use MediaInfo with the two 00008.m2ts and 00004.m2ts in Advanced Mode, to see durations in seconds, not only minutes.
Maybe the audio tracks are different.

madshi
9th September 2018, 08:10
The 27.730p comes from trying to interpret the m2ts packet time stamps. *Usually* this matches the video fps, but sometimes not. You can safely ignore this information. It's probably eac3to misunderstanding the timestamps somehow, or the timestamps containing unusually high jitter or something...

Megalith
10th September 2018, 05:07
I've figured out why there's an incorrect audio delay. The problem is that the DTS track begins playing at the very beginning of the file (00008.m2ts, which is supposed to be a silent 11-second title card), even though it isn't supposed to start until the actual movie (00004.m2ts).

I'm not sure where the issue stems from, since the 00004.mpls file itself is fine. Could it actually be a problem with mkvmerge?

tebasuna51
10th September 2018, 10:08
When the first m2ts don't have the same audio streams, eac3to most the times crash.

If not you can forget the first 11-second credit and work only with the 00004.m2ts, or delay all streams not present in 00008.m2ts.

eac3to "H:\Mux\Audio_3_Undetermined.DTS" "H:\Mux\Audio_3_Delayed.DTS" +11100ms
...

Anakunda
26th September 2018, 13:25
Hello there, I'm having question to BR demuxing.
If the media contains two or more surround audio tracks being DTS-HD Master Audio and TrueHD, which one is expected the have lossless layer more fidelity?
And is eac3to always using the lossless layer when extracting to PCM/FLAC/WAV?
Last question, how do I view which codec is eac3to using to decode DTS(HD) and TrueHD, can I configure it?

SeeMoreDigital
26th September 2018, 16:07
If the media contains two or more surround audio tracks being DTS-HD Master Audio and TrueHD, which one is expected the have lossless layer more fidelity?As both are lossless audio formats, they have the capability of sounding exactly the same.

mrh335
6th October 2018, 04:45
I am using EAC3TO 3.34 with a GUI and using Staxrip 1.9 with version 3.34.

I am using a bluray ISO file which I have ripped and want to encode to a smaller MKV file.

If I use either software, I am able to choose the playlist I want to perform work on and then I select only the video portion, no audio and no subtitle (have tried both ways) and the process stops after a few seconds.

There is no log file generated. The size or playlist or bluray file do not matter.

This same process works on one 2015 Macbook Pro and one 2010 custom desktop, but not on newer 2017 Macbook Pro and 2017 iMac. All these computers are running Windows 10 natively via bootcamp.

If I change the output from MKV to h264, the process completes, but not vice versa.

Copy of status window is below and last line is the last status print out at 1% with no further progress even after hours.

Can anyone advise how to extract a bluray playlist to MKV given this issue? I have tried every version of EAC3TO over the last 1 year with the same results.


M2TS, 1 video track, 6 audio tracks, 10 subtitle tracks, 1:48:06, 24p /1.001
1: Chapters, 28 chapters
2: h264/AVC, 1080p24 /1.001 (16:9)
3: DTS Master Audio, English, 7.1 (strange setup) channels, 24 bits, 48kHz
(core: DTS-ES, 5.1 channels, 1509kbps, 48kHz)
4: AC3, English, 5.1 channels, 448kbps, 48kHz
5: AC3, Spanish, 5.1 channels, 448kbps, 48kHz
6: AC3, French, 5.1 channels, 448kbps, 48kHz
7: AC3, English, 2.0 channels, 224kbps, 48kHz
8: AC3, English, 2.0 channels, 224kbps, 48kHz
9: Subtitle (PGS), English
10: Subtitle (PGS), Spanish
11: Subtitle (PGS), French
12: Subtitle (PGS), English
13: Subtitle (PGS), Spanish
14: Subtitle (PGS), French
15: Subtitle (PGS), English
16: Subtitle (PGS), Spanish
17: Subtitle (PGS), French
18: Subtitle (PGS), English
Creating file "C:\Users\markh\Desktop\New folder\dp_chapters.txt"...
v02 Extracting video track number 2...
v02 Muxing video to Matroska...

Boulder
6th October 2018, 09:59
Why not use MKVToolnix GUI to do the job if there's no need to process audio but use it as it is? Eac3to is really not a muxing tool.

mrh335
7th October 2018, 04:22
Why not use MKVToolnix GUI to do the job if there's no need to process audio but use it as it is? Eac3to is really not a muxing tool.

I want to use Staxrip to compress using h265 and either convert the audio or transfer it over depending on what I want to use the smaller file to do.

The trial without the audio was to focus on the fact that I can't create a MKV regardless of the options I choose and it is linked to issues with EAC3TO whether being called through Staxrip or as a stand along program.

LigH
7th October 2018, 07:31
Can anyone advise how to extract a bluray playlist to MKV...?

Usually with the eternal beta version of makeMKV. The purpose of eac3to is mainly to process audio only, not everything.

justnobody
17th October 2018, 15:35
hi all
actually I have a question, "auto"-audio delay question, it's a bit complicated, I've uploaded samples for you guys
situation is source file already has delay in audio

example one
a video from iTunes having -42ms in audio (almost every iTunes video has delay in audio, audio format is AAC, iTunes loves AAC), 23.976fps

I cut a small piece out of it (mkvtoolnix), delay is now 5ms

and we demux this file with eac3to and put them (all tracks) together again with mkvtoolnix, delay is gone, 0ms now

since these delay are small, I can't heard difference between final 0ms or the 10ms or the original -42ms, seems all are fine

example two
this file freaks me out, video is 29.970 fps, a DVD and its encode, both are 29.970 fps, I will just leave the DVD alone, and I extract the audio track from VOB and mux it with the encode video (mkvtoolnix), result showing -100ms delay but it's in sync

I cut a piece out of this encode (sample showing 2ms delay), demux in eac3to, sometimes h.264 file becomes 25fps, if that happens I need to mark the video file with "*.h264 -29.970" (when I demux the whole film, framerate becomes 25fps in this case, but demux this sample it automatically makes the video 29.970)

and I put the demux video and audio together with mkvtoolnix, out of sync, the final result (the output from mkvtoolnix) is obviously more than 2ms.. even more than 100ms, totally not working if we demux-and-mux a file like this (of course the final file is showing 0ms now) (when the h.264 file becomes 25fps I also tried to label it as 29.970fps in mkvtoolnix during muxing, the result is also out of sync)


my question: with example one, should we demux and mux again to eliminate the delay, makes it 0ms? or just keep it there? exp one is a file from iTunes that coming with their own syncing audio since the start, in exp two, the audio is extracted from VOB and muxed with encode, once muxed (with mkvtoolnix) it's perfectly sync but showing -100ms delay

example two, when I demux-and-mux (both samples are in sync) the whole film, same thing happens, whole film out of sync, so when we come across a file like this (a DVDRip that has audio delay) we better leave it alone and not trying to demux it? That's my guess... Sorry for the long words


samples
http://www.mediafire.com/file/v550n7ugev3qug0

ps, if syncing is a big problem then in movie production how do they make it smooth?

sneaker_ger
17th October 2018, 17:39
example one
a video from iTunes having -42ms in audio (almost every iTunes video has delay in audio, audio format is AAC, iTunes loves AAC), 23.976fps
Maybe it is a delay from video re-ordering (bframes)? 1000/(24000/1001) ~= 41.7ms ~= 42ms

Or could be because of AAC encoder delay (though I expect 44ms, then. ~42.66.. ms is length of 2 AAC frames) . The most common lossy audio formats have this.
https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html

Now whether or not this is really stored correctly in your original file ... no idea. ~40ms is hard to tell confidently.

I cut a small piece out of it (mkvtoolnix), delay is now 5ms
This is misleading because video and audio frames have different lengths and they won't 100% align at the cut point. Mkvmerge stores delay via container to make up for this.

and we demux this file with eac3to and put them (all tracks) together again with mkvtoolnix, delay is gone, 0ms now
If you demux to "raw" (ADTS) AAC there is no way to store the delay infos that mkv or mp4 container can store. It is lost. You will introduce a slight delay (here: -5ms). MediaInfo doesn't know this. It is not an AI that analyzes e.g. speech to mouth movement of video but only looks at the delay values stored in the container (mkv/mp4).

arrgh
17th October 2018, 20:50
hi
in some UHD discs eac3to detects an "Dolby Vision Enhancement Layer" which it Shows as a separate track... it obviously can also be extracted...
is it really a separate track? if yes, can it be remuxed? if yes, how (e.g. in a *.mkv)?
thanks

Dulus_No
18th October 2018, 06:16
example one
a video from iTunes having -42ms in audio (almost every iTunes video has delay in audio, audio format is AAC, iTunes loves AAC), 23.976fps

Maybe it is a delay from video re-ordering (2 bframes?)? 2 * 1000/(24000/1001) ~= 41.7ms = 42ms

Delay shows up because DRM removing tools (except Requiem) also drop edit/elst atoms from source m4v file. And after MKVToolNix fixed the issue #1889 (https://gitlab.com/mbunkus/mkvtoolnix/issues/1889) mkv files with iTunes source have that delay.

sneaker_ger
18th October 2018, 09:16
Assuming there's also aac encoder delay they almost (44ms - 42ms = 2ms) cancel each other out completely if the edit lists of both tracks are lost, right?

mkver
18th October 2018, 09:32
@arrgh: The only way to store Dolby Vision data in Matroska is if it is embedded in the video stream and is copied with the video stream into the Matroska file by the muxer. (I don't know how Dolby Vision is stored in the video stream if it is stored in the video stream so I don't know if the Dolby data looks like invalid/garbage data and is therefore likely filtered out by muxers.) Even if the data ends up in the file, no indication of this would be stored at the container level, there is no header element saying "This track contains Dolby Vision data". I don't think that this can be meaningfully extracted as a separate track (if it is shown as a separate track, then it is likely not stored in the video stream, so it has its own PID and one could "extract the track by using a PID filter).
@Justnobody:
1. Your samples are not very informative. You should have given us files before you remuxed them so that we can analyze its sync. (This wouldn't work with the iTunes file because if Dulus_No
2. That the "delay" value changes when you extract a part of a file is (as sneaker_ger already said) a result of audio and video frames having different durations. Here is an easy example: You have an AC-3 track (duration of a each audio frame: 32ms) and a PAL 25p video (duration of each frame 40ms). If both audio and video start at 0:00 (and don't have any gaps) and there is a keyframe at 1s and you cut everything before 1s away, then your new file will have a delay of 24ms: The first video frame that will be kept was at 1s and is now at 0:00, the first audio frame that will be kept was at 1024ms and is now at 24ms.
This effect also implies that if you want to upload remuxed files and not the original files for us to analyze, you should upload the beginning of the file, not something in the midle (checking with a subtitle for the movie this scene is at 28:26 (if the subtitles and your movie have the same fps)).
3. But one can nevertheless say something meaningful about your second sample. NTSC DVDs were designed to work with old analog 6/1.001 i TVs and so they had to output 60/1.001 i, but this doesn't mean that they had to use this format internally. One can store 24/1.001p material as progressive on a NTSC DVD by using repeat-field-flags. The typical way to do this is by using a 2:3 pulldown: One frame will be the basis for two fields and therefore shown 2/(60/1.001)s (about 33ms) long, the next frame will be the basis for three fields and therefore shown 3/(60/1.001) s long. Of course, the natural framerate for such material is 24/1.001fps and that's how modern equipment will play it.
Your second sample "beginning sample Ibitsu [720x480][H264][AAC] (1) (1).mkv" before extraction and remuxing is actually 24/1.001p although the default duration in the header says 30/1.001fps. Here is my guess to what happened: You remuxed this file and the remuxing tool just used the frame rate info the bitstream signalled (one should keep in mind that this is not wrong -- the "default duration" is not intended to be the reciprocal of the frame rate) and wrote 30/1.001fps into the Matroska header. But lateron you used a tool to reencode it to H.264 that is smart in the sense that it noticed that this is just a cfr movie that has been subjected to a 2:3 pulldown and that therefore created 24/1.001p output pictures, but unfortunately it still wrote 30/1.001 fps in the Matroska header and it gave the bitstream a timebase of 60/1.001 (but didn't set the fixed_frame_rate_flag). When mkvmerge remuxd the video elemetary stream, the only timing information the bitstream contained suggested 30/1.001fps and that is how mkvmerge remuxed it. The result is totally out of sync and there is no video for the last few seconds of audio. The asynchronity in this case has nothing to do ith an initial audio delay, instead it is a result of mismatched framerates and as such gets gradually worse.
4. Actually, the VOB/Program Stream demultiplexer and the MPEG-2 module of mkvmerge have some bugs, but the developer of mkvmerge considers MPEG-2 obsolete and doesn't want to spend time on this. One should not really use mkvmerge to remux DVDs, use MakeMKV instead (it can also parse the ifo files so that one gets the correct DVD color palette and the chapters).

sneaker_ger
18th October 2018, 09:38
@arrgh: The only way to store Dolby Vision data in Matroska is if it is embedded in the video stream and is copied with the video stream into the Matroska file by the muxer. (I don't know how Dolby Vision is stored in the video stream if it is stored in the video stream so I don't know if the Dolby data looks like invalid/garbage data and is therefore likely filtered out by muxers.) Even if the data ends up in the file, no indication of this would be stored at the container level, there is no header element saying "This track contains Dolby Vision data". I don't think that this can be meaningfully extracted as a separate track (if it is shown as a separate track, then it is likely not stored in the video stream, so it has its own PID and one could "extract the track by using a PID filter).
There are 2 ways to store Dolby Vision. One as SEI messages in the base video stream. On Blu-Ray it seems they use a second "track" instead. As you say there isn't really any way to "properly" copy that into mkv yet.

mkver
18th October 2018, 09:38
Assuming there's also aac encoder delay they almost (44ms - 42ms = 2ms) cancel each other out completely if the edit lists of both tracks are lost, right?
You are making presumptions about the aac encoder delay that needn't be true. Not every aac encoder has a delay of 2 frames. The best bet would probably to test Apple's AAC encoder. Or maybe Dulus_No knows a bit more about this?
[Edit]: This (https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html) and this (https://forum.doom9.org/showthread.php?p=1563714#post1563714) both suggest 2112 samples which are exactly 44ms. You knew that, didn't you?
[Edit2]: Yes, you did. Of course you did.

sneaker_ger
18th October 2018, 09:45
This is the link I posted earlier: https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html
Apple's AAC encoder uses 2112 samples of delay. At 48 kHz that's exactly 44ms. If you use QAAC it confirms this.

(Of course we still can't be 100% sure that's what they use for their streaming but it's the best guess until someone has a properly decrypted sample.)

sneaker_ger
18th October 2018, 10:29
and we demux this file with eac3to and put them (all tracks) together again with mkvtoolnix, delay is gone, 0ms nowIf you demux to "raw" (ADTS) AAC there is no way to store the delay infos that mkv or mp4 container can store. It is lost. You will introduce a slight delay (here: -5ms). MediaInfo doesn't know this. It is not an AI that analyzes e.g. speech to mouth movement of video but only looks at the delay values stored in the container (mkv/mp4).
@justnobody
One thing I forgot to add:
When you extract certain audio formats with eac3to it will delete/add audio frames to preserve the delay value of the source container as best as possible (within length of 1 audio frame). The eac3to log should tell you if that happens. Not sure if that works with AAC as eac3to's AAC handling seems to be very limited.

Dulus_No
18th October 2018, 13:43
You are making presumptions about the aac encoder delay that needn't be true. Not every aac encoder has a delay of 2 frames. The best bet would probably to test Apple's AAC encoder. Or maybe Dulus_No knows a bit more about this?
[Edit]: This (https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFAppenG/QTFFAppenG.html) and this (https://forum.doom9.org/showthread.php?p=1563714#post1563714) both suggest 2112 samples which are exactly 44ms. You knew that, didn't you?
[Edit2]: Yes, you did. Of course you did.
The same delay shows up not only on AAC tracks but also on AC3 (video has a +42ms / 1 frame delay). mp4dump of original m4v with drm (https://pastebin.com/hRqADJcu) and decrypted with TunesKit m4v (https://pastebin.com/zH6GJAh5).

sneaker_ger
18th October 2018, 14:09
Ok, so only one edts/elst with "media time" != 0.

arrgh
18th October 2018, 21:20
There are 2 ways to store Dolby Vision. One as SEI messages in the base video stream. On Blu-Ray it seems they use a second "track" instead. As you say there isn't really any way to "properly" copy that into mkv yet.

yes, I see a second Video track...

https://www.bilder-upload.eu/bild-d12e51-1539893458.jpg.html

so, that means it is relly a second independant track and not something like a "forced pgs" which sometimes comes as an individual track, sometimes enbedded in a general track where some frames are marked as forced...
or, in other words, the contend of this track is not also included in the first video stream; to maintain the complete data one would need to mux the second track into a container?
there are also no other containers (instead of mkv) which could be used for this and enable rederers like madVR to use the data?

sneaker_ger
18th October 2018, 21:29
I don't know any free software that supports Dolby Vision. (This includes madVR.)

killerpot
30th October 2018, 23:48
eac3to wav to ac3 bug in v3.34 and all other version i try 3.27,3,29,3.30,3.31,3.34 and others all bug

only old one 3.24 not bug!!
bug 3.34 and other give this error: proof here https://puu.sh/BTB58/7697ab92ae.mp4 (3,34 for this example)

aborded at file position 262144 !!! spend 6 hour try fix that nothing work i try all king of thing

different folder location just in case not work and other thing i try PLZ HELP ME SOMEONE!

why eac3to 3.24 work???
eac3to wav to ac3 only work! with v3.24
check the proof here https://puu.sh/BTAUz/8be7a5e60d.mp4

FILE HERE ON GOOGLE DRIVE (FOR TESTING) vff.wav
https://drive.google.com/open?id=1aBXKnjbAeFohrAWsSm_kJdA4CA_G74Wa

some one can test it and help me plz! i want to know what is the probleme annoy me so much thx!

in 3.34 the only time it's work it's making this line "eac3to vff.wav vff.ac3 -resampleTo48000 -down16

-448" WHY EAC3TO SHOULD WORK WITH 44,1 KHZ RIGHT? it's work in 3.24!

tebasuna51
31st October 2018, 03:14
@killerpot

I can reproduce the bug but the Aften encoder included in eac3to is deprecated, use ffmpeg instead without problems:

ffmpeg.exe -i vff.wav -acodec ac3 -center_mixlev 0.707 -ab 448k vff.ac3

killerpot
31st October 2018, 09:20
but the problem i hate ffmpeg if you try to encode ac3 in audacity (ffmpeg audacity version) your ac3

will be a shit for shure.and the command are more complicated in ffmpeg.question #1 what this does
-center_mixlev 0.707 (its and 5,1 wav to ac3 i wanna encode)

question #2 no other freeware are better then aften to encode ac3.but a question did ffmpeg use aften in

their thing to encode ac3 ?

question #3 i think in the past eac3to tell he encode with aften my ac3 and now that tell libaften do

you know if it's the case ?

question#4 if it's the case what the difference between aften and libaften ?

tebasuna51
31st October 2018, 10:59
1) By default ffmpeg put in ac3 header a value of -center_mixlev 0.595, the correct default is 0.707 to avoid low dialog volume if downmixed to stereo.

2) The ac3 encoder in ffmpeg is a improved aften encoder (https://forum.doom9.org/showthread.php?p=1794293#post1794293) (by the same developer Justin Ruggles)

3) eac3to always use libaften.dll to encode ac3, but you can use pipe to encode with aften.exe (https://github.com/wieslawsoltes/AftenWindowsBuilds/releases). Or better use Aften directly:

aften vff.wav vff.ac3

(defaults: -b 448 for 5.1, -cmix 0 [= -3.0 dB = 0.707], -readtoeof 1 only needed if wav > 4 GB, -pad 0 to avoid 5.3 ms of delay)

4) Don't exist differences between aften and libaften, here seems a eac3to bug when call libaften with a 44.1KHz source.

If the command are complicated for you use my UsEac3to GUI and the A/V Recode option to use ffmpeg for ac3 recode directly.

Masutin
1st December 2018, 01:14
To convert to mono, what more options are required to avoid the error 'No channel mapping to AAC defined'?stdout.wav -mono | QAAC

tebasuna51
1st December 2018, 02:27
stdout.wav -mono -simple | QAAC

Work with a simple wav header, with a WAVE_FORMAT_EXTENSIBLE header (default) the channel mask can be other than 4 (mono center channel).

Remember: the undocumented switch "-mono" extract the center channel from a multichannel input or left channel from stereo input, don't make a downmix from input channels.

Lyle_JP
10th December 2018, 21:11
1) By default ffmpeg put in ac3 header a value of -center_mixlev 0.595, the correct default is 0.707 to avoid low dialog volume if downmixed to stereo.

I always use -dialnorm -27 on my ffmpeg ac3 encodings. Does that do the same thing, or should I also add -center_mixlev 0.707?

LigH
10th December 2018, 21:38
The "Dialog Normalization" and the "Center Mix Level" are independent parameters.

tebasuna51
10th December 2018, 22:42
I always use -dialnorm -27

Always?
Not all sources need that parameter.
My recommendation is let the ffmpeg default -31

or should I also add -center_mixlev 0.707?

Like LigH say is not the same.

Here I recommend use 0.707, default used by Dolby, instead the ffmpeg default 0.595.

Richard1485
11th December 2018, 19:22
Here I recommend use 0.707, default used by Dolby, instead the ffmpeg default 0.595.

Does the appropriate value for -center_mixlev vary from source to source (in the way that -dialnorm does) or is it always a matter of preference?

tebasuna51
11th December 2018, 22:20
Of course if there are options is because it can vary.

I only recommend defaults without analyze the source.
For instance when recode soundtracks from others formats.

Richard1485
12th December 2018, 14:52
Of course if there are options is because it can vary.

Yes, or because there are preferences.

I only recommend defaults without analyze the source.

Understood. Thanks, tebasuna! :)

GCRaistlin
13th December 2018, 19:35
madshi, can you please take a look at this bug: http://bugs.madshi.net/view.php?id=377

asarian
15th December 2018, 08:03
Same here:

eac3to.exe valerian.m2ts 2: c:\video\temp.pcm -down6
MKV, 1 video track, 2 audio tracks, 3 subtitle tracks, 2:17:25, 24p /1.001
1: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
2: TrueHD (Atmos), English, 7.1 channels, 48kHz, 2419ms
"TrueHD Atmos 7.1"
3: AC3 EX, English, 5.1 channels, 640kbps, 48kHz, 2419ms
"AC-3 5.1-EX"
4: Subtitle (PGS), English, "English (Forced)"
5: Subtitle (PGS), English, "English (SDH)"
6: Subtitle (PGS), German, "German"
a02 Extracting audio track number 2...
a02 Decoding with libav/ffmpeg...
a02 Applying RAW/PCM delay...
a02 Mixing surround channels...
a02 Swapping endian...
a02 Remapping channels...
a02 Creating file "c:\video\temp.pcm"...
----[truehd @ 026336c0] Lossless check failed - expected 00, calculated c1.
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 46.
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 34.
--[truehd @ 026336c0] Lossless check failed - expected 00, calculated 24.
-[truehd @ 026336c0] Lossless check failed - expected 00, calculated 5b.
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 81.
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 83.
------------[truehd @ 026336c0] Lossless check failed - expected 00, calculated e7.
-[truehd @ 026336c0] Lossless check failed - expected 00, calculated 3b.
--[truehd @ 026336c0] Lossless check failed - expected 00, calculated e2.
-[truehd @ 026336c0] Lossless check failed - expected 00, calculated 96.
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 78.

This is with a brand new Blu-ray (Valerian and the City of a Thousand Planets).


Thing is, I'd love to use ffmpeg directly, but I can't extract the Atmos stream with tsMuxer first (as it doesn't recognize it).

mkver
15th December 2018, 08:32
Thing is, I'd love to use ffmpeg directly, but I can't extract the Atmos stream with tsMuxer first (as it doesn't recognize it).
But you can use ffmpeg directly. A Bluray contains a slightly modified version of a transport stream that ffmpeg can handle. And if you build ffmpeg with libbluray, it can even parse playlists.

asarian
15th December 2018, 09:00
But you can use ffmpeg directly. A Bluray contains a slightly modified version of a transport stream that ffmpeg can handle. And if you build ffmpeg with libbluray, it can even parse playlists.

Thx.

Hmm, turns out ffmpeg (4.1) yielded the same errors. I can't say I'm hearing any distortion, but still.

mkver
15th December 2018, 09:44
This means that either something is wrong with your source or that something is wrong with ffmpeg's decoder. The best place to continue would probably be ffmpeg's bugtracker (https://trac.ffmpeg.org/).
What happens if you use the new truehd_core bitstream filter (designed to drop atmos extensions; usage: ffmpeg -i <inputfile> -vn -sn -c:a copy -bsf:a truehd_core -f <outputfile>)?
If the errors always happen at the same place, you could upload just the few seconds of the track for an issue. (Btw: Does this Bluray use seamess branching and is the error at a branchpoint?)

asarian
15th December 2018, 11:05
This means that either something is wrong with your source or that something is wrong with ffmpeg's decoder. The best place to continue would probably be ffmpeg's bugtracker (https://trac.ffmpeg.org/).
What happens if you use the new truehd_core bitstream filter (designed to drop atmos extensions; usage: ffmpeg -i <inputfile> -vn -sn -c:a copy -bsf:a truehd_core -f <outputfile>)?


Thx for the tip! To what can I output the TrueHD stream, though? FFmpeg won't let me output it to .wav (probably because wav is 6 channels only, iirc). I will need a stream I can downmix with eac3to (-down6) again.

mkver
15th December 2018, 11:50
The reason that ffmpeg won't let you mux the truehd stream into wav is because wav is a container for uncompressed PCM data, not for truehd data. You can e.g. mux it into Matroska. Just use a file with a "mka" extension and ffmpeg will know that you want to mux into Matroska.

Also keep in mind that if you intend to open a ticket in ffmpeg's bugtracker, you need to provide the truehd track with the atmos extension (or at least a snippet of it that allows to reproduce the issue).

tebasuna51
15th December 2018, 12:02
Same here

Same to what?

eac3to.exe valerian.m2ts 2: c:\video\temp.pcm -down6
MKV, 1 video track, 2 audio tracks, 3 subtitle tracks, 2:17:25, 24p /1.001
1: h265/HEVC, 2160p24 /1.001 (16:9), 10 bits
2: TrueHD (Atmos), English, 7.1 channels, 48kHz, 2419ms
"TrueHD Atmos 7.1"
3: AC3 EX, English, 5.1 channels, 640kbps, 48kHz, 2419ms
"AC-3 5.1-EX"
...
[truehd @ 026336c0] Lossless check failed - expected 00, calculated 78.

Is a m2ts or a mkv?

Please don't use .pcm, use .w64 or .wav instead.

Some messages can be ignored.

, but I can't extract the Atmos stream with tsMuxer first (as it doesn't recognize it).

tsMuxeR is a muxer, to extract use eac3to or ffmpeg or mkvextract if it is a mkv.

FFmpeg won't let me output it to .wav (probably because wav is 6 channels only, iirc). I will need a stream I can downmix with eac3to (-down6) again.

wav can have more than 6 channels, but can't be greater than 4 GB (limit for strict wav format) use .w64

If: eac3to valerian.m2ts 2: c:\video\temp.w64

and: ffmpeg -i valerian.m2ts -vn -acodec pcm_s24le c:\video\temp.w64

produce the same messages and output you can ignore them or assume is a corrupt input.

After that you can downmix the w64 (recommended with MeGUI or BeHappy).

asarian
15th December 2018, 15:40
Is a m2ts or a mkv?

Good catch. Too used to .m2ts files. :) This test actually was on the mkverge .mkv version of the .m2ts (video and audio only), on my media server. You got me thinking, though, that maybe it got corrupted somehow. I just loaded up the disc again, but it makes no difference: about the same amount of errors.

Please don't use .pcm, use .w64 or .wav instead.

What's wrong with .pcm?! I always convert every 7.1 source to .pcm (with -down6). .pcm is supposed to be lossless, right?

If: eac3to valerian.m2ts 2: c:\video\temp.w64

and: ffmpeg -i valerian.m2ts -vn -acodec pcm_s24le c:\video\temp.w64

produce the same messages and output you can ignore them or assume is a corrupt input.

After that you can downmix the w64 (recommended with MeGUI or BeHappy).

Hmm, that's sad: the latest ffmpeg also produces the same errors. So, maybe I should file a small bug report with them; but, in all honesty, I can't hear any errors at all; so maybe I'll just forget about it.

LigH
15th December 2018, 22:35
Raw PCM has no header. No information which sample rate, which bit depth, which number format, how many channels, which channel layout ... no details, only a byte stream of sample data. You will have to tell a reading application every attribute, or it won't be able to interpret the byte stream.

WAV has a header but is limited to 32 bit size fields (max. 4 GB); W64 expands this limit.

FLAC is losslessly compressed.

asarian
16th December 2018, 02:36
Raw PCM has no header. No information which sample rate, which bit depth, which number format, how many channels, which channel layout ... no details, only a byte stream of sample data. You will have to tell a reading application every attribute, or it won't be able to interpret the byte stream.

WAV has a header but is limited to 32 bit size fields (max. 4 GB); W64 expands this limit.

FLAC is losslessly compressed.

Thanks. Thing is, .mkv is just an intermediate stage for me: eventually everything gets muxed to an .m2ts container again. So, it kinda needs to stay LPCM (for which I then use the good old Pcm2Tsmu, to get tsMuxer to accept it).

tebasuna51
16th December 2018, 12:46
...then use the good old Pcm2Tsmu, to get tsMuxer to accept it.

Thanks, I write Pcm2Tsmu for that, but last tsMuxeR versions accept already .w64 like pcm input greater 4 GB.

Pcm2Tsmu is old and obsolete now.

asarian
16th December 2018, 13:09
Thanks, I write Pcm2Tsmu for that, but last tsMuxeR versions accept already .w64 like pcm input greater 4 GB.

Pcm2Tsmu is old and obsolete now.

Hehe, didn't even realize you wrote Pcm2Tsmu. :) Thanks for that! It's been an instrumental tool!

And yeah, even a 5.1 LPCM stream is nearly 7G. :p So, good tip on using .w64 format.

Doom195051
21st December 2018, 18:33
I have a bunch of MKVs with FLAC audio (varying from FLAC 1.0, 2.0 and 7.1) that I want to convert to DTS-HD MA.

I thought i could attempt to do this with eac3to alongside the arcsoft, surcode or DTS-HD Master Suite software. I'm running Windows 10 FYI.

Has anyone had good experience with latest windows trying to get this done? I run eac3to (using the UsEac3to GUI) and select the functionality to convert Track #2: FLAC to DTS from within eac3to.

I always end up getting the error: "Pressing the Surcode "Encode" button didn't seem to work..." I tried making the file names 1 character long and on a very short file path (i.e. F:/Movies/a.mkv) but still get the same error, on either 1.0.21 or 1.0.29 Surcode version.

I thought...well how about I just convert the FLAC to wavs (I tried it on a mono FLAC giving me just one center .wav file) then run it through Surcode...well Surcode converts that center mono file into a five channel DTS track (which I can successfully mux with the video but I feel like this is wrong...).

So lastly, I wanted to try with the actual DTS-HD Master Suite software, which seems like the most viable. I tried converting the single center channel .wav file but the encode just seems frozen in my queue as pending...


So any idea what would be the best way to tackle my goal of converting FLAC 1.0/2.0/7.1 from an MKV into DTS-HD MA 1.0/2.0/7.1 (respectively) in an MKV?

I saw this which seemed to indicate people don't reccommend DTS-HD Master Suite...
https://forum.doom9.org/showthread.php?t=158611

Also Arcsoft 6 doesn't even work on Window 10 anymore. I used this work around from another post that, when I run eac3to test, it detects Arcsoft dtsdecoder dll to be working (idk if it actually is though...).
https://forum.doom9.org/showthread.php?t=154070