Log in

View Full Version : Edit m2ts header


lindewell
10th June 2010, 17:14
Hi, I'm trying to sync audio and video of a m2ts file, the timing is tiny and I have to rebuild the whole m2ts each time i'm changing audio delay. It's a pain in the ass because the file is 3 Go and I have to test in on PS3. Can I quickly edit the audio delay without having to remux everything?

Inspector.Gadget
10th June 2010, 17:29
What's a "3 Go" file?

Guest
10th June 2010, 17:29
Probably 3 GBytes.

lindewell
10th June 2010, 17:31
Yes I mean 3 Gb.

deank
10th June 2010, 18:46
The actual audio delay is not just a "value in a header", but presence (or not) of audio packets.

You can't go around and you'll have to re-mux the file.

//

For the US readers :) Go is used in France I think + all Playstation3 consoles came labeled as 40Go/80Go... for 40GB/80GB... :)

lindewell
10th June 2010, 21:11
Are you sure about it or is it speculation? Something made me think I can edit it. I created 2 m2ts, one has 1700 ms delay and the other none. The 2 files have the exact same size, when I load the file in tsMuxer, it memorizes the delay so this information must be stored somewhere and is probably editable without need of complete remux.

deank
10th June 2010, 21:16
I'm sure. m2ts file size has nothing to do with the delay, because it is always rounded to 6144 bytes. In case of 2-3 seconds delay there may be some size difference... When you load the file in tsMuxeR it calculates the delay, based on when the the 1st video packet appears and when the audio packets appear (using PTS stamps in m2ts packets).

Of course, if you don't trust this info - binary compare two m2ts files with different delay settings.

Guest
10th June 2010, 21:17
deank is right.

The "delay" in the file is just the difference between the audio and video timestamps for packets taken from one point in the stream. You can determine it by looking at the stamps at the beginning of the file. To change it you would need to rewrite timestamps throughout the file, and in any case doing that alone risks causing havoc with the buffering model.

Ghitulescu
11th June 2010, 08:14
For the US readers :) Go is used in France I think + all Playstation3 consoles came labeled as 40Go/80Go... for 40GB/80GB... :)

In French (the language), because that includes French Canada as well and former colonies, they Frenchmen have completely different words describing computer terms (Go - gigaoctet, souris-mouse, pilot-driver, ordinateur-computer etc. comprehensive translations though).

setarip_old
11th June 2010, 20:25
@deank

Hi!For the US readers Go is used in France I think + all Playstation3 consoles came labeled as 40Go/80Go... for 40GB/80GB...Thank you for your concise explanation ;>}

Guest
11th June 2010, 20:26
I suppose the "o" stands for "octets".