PDA

View Full Version : cutting/trimming a TrueHD stream, how?


sucker
5th April 2009, 09:33
hi guys, itīs my 1st post here and so i want to say hi to everybody :)

man 5 days are a LONG time if you want to know something/have a problem

heres is my problem:
i want to cut the 1st 3+ minutes of a Blu-ray TrueHD stream (adding negative delay or cutting which should essientally the same i guess?)
iīd like to know what options do i have to do this

eac3to couldnīt add the negative delay to the native TrueHD stream, it worked when i converted it to PCM and then added the delay, but iīd like to keep the stream in itīs original TrueHD form if possible, btw is eac3to able to delay a TrueHD stream normally, but has problems with my specific stream, or canīt eac3t alter a TrueHD stream at all without transcoding to another codec (PCM, DTS...) ?
tsmuxers trim function didnīt work for me as well, somehow it didnīt do anything at all with the stream (maybe iīm doing something wrong?) is tsmuxer able to trim TrueHD streams at all? i tried to delay the TrueHD stream with tsmuxer as well while remuxing to Blu-ray but it only lets me put in 60000ms (1min) and then doesnīt really add the negative delay, strange

tia for any hint

ACrowley
5th April 2009, 10:09
Use TSmuxer with the TrueHD in M2TS(wont work with demuxed TrueHD!).
Tsmuxer can apply Delays and Trim/cut Files

sucker
5th April 2009, 12:21
sorry forgot to mention my files are demuxed
if i got you right, i need to remux everything 1st to m2ts, then taking this as the source and trim the TrueHD track, what do i choose as output, can i demux or do i have to remux to .m2ts ?

Austin Forgotten
5th April 2009, 22:02
If your comfortable using a hex editor, then try this on a copy of your file.

depending on the files attributes, you can determine the length in seconds per major sync (i.e. packet).

for a thd file 48kHz:

samples/block : 40 (per channel)
blocks/packet : 128 (per channel)
samples/packet: 5,120 (per channel)

seconds = samplesperchannel/samplerate;

So depending how many seconds you need to remove from the end of the file, you need to determine how many packets (major syncs) to search for.

Fire up your fav hex editor, and search backword from the end of the file for major sync bytes.
in this case trueHD is: f8726fba (hex)

Keep track of the number of packets found when searching, then cut at the start of the major sync (you may or may not need to cut an additional 2-4 bytes before the sync).

I forgot to mention that you can't be sure about the lenght of the last packet, so it can be anywhere between (0- 5,120 samples/channel)

btw anyone have a short clip of thd file other than 48kHz, and also one which is actually 24 bit?

example using the unrel ver of my app now supporting mlp/thd.
i.e. test file: dragon.71ch.thd

tranzcode dragon.71ch.thd /i

File Information: "dragon.71ch.thd"
--------------------------------------------------------------
file type : Dolby TrueHD
byte order : motorola (non-intel)
channels : 8 [7.1]
substreams : 3
bits/sample : 16 bit
sampling rate : 48,000 Hz
samples/block : 40 (per channel)
blocks/packet : 128 (per channel)
samples/packet: 5,120 (per channel)
packets : 142
bit rate : 6,144 kbps (peak) [vbr]
samples : 724,560 (per channel)
seconds : 15.095
length (time) : 00:15.095
file size : 5,242,880 bytes
channel layout: ch assignment n/a [FL,FR,C,LFE,SL,SR,LRS,RRS]

hope this helps.

ACrowley
6th April 2009, 11:33
sorry forgot to mention my files are demuxed
if i got you right, i need to remux everything 1st to m2ts, then taking this as the source and trim the TrueHD track, what do i choose as output, can i demux or do i have to remux to .m2ts ?

i mean that you can only use a "not demuxed" TrueHD(with AC3) Track into M2TS. That means the untouched M2TS from BluRay or the remuxed M2TS with only the TrueHD(+AC3) included
But you cant mux a single demuxed TrueHD back into M2TS. TSmuxer/Remuxer cant do it and i dont know any other Tool (maybe Sonic Scenarist)

That means :no Luck when your TrueHD "is already demuxed" ..i know thats not nice and i have soem demuxed TrueHD Tracks too

But you can try to cut/split a altready demuxed TrueHD with some simple File Splitter Tool or with a hexeditor.
TSMuxer can split/cut/mux it only when you use the TrueHD into M2TS

sucker
6th April 2009, 17:51
i took the original m2ts and trimmed it with tsmuxer while outputting to Blu-ray, it worked
thx for your input ;)