View Single Post
Old 4th December 2008, 14:40   #13  |  Link
canTsTop
Registered User
 
canTsTop's Avatar
 
Join Date: Apr 2007
Location: Lithuania
Posts: 120
Quote:
Originally Posted by Ventolin View Post
Woah, this is a glitchy sample!

After loading into TSPE, do a scan. This will reveal:

Continuity Errors: 764, Transport Error Indicator Errors: 0
Timestamp gaps: 16, PCR gaps: 7
Total number of separate discontinuous regions: 655

The Marker List will now contain alot of entries. Looking through there are 4 points which we can use:

A. First entry is at offset 1186092 (5 seconds in marker list)
B. Last entry is at offset 5670456 (24 seconds in marker list)
Gap in the middle between:
C. offset 2977168 (13 secs)
D. offset 5000236 (22 secs)

Every other marker entry is too close to each other to be of use, the biggest gap being about 3 seconds, with not much useable inbetween. Note that the marker list time values aren't quite accurate, once the marker is double clicked a time based on the nearest timestamp in the stream will be used (assuming timestamp mode is running which it will be by default). The byte position is the only thing we should be concerned with.

So, we need to make 3 cuts:
from start to point A.
from point C to point D.
from point B to the end

So:
1. double click the first entry, then click "Set" under End Point
2. Click on EDL tab to switch to EDL view
3. Click Add under EDL view (first entry will appear)
5. Click on Markers tab
6. Scroll to point C in Markers (look for offset 2977168 (13 secs)
7. Double click entry - this moves current position to that offset
8. Click Set under Start Point
9. Scroll to point D (offset 5000236 (22 secs))
10. Click Set under End Point
11. Click on EDL Tab to switch to EDL view
12. Click Add under EDL view (second entry will appear)
13. Click on Markers tab
14. Scroll down to the bottom of the list to the last entry (offset 5670456 (24 seconds in marker list) )
15. Double click last entry
16. Click on Set under the Start Point
17. Scroll to the very end of the video with the trackbar and using >> to make sure you're at the very end
18. Click on Set under End Point
19. Click on EDL tab
20. Click on Add under EDL view - 3rd entry should appear.

Lots of steps to create a 3 entry EDL, but it's simpler once you do it.

The EDL should now have something like this:
00:00:00.00 0 00:00:03.80 1186280
00:00:15.08 2977168 00:00:21.96 5000424
00:00:29.79 5670456 00:00:46.01 10440580

If you click Edit now, you will generate a playable, non-crashing clip. The audio cuts out a bit too much though but stays in sync.

To try and improve the audio, Uncheck Menu Edit->Clean Edit Point->Clean Audio Frames. This cuts audio at byte positions instead of looking at timestamp positions from the video stream at the expense of possible broken audio packets.

Now clicking edit produces a playable stream with better audio and we're done!

I hope the rest of the stream is clean, if you have that many errors all over the stream, it's really too damaged to be of much use.

If you're going to be re-encoding from this source, you'll have to do some more experimentation, but from a playback point of view, the edited clip is in sync.

Good Luck!

Regards,

Vent
Thank You for answer.

This sample intentionally so damaged

If i correctly understand this method cuts out damaged parts off file. I did exactly as you described (with Clean Audio Frames unchecked) and it kind off worked (DGAVCIndex didn't crash). But if i again open already edited (fixed) TS file in TSPE, scan, and there is Continuity Errors: 17. It would be good to have some kind of automation of this method if for example there is 3 hours recording where we need to do ~20 cuts


Is this is only way to fix damaged TS files? Maybe something like ProjectX, it replaces damaged frames with empty frames?
canTsTop is offline   Reply With Quote