Log in

View Full Version : DTS-HD file's duration is longer than DTS-Core (help for re-authoring needed)


Rachegottes
7th October 2012, 15:14
Hello everybody,

this is a very serious topic for me, I hope somebody can help me.

I regularly do DVD-reauthoring for different companys and now offer small BD-authoring.

Things like: 3 Movies on 1 BD.
I recode the movies to fit on a BD and I want to passthrough the Audio and here is my problem.

If I extract the DTS-HD sound with Staxrip it's duration is longer than the normal DTS Core sound, so the movie and sound are not synchrone anymore. If I extract the CORE of the same Movie everything is fine.

How can I fix this?

Thank you very much.

tebasuna51
8th October 2012, 02:26
If I extract the DTS-HD sound with Staxrip it's duration is longer than the normal DTS Core sound

Sorry but is not possible. The difference between DTS-HD and the DTS Core is only a Sub-frame added to each Core frame.

Maybe the soft to manage (remux) the extracted DTS-HD do something wrong.

Rachegottes
8th October 2012, 15:48
This is wat I did:

1. I ripped the Blu-ray with AnyDVD HD.
2. Opened StaxRip-> Source-> Blu-ray Folder
3. Chose Playlist with correct duration of 52:02
4. Analyse started: Video Output: Nothing, Audio Output: DTS-HD (no options)
5. Click "OK"

process started....

LOG:
M2TS, 1 video track, 1 audio track, 0:52:02, 24p
1: Chapters, 8 chapters
2: h264/AVC, 1080p24 (16:9)
3: DTS Master Audio, German, 5.1 channels, 16 bits, 48kHz
(core: DTS, 5.1 channels, 16 bits, 1509kbps, 48kHz)
[v02] The video framerate is correct, but rather unusual. <WARNING>
[a03] Extracting audio track number 3...
[a03] Creating file "Y:\Re-authoring\BLU-RAY\Wildlife Planet Erde\GorillaBDR - ID3 - de-German_Master Audio.dtshd"...
Video track 2 contains 74930 frames.
eac3to processing took 1 minute, 49 seconds.
Done.

Result: Duration 01:17:54:00 WTF?
Tested in VLC, Adobe Encore.

:(:(:(:(:(

rik1138
8th October 2012, 21:30
Maybe try using TXMuxer to demux the DTS file from the video stream, see if you get the same results. Maybe StaxRip is doing something wrong...

Never used StaxRip, why does it think the video framerate is 'rather unusual'?

tebasuna51
8th October 2012, 23:57
Result: Duration 01:17:54:00 WTF?
Tested in VLC, Adobe Encore.

Please use LeeAudBi.exe (http://forum.doom9.org/showthread.php?p=970890#post970890)
to check the audio duration.

The DTS-HD must have .dts extension.

EDIT:
@rik1138
Staxrip use eac3to to extract the tracks (the log is typical), and yes the <WARNING> is not necesary (a rest from old times).
I used many times eac3to to extract DTS-HD, and always work fine if the m2ts is not corrupt.

stax76
9th October 2012, 18:47
As workaround ripping with MakeMKV might work.

setarip_old
14th October 2012, 15:12
@Rachegottes

Hi!

I believ you can accomplish what I believe you're trying to do using MultiAVCHD Things like: 3 Movies on 1 BD. - including, if you'd like, a menu...

Rachegottes
14th October 2012, 21:58
Sorry for answering so lately.
I was very bussy with some projects, but this case is still a problem.

@tebasuna51
The DTS-HD File coming out of StaxRip (eac3to) as a.dtshd extrension not a .dts .... is this right?

@ Everybody else:
I am doing this on a "professional" way. So, MKV is not an option because the MASTER is for repliction and not for using myself.

Thank you very much for your answers.

sneaker_ger
14th October 2012, 22:06
I think the others are not suggesting mkv as the final format but only as an intermediate file to work around any problems StaxRip (or rather the underlying eac3to?) might have. It would be two steps:
1.) Rip the Blu-Ray to mkv with makemkv
2.) Extract the DTS-HD audio using mkvextract

tebasuna51
15th October 2012, 01:33
The DTS-HD File coming out of StaxRip (eac3to) as a.dtshd extrension not a .dts .... is this right?

You can use .dtshd or .dts indistinctly, but not for LeeAudBi.
You can return to .dtshd after.

setarip_old
15th October 2012, 08:16
@Rachegottes

My suggestion to try MultiAVCHD has absolutely nothing to do with .MKVs...

rik1138
15th October 2012, 21:33
@ Everybody else:
I am doing this on a "professional" way. So, MKV is not an option because the MASTER is for repliction and not for using myself.

Thank you very much for your answers.

I'll just re-mention this since I now know what your final output is...

Get TSmuxer, drop the PlayList file into it (the .MPLS file that references the .M2TS file). Select the streams you want and select Demux.

I have personally used the DTS-HD MA audio stream from this process on a Blu-ray disc that has been replicated and is in stores now... Worked perfectly. (The replicated disc was made with professional authoring software, I didn't verify audio duration in any other software...)

Even though it says the audio duration is longer, is that really the case? Have you tried re-muxing the audio back with the video and see if it works? The file might be okay... Some header information is removed from the DTS stream when it's muxed into a Blu-ay image, so it's possible the duration is just being reported incorrectly by the software that's reading it.

Just to test, try converting the DTS stream to WAV files and see what the duration is. If it really is longer, can you tell why? (I.e., is silence added to the end? Was the audio actually 'stretched' to the new duration?)

tebasuna51
16th October 2012, 00:48
...Some header information is removed from the DTS stream when it's muxed into a Blu-ay image...

When a DTS-HD encoder make a dtshd put a global header with info about the stream. This info can be used when is muxed in a container.

But when the dtshd stream is extracted from the container don't put any global header, is only a sequence of individual frames.

A standard DTS is a sequence of individual frames, with the same size, and a individual header than show the frame duration (all the same):
Frame0, Frame1, ...

A DTS-HD have the same sequence of frames (the core) plus a subframe after each dts core frame:
Frame0+Subframe0, Frame1+Subframe1, ...

The subframes can have variable length (always with DTS-MA).

To know the exact duration a soft must read the whole stream (like LeeAudBi do).

Some soft only read the first frame Frame0 (or Frame0+Subframe0) and the filesize. Then assume the global duration with FrameDuration*Filesize/FrameSize, but of course is wrong because the Subframes have variable length.

rik1138
16th October 2012, 02:06
Yeah, that's the more technical description of what I think might be happening... :)

If the software isn't reading through the entire stream to determine it's duration, then it's probably 'guessing' based on the first frames/seconds, etc.

Thus the idea of converting the audio back to a WAV and see how long it is, just to test. If the .WAV file is the same duration as your video, then the DTS stream is fine, the software is just reporting it's duration incorrectly...

Rachegottes
16th October 2012, 11:15
Wow...
I think this could work, I will try it tomorrow and post the result.

Thank you so much =)

Rachegottes
17th October 2012, 19:13
OK that's very strange.
1. I tried a lot. Convert into MKV and demux to .dts
2. uTSmuxer -> demux

and many more.... everytime a dts file is coming out, the duration is 1hour and 17 minutes.
If I take the file and recode into .wav I get the correct duration of 52 minutes.

But as long it is .dts or .dtshd I'll get the 1hour 17 in every programm.

Getting crazy...

sneaker_ger
17th October 2012, 20:35
But as long it is .dts or .dtshd I'll get the 1hour 17 in every programm.

Including LeeAudBi?

Rachegottes
17th October 2012, 22:49
OK here we go:

I created a MKV with MakeMKV and the DTS-HD track like sneaker_ger said. I am sure the DTS-HD track is IN the mkv because I checked it with different programms like "Mediainfo".
Ok and now again the strange thing:

When I am done and put the mkv into TSmuxer (because mkvextract can't handle the created mkv, even MKVcleaver failed) I get a .dts file including the DTS-HD track and guess what???:
Correct: Duration 1hour 17 minutes.... holy sh.... how can this happen`?

By the way LeeAudiBi can't handle this dts file... only the .dts (core) files..... :(((
LeeAudiBi is reading and reading and stops with the log right here:

----------------------------------------- First Frame Info
CRC present .................: 0 (Not)
Number of PCM Sample Blocks .: 15 ( 512 samples/frame)
Primary Frame Byte Size .....: 2011 ( 2012 bytes/frame)
Audio Channel Arrangement ...: 9 (5 C + L + R + SL + SR)
Core Audio Samp. Frequency ..: 13 (48 kHz)
Transmission Bit Rate .......: 24 (1536 Kb/s)
Embedded Down Mix Enabled ...: 0 (Not)
Embedded Dynamic Range Flag .: 0 (Not)
Embedded Time Stamp Flag ....: 0 (Not)
Auxiliary Data Flag .........: 0 (Not)
Mastered in HDCD format .....: 0 (Not)
Extension Audio Descr. Flag .: 0 (Channel Extension XCh)
Extended Coding Flag ........: 0 (Not)
Audio Sync Word Insert. Flag : 1 (Sub-sub-frame)
Low Frequency Effects Flag ..: 2 (Present, interpolation factor 64)
Predictor History Flag Switch: 1 (Yes)
Multirate Interpolato

Rachegottes
17th October 2012, 22:51
I can upload the mkv if this helps anyone?

sneaker_ger
17th October 2012, 23:01
If it really makes mkvextract fail a sample would be good for the mkvextract dev to fix it.
But are you sure you're doing it correctly? Note that mkvcleaver 0.5.0.3 is broken for newer mkvextract versions and you need version 0.5.0.4. (Stream numbering changed, counting starts at 0 now.)
Also post the error message.

Rachegottes
17th October 2012, 23:11
I created a FTP Account and uploaded the mkv.
Everybody who is interested in helping me, please contact me for login data.
Thank you very much everybody.

Rachegottes
17th October 2012, 23:55
OK finally LeeAudBi gave me a full log. Just had to wait 10 minutes.

----------------------------------------- First Frame Info
CRC present .................: 0 (Not)
Number of PCM Sample Blocks .: 15 ( 512 samples/frame)
Primary Frame Byte Size .....: 2011 ( 2012 bytes/frame)
Audio Channel Arrangement ...: 9 (5 C + L + R + SL + SR)
Core Audio Samp. Frequency ..: 13 (48 kHz)
Transmission Bit Rate .......: 24 (1536 Kb/s)
Embedded Down Mix Enabled ...: 0 (Not)
Embedded Dynamic Range Flag .: 0 (Not)
Embedded Time Stamp Flag ....: 0 (Not)
Auxiliary Data Flag .........: 0 (Not)
Mastered in HDCD format .....: 0 (Not)
Extension Audio Descr. Flag .: 0 (Channel Extension XCh)
Extended Coding Flag ........: 0 (Not)
Audio Sync Word Insert. Flag : 1 (Sub-sub-frame)
Low Frequency Effects Flag ..: 2 (Present, interpolation factor 64)
Predictor History Flag Switch: 1 (Yes)
Multirate Interpolator Switch: 0 (Non-perfect Reconstruction)
Encoder Software Revision ...: 7 (Current)
Copy History ................: 1 (Definition deliberately omitted)
Source PCM Resolution .......: 0 (16 bits)
Front Sum/Difference Flag ...: 0 (Not)
Surrounds Sum/Difference Flag: 0 (Not)
Dialog Normalization Param. .: - 0 dB
--------------------------------------------- Revised Info
Final bytes invalid: 68 (Not enough space for frame)
Total Frames ......: 292698
Duration ..........: 3122,112 seconds. ( 0 h. 52 m. 2,112 s.)
Pad Bytes min./max.: 68 / 3056 (bytes between frames)
------------------------------------------------- End Info


So the dts file is fine with a duration of 52 minutes but still displayed wrong anywhere else.
So, I try to remux it to a m2v, maybe this works...

rik1138
18th October 2012, 01:04
OK that's very strange.
1. I tried a lot. Convert into MKV and demux to .dts
2. uTSmuxer -> demux

and many more.... everytime a dts file is coming out, the duration is 1hour and 17 minutes.
If I take the file and recode into .wav I get the correct duration of 52 minutes.

But as long it is .dts or .dtshd I'll get the 1hour 17 in every programm.

Getting crazy...

No, that's exactly what we thought would happen... The file is 52 minutes long, just ignore what any other tool says the duration is, it should be fine when you remux it. The other tools are just 'estimating' the duration.

LeeAudBi reported the duration correctly because it actually reads through the _entire_ file (that's why it took so long...)

Nothing sounds out of the ordinary, it should work fine.

setarip_old
18th October 2012, 01:51
Do yourself a favor and, as I suggested earlier, try MultiAVCHD...

Rachegottes
18th October 2012, 15:38
Ok, so first I thought, I remux it and put it into Adobe Encore, but this is not possible.
I have to but the files seperately into Encore because If I mux to m2ts and import into Encore, it just take the video stream and ignores the audio stream.

Still the Problem: Encore get's the DTS-HD file as wrong as every other programm (except LeeAudBi).
I contacted the Adobe Forum, but I don't think this will change soon.

So, any other Ideas?

@ setarip_old: MultiAVCHD, what was your idea with it exactly?

setarip_old
18th October 2012, 20:55
Things like: 3 Movies on 1 BD.
I recode the movies to fit on a BD and I want to passthrough the AudioVery simply stated, examine MultiAVCHD and you'll see that it can do this...

Rachegottes
18th October 2012, 21:05
This is the Problem, I can not usw MultiAVCHD to create a 3 Movies on 1 BD.
I have to do this with Encore and create Master for Replication.

I tried a lot now with MultiAVCHD.
Is it possible to create .mts files with MultiAVCHD?

This could help...

rik1138
18th October 2012, 21:59
Did you actually output the file from Encore and play it? Does it matter that it's reporting the wrong size? If Encore isn't re-encoding the audio, it shouldn't make a difference how long it _thinks_ it is...

If you have to use Encore, you are likely going to have to do one of two things (if the above doesn't work):
Convert the DTS-HD file to WAVs and just use PCM audio
Convert it to WAVs and re-encode back to DTS-HD MA using DTS's encoder, thus getting a proper metadata in the file...

I'd be curious to see if Encore would read that metadata correctly even if it was there... Or if it would still report the wrong duration... (If you don't have access the DTS encoder, PM me the FTP information for your file, I'll try it for to see if that would even work...)

Rachegottes
19th October 2012, 15:57
Hey rik1138,

this is the last Idea I started with yesterday.
It seems like the demuxed DTS-HD MA file can't be read by the DTS HD Encoder Suite (Streamtools) to fix it, so I have to extract the wavs and put them into the Encoder Suite to create a fresh DTS-HD MA.
Maybe this works...

About Encore, Encore doesn't burn or create a BD with this DTS-HD file inside, it gives errors everytime.
So, creating a fresh HDMA would be the best.

Interesting thing, it doesn't matter which tool I used to demux the DTS-HD stream (DVDfab, tsmuxer, staxrip), the file is not accepted by Encore or the HD Encoder Suite.
Still... only the core demux of these programs can be used in encore correctly.

I sent u the ftp data.
Maybe you can try to create a fresh DTS-HD-MA and I will do too.

Thank you a lot!

rik1138
19th October 2012, 20:25
Yeah, that's actually a deliberate function of the DTS Encoder/Streamtools. Once a DTS-HD MA file has been muxed to a Blu-ray disc, the header information is stripped off preventing it from being used in Streamtools to convert it back to .WAV files. This is a copy-protection scheme implemented by DTS to make the studios feel a little better about releasing perfect lossless audio of their feature films...

At the time eac3to (and other tools) didn't exist, and even DTS was unable to convert audio ripped from a disc back to WAV files (that they'd admit to, anyway)... Doesn't matter anymore of course, but I suppose it sounded good at the time. :cool:

Rachegottes
19th October 2012, 21:20
We are done with this problem right now.

I demuxed it to wavs and had to encode it again as a fresh DTS-HD Master which is now accepted by any software including Adobe Encore!

For professional use, there seems no way around buying licensed software for getting a clean DTS-HD MA.
For priavte usw Staxrip, DVDfab and anything else will be finde with their version of the DTS-HD MA file.

jpsdr
20th October 2012, 08:05
I've already demuxed DTS-HD MA from .m2ts files with eac3to, and been able to directly re-use them with Scenarist without any issue or any needs to re-encode them. Only tried until now with 2.0 and 5.1 tracks.

Rachegottes
20th October 2012, 15:00
Scenarist is much more intelligent then Encore ;)
As rik1138 said and I think so too: The Header information is beeing removed and Encore can't get it right because of that.
There are no options for fixing this issue in Encore, especially for BD authoring.

I know that encore is not the best tool for creating Blu-rays, but it works, and i can offer low budget projects to my clients.

rik1138
22nd October 2012, 21:14
Yeah, one of the things Scenarist does when importing any asset is creating these little .mui/.ves/.xui files. These are created by reading through the entire file and recording all the important data about the file (bitrates, duration, etc) at every 'frame'. Scenarist doesn't care about the header info, it figures it out for itself.

This is needed to make sure that the bitrates (and other things) stay within spec on a frame-by-frame basis. It needs to know the actual bitrate of every asset at every frame, to guarantee you never exceed the allowed bitrate. It's very picky about this. :)