Back Forum Reply New

TS -gt; mkv

Hi folks,

i'm glad my waiting period is over now. It's a good thing so i had some more time to try to solve my issue myself. But anyway, i had no success.

So here is what i do. I have recorded Transportsstream from HDTV (Source Cable/MPEG2-VIDEO/AC3-AUDIO) so i have edited files after removing the commercial which play perfectly fine and i have no trouble viem them on any pc i have.

But i want to reduce the size of them. So here is what i do.

I let MPEG2REPAIR check the ts and fix any errors found.
I load the fixed (tried unfixed also) in DGIndex and let it create a d2v file and the audio stream ac3 file.
I use StaxRip (tried scripting my self and vdubmod) to create the AVS scripts and then ...
The file is now being encoded (2-pass, x264, mkv container) and then ...
Muxed with mkvmerge from the encoded videostream and the untouched ac3 file (delayed like dgindex suggested) into a new file.

I have processed now about 10 episoded that i recorded and only half of them have synced audio. the other half starts with synced audio, but after watching a while it gets off-sync until it's about ~1 second in the end.

I tried everything now, i even reencoded the episoded a few times again. Changed my avs script cause i thought it made the video laggy which resulted in off-sync audio, but no improvement helped.

I also checked my computer hardware, i'm palying the encoded files on a 1.86 GHz Pentium M (Centrino) with CoreAVC / Haali and the cpu is not at 100% during playback.

... i just dont know what to do anymore ...

... sources are okay (MPEG2REPAIR)
... encoding process works (60% turn out to be fine!)

... any ideas what else I should try? Or maybe i'm doing something wrong ...

... thanks in advance!

In place of Mpeg2repair/dgindex try out projectx instead.  Also, what network is this off of?  If it's Fox look out for varying bitrates in the audio ... they wreak havoc in avi, but I don't know if the case is the same with mkv.

The recording is from abc.

Is it normal that DGIndex (1.4.7 b3) shows a framerate of 59.940060 and not 59.94? that could mean that the video is faster then the audio, but why?

I think i'll reencode with the new d2v file and then check if it might work ...

Edit: I checked a file with the new dgindex that worked abd was not offsync and it has the same framerate.

But on the other hand i just saw that the ac3 file is 1 second shorter ... and i dont know why? that might be the reason for the offsync at the end (which is also 1 second) ... i tried to stretch the audio while muxing with mkvmerge but it's still the same offsync in the end. maybe the ac3 is just not streched by mkvmerge. is there any other tool that does that (besweet is strange and i dont see how to do it with it) ...

... thanks

The framerate reported by DGIndex is correct; the real framerate is actually 60000/1001, which is approximately 59.94.
I'd put my money on varying bitrates like GaveUp said, he actually made a nifty tool to fix it: showthread.php?t=92325

(In theory different sized ac3 frames should work in mkv due to timecodes but I don't know if any muxer supports it.)

Well, fixing the ac3stream with this nice tool did not help.

I'll try ac3scaler, to fit the stream to the same length, that might give me a good result.

Edit:
Argh, did not work either till now. I dont know why, the files now have the same length.

I tried to mux 2 episodes now, from which i have the mkv video and ac3 audio seperatly, but ...

... muxing one episode did not work properly. mkvmerge just skipps thge last 10 minutes (w/o any error msg), and the file is 300mb smaller then it should be. BUT the audio is now synced till the end.

... the other episode is muxed completely but still offsync.

Right now i dont know from which point i should approach the problem. In my opinion i tired everything, and nothing worked quot;out-of-the-boxquot; ...


Originally Posted by mfgI'll try ac3scaler, to fit the stream to the same length, that might give me a good result.

I have not heard of this application.... Where is it from please?Cheers


Originally Posted by SeeMoreDigitalI have not heard of this application.... Where is it from please?Cheers

~zhuo/audioscale.html

Anyone who has an idea how i could fix my sync problem?

Thanks mfg,

I wonder if anybody can create a GUI for these two .exe filesCheers


Originally Posted by SeeMoreDigitalThanks mfg,

I wonder if anybody can create a GUI for these two .exe filesCheers

I'll make a GUI, but just so we can go back to my topic


Originally Posted by squid_80(In theory different sized ac3 frames should work in mkv due to timecodes but I don't know if any muxer supports it.)

From what I know of the avi format vbr ac3 should be fine with it too, just that the muxers don't chunk it up properly like they do with vbr mp3.

Well, the ac3 is not VBR, it's CBR!


Originally Posted by GaveUpFrom what I know of the avi format vbr ac3 should be fine with it too, just that the muxers don't chunk it up properly like they do with vbr mp3.

It'd work if you played the file right through from start to finish. If you randomly seeked to a point past the shorter ac3 frames, the wrong position in the audio stream would be calculated since it assumes a constant bitrate.

Well i tested this of course and the audio is becoming offsync while watching ...

Okay, i managed to scale the track right and i was able to mux it. it worked

so here is the GUI. dont know how you like it, but anyway:
Interesting how it says there's 1458 trailing junk bytes...

I can only second the suggestion of using projectx for demuxing rather than relying on mpeg2repair/dgindex. I've never used mpeg2repair, but judging by it's name I wouldn't expect it to correct transmission errors in ac3 audio streams.

It looks great mfg. Can't wait to try it out...

Me thinks it's got to have it's own thread

Stumbling upon new useful utilities always brings a smile to my face
¥
Back Forum Reply New