Log in

View Full Version : Incorrect total time after cut and join


Capsbackup
1st October 2007, 16:13
Tried my first HD capture from Comcast HD DVR DCT 6412 III, thru firewire to hard drive via CapDVHS. Time for the entire capture was 1:00:51,and was 5.31GB. After cutting out commercials I end up with 6 shorter clips that total to 41:44, and 3.65GB. Each clip maintains audio sync perfectly when played back on Media Player Classic. When I try to join the clips with either HDTVtoMPEG2 v1.11.93 or with TSSplitter.v1.0 or with I-Media FileMerger, the join is fine, the audio stays in sync, but the time displayed of the merged file says 1:00:45, and is 3.65GB, just like the total of the 6 joined clips. Play back is actually the 41:44 like the time being added together. Just that Media Player Classic reports the total time as 1:00:45, not the expected 41:44 trimmed total time. Also, if I try to advance the time thru the slider in Media Player Classic, play will freeze for several seconds, then resume. If I then try to advance to where the trimmed clips should start and end, the time interval is not correct with the actual trimmed file times of these clips. However, If I just start from the beginning and let it play, the entire play is fine with the exception of the player shows the approx. 20 minutes to play when the actual file ends. Media Player Classic then quickly ends and the clip shows complete.

Schmendrick
1st October 2007, 16:46
The reason for this behaviour is that the time reference which Media Player Classic is retrieving from your joined clips appears to be the difference of the last PTS (Presentation Time Stamp) value in your clip and the first PTS value. These PTS values are produced during encoding of the video stream and put into the "programme elementary stream" (PES) container into the header area in front of each PES packet. When you cut and join your clips these values does not seemed to be recalculated and rewritten. I have found that you can use tsremux to do exactly this. If you feed your joined clip as input to tsremux then you will obtain an output ts-file with rewritten PTS values which should behave correctly.

Schmendrick

Capsbackup
2nd October 2007, 03:42
Thanks Schmendrick, that worked perfectly as you stated.