PDA

View Full Version : H264_cutter causing sync problems for me


tvconfuse
19th October 2008, 04:10
I'm using H264_cutter to cut the commericals out of my .TS files (by HD PVR). I don't have any problems using the software and everything seems fine. The cut .TS plays fine on the computer but i wanted to play it on my ps3.

So when I mux the .TS into a m2ts file I get audio synch issues. It happens right after the first commerical cut, the audio is delayed by a few secs

I tried demuxing the video & audio from the .TS file then remuxing it back to a m2ts file but same problem

I tried muxing the .TS file without demuxing and same problem.

The same file without the commerical edits is fine after being muxed into a m2ts file.

what am i missing?

rica
19th October 2008, 04:39
I'd suggest to demux video and audio with eac3to.
Remux them back to ts with TSMuxer and cut this ts with TSMuxer again.

tvconfuse
19th October 2008, 07:39
I'd suggest to demux video and audio with eac3to.
Remux them back to ts with TSMuxer and cut this ts with TSMuxer again.

how do you demux video from the audio with eac3to? I got it but i can't figure out how the video demux works. I can only find the audio demux

tvconfuse
19th October 2008, 08:07
so I demuxed the original uncut .TS file with eac3to. During the demux i notice that the aac audio was listed as 131kps 48khz and -100ms, does the -100ms <--- mean the delay in audio?

when I load the aac file into tsmuxer i notice that the audio delay is set to 0. Should i set that to -100ms?

rica
19th October 2008, 13:28
Leave it as is.

tvconfuse
19th October 2008, 18:39
so I demuxed the .TS file using eac3to and I ended up with a .h264 file and an .aac file. I tried to load the .h264 file into sony vegas and sony gives me an error. I tried loading into nero and error as well.

I took the video & audio, remux it into a new .ts file using tsmuxer. The file plays fine with no synch issue.

I cut the commericals out using h264_cutter and the resulting .ts file plays fine.

Now I use txmuxer to change the ts file into a m2ts and the end file has an audio synch problem...:mad:

I don't know what's going on, if I mux and don't cut the .ts file, the resulting m2ts file is fine. If I do cut and then mux i get audio synch problems.

if I just cut the .ts file and do not remux there is no synch problems.

I just want to play the file on the ps3 as a m2ts file. Why isn't it working correctly.

rica
19th October 2008, 19:28
tvconfuse, i've been confused as well :)

You say:
First demuxed elementary streams with eac3to-as advised.
Second remuxed them back into a ts container with TSMuxer-as advised.
Untill this step, you say no sync. issues, correct?
After cutting ts with h-264 cutter and remuxing back you live issues again.
The question is why you don't cut with TSMuxer instead of h264cutter?

3.step: Cut/remux to m2ts with tsmuxer (at the same time).

tvconfuse
19th October 2008, 20:20
tvconfuse, i've been confused as well :)

You say:
First demuxed elementary streams with eac3to-as advised.
Second remuxed them back into a ts container with TSMuxer-as advised.
Untill this step, you say no sync. issues, correct?
After cutting ts with h-264 cutter and remuxing back you live issues again.
The question is why you don't cut with TSMuxer instead of h264cutter?

3.step: Cut/remux to m2ts with tsmuxer (at the same time).

I don't see an option to cut commericals in tsmuxer...

rica
19th October 2008, 20:26
I don't see an option to cut commericals in tsmuxer...

OK, there is no automated option.
First you determine the cut points using your favourite player as minutes or seconds.
Open TSMuxer, you will find "Split/Cut" under menu; don't select split, just tick "cut" option and tell tsmuxer start and stop times (as minutes or seconds) and remux whatever you want.

tvconfuse
19th October 2008, 21:10
since i'm interested in taking out the commericals, after i mark my non commerical parts for cutting, should i just mux them to m2ts then join the various m2ts files together in tsmuxer?

rica
19th October 2008, 21:16
No, in this case you have to merge them in eac3to and demux again to merged elementary streams and mux them back with TSMuxer.
like:
eac3to input.001_m2ts+input.002.m2ts 1: output.h264 2: output.aac

tvconfuse
19th October 2008, 21:35
No, in this case you have to merge them in eac3to and demux again to merged elementary streams and mux them back with TSMuxer.
like:
eac3to input.001_m2ts+input.002.m2ts 1: output.h264 2: output.aac

so if i get this straight.

- I cut each section that i want out as a m2ts file.

- now I have X m2ts files, each parts of the complete tv show.

- I merge each m2ts and output a single .h264 and a single aac file using eac3to

then taking the .h264 & aac file, I merge them back as a m2ts file in tsmuxer.

correct?

rica
19th October 2008, 21:39
Correct but make sure you don't live any synch. issues with just one m2ts first.

So try to get one cut m2ts with the method i stated already:
step1
step2
step3.

And if everything seems OK with one cut/remuxed m2ts, then go through step4.

tvconfuse
19th October 2008, 21:57
well eac3to is giving me an error when i tried to get the audio to come out.

I run this

eac3to 00001.m2ts+00002.m2ts 1: tv.h264 2: tvsound.aac

and get this error

M2TS, 1 audio track, 0:15:37
1: AAC, English, 2.0 channels, 126kps, 48khz
this audio conversion is not support

rica
19th October 2008, 22:00
well eac3to is giving me an error when i tried to get the audio to come out.

I run this

eac3to 00001.m2ts+00002.m2ts 1: tv.h264 2: tvsound.aac

and get this error

M2TS, 1 audio track, 0:15:37
1: AAC, English, 2.0 channels, 126kps, 48khz
this audio conversion is not support

Can you add the log created by eac3to?

EDIT: First get the info:
eac3to 00001.m2ts+00002.m2ts /enter.

It's gonna say what track is 1. and what track is 2:
I suppose in your case audio track is 1:
if so; correct as 1: tvsound.aac 2: tv.h264

tvconfuse
19th October 2008, 22:11
eac3to v2.68
command line: eac3to 00001.m2ts+00002.m2ts 1: tv.h264 2: tvs.aac
------------------------------------------------------------------------------
M2TS, 1 audio track, 0:15:37
1: AAC, English, 2.0 channels, 126kbps, 48khz
This audio conversion is not supported.

rica
19th October 2008, 22:18
Could you please try this first:

eac3to input folder\00001.m2ts (and enter)

and please tell me what you see?

tvconfuse
19th October 2008, 22:23
okay the audio track was 1: and video was 2:

however while it ran it gave me another message

eac3to v2.68
command line: eac3to 00001.m2ts+00002.m2ts 1: tv.aac 2: tv.h264
------------------------------------------------------------------------------
M2TS, 1 audio track, 0:15:37
1: AAC, English, 2.0 channels, 126kbps, 48khz
The source file doesn't contain a track with the number 2.

rica
19th October 2008, 22:30
Please read my previous post; i've been still waiting.
Just copy/past cmd; right click "select all" and paste it to a txt editor.

tvconfuse
19th October 2008, 23:39
Please read my previous post; i've been still waiting.
Just copy/past cmd; right click "select all" and paste it to a txt editor.

Sorry to keep you waiting, my gf dragged me of to clean. I don't have a input folder for the 00002.m2ts file. The file is in the same folder as eac3to. I'll send the output in a few mind. My gf is still nagging

tvconfuse
20th October 2008, 00:08
D:\download\eac3to>eac3to 00002.m2ts
M2TS, 1 audio track, 0:11:50
1: AAC, English, 2.0 channels, 126kbps, 48khz

D:\download\eac3to>

rica
20th October 2008, 00:11
D:\download\eac3to>eac3to 00002.m2ts
M2TS, 1 audio track, 0:11:50
1: AAC, English, 2.0 channels, 126kbps, 48khz

D:\download\eac3to>

I can not see any video track here, do you?
I guess you've forgetten to add video track to TSMuxer:)

tvconfuse
20th October 2008, 00:13
this is interesting, the m2ts file that was cut/mux in tsmuxer doesn't show any video source under eac3to..

tvconfuse
20th October 2008, 00:14
I can not see any video track here, do you?

you're right there isn't but when i play the file back with powerdvd the video is differently there

tvconfuse
20th October 2008, 00:16
but if i input the file into tsmuxer it shows that there is a video file

rica
20th October 2008, 00:19
I'd suggest you to record an original ts without processing (around 50MB is ok-roughly 20 seconds) and upload it.
So i can not help further without a sample anymore.
(btw, i think you don't have any synch. issues left after cut/remux with TSMuxer???)

tvconfuse
20th October 2008, 00:29
no i don't have any issues with tsmuxer after cutting out each parts individually. The sync issues come when i merge the cut parts back into 1 file. That's why I was demuxing and unmuxing.

I just tried with an original stream capture and I did a quick cut/mux in tsmuxer and the resulting file when run under eac3to doesn't show a video source, only the audio. I don't know what tsmuxer is doing

Do you have place where i can upload a small original cap file?

rica
20th October 2008, 00:32
Do you have place where i can upload a small original cap file?

www.mediafire.com

tvconfuse
20th October 2008, 00:36
I'll upload the file in an hour, you can take a look at it and let me know what's going on

rica
20th October 2008, 00:39
OK, maybe today/tomorrow?
(a 50MB takes 15-20 minutes, don't worry; i'll be waiting.)

tvconfuse
20th October 2008, 01:33
uploading as i post this, thank for all the help

rica
20th October 2008, 01:39
You are welcome.
How about the estimated time?

tvconfuse
20th October 2008, 02:57
http://www.mediafire.com/?jxt2dzq2myj

there's the file 50 meg, 30 secs, original .ts file no processing

rica
20th October 2008, 03:33
OK, i got this:

eac3to v2.68
command line: eac3to\eac3to C:\preview.TS 1: video.h264 2: audio.aac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:00:29
1: h264/AVC, 1080i60 /1.001 (16:9)
2: AAC, 2.0 channels, 127kbps, 48khz, -100ms
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[v01] Creating file "video.h264"...
[a02] Applying AAC delay...
[a02] Creating file "audio.aac"...
Video track 1 contains 1766 frames.
eac3to processing took 2 seconds.
Done.

But i can not remux with TSMuxer; i get "access denied" message; weird!

EDIT: Dunno what happened; but my second trial was finished with success.

tvconfuse
20th October 2008, 03:45
all my .ts files are like that before i cut them.

That is weird but i don't think it'll make a difference. Try cutting it in tsmuxer and then running it in eac3to and you'll see that there's no video file listed anymore

rica
20th October 2008, 04:13
Yes, you are right.
This is the cut file:
http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335caa9605bd5e10aac98

And this is the the log i get from this cut file:

C:\>eac3to\eac3to C:\video_cut.m2ts
M2TS, 1 audio track, 0:00:14
1: AAC, 2.0 channels, 131kbps, 48khz


As if no video exists even there is already one.

I think we should report this to madshi.

Here is what mediainfo says:

http://img136.imageshack.us/img136/1914/tvconfusevp5.th.png (http://img136.imageshack.us/my.php?image=tvconfusevp5.png)http://img136.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

tvconfuse
20th October 2008, 04:22
Yes, you are right.
This is the cut file:
http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335caa9605bd5e10aac98

And this is the the log i get from this cut file:

C:\>eac3to\eac3to C:\video_cut.m2ts
M2TS, 1 audio track, 0:00:14
1: AAC, 2.0 channels, 131kbps, 48khz


As if no video exists even there is already one.

I think we should report this to madshi.

that would be awesome, i hope he can give us a solution :helpful:

madshi
20th October 2008, 11:22
The problem will be fixed in the next eac3to build, which however will probably not appear before next week.

rica
20th October 2008, 11:48
The problem will be fixed in the next eac3to build, which however will probably not appear before next week.

:thanks: :)

tvconfuse
20th October 2008, 17:28
thanks for all the help guys :thanks:

for the time being i found a work around the whole sync issue (until eac3to is fixed), it's not pretty, it's not going to give me a smooth transition between cut points but at least it doesn't give me an audio sync issue.

eac3to to demux the original .TS file.

Convert the aac file into an ac3 using foobar2000

merge the ac3 file with the .h264 file in tsmuxer

load the mux file into tsmuxer and edit out the parts that I want. can't get a clean cut have to keep a few secs of commerical's in

open tssplitter and use "join from harddrive" to start appending each file and save the destination file as an m2ts file (choose all files and label the extension m2ts)

The resultant m2ts file file plays on the ps3 with no audio sync (that i can find) plus it allows seeking (unlike mp4). The only problem is that the cut isn't clean and it tends to jump when it reaches the joining point. Having the commerical makes it jump at the commerical instead having it jump during the actual show.

I'm still looking for a better cut/edit option. Some way to put in a gradually fade in/out

rica
20th October 2008, 21:10
OK,
for the time being i've found a different method; please check this: (two cut ts files have been merged)

http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335caa9605bd5e10aac98

JonRead
21st October 2008, 06:39
TVConfuse, I have had the exact same problems, and what I found best to do is just de-tick "Recalc PTS" in the h264TSCutter options. If you haven't already tried that, then give it a go. If you then find the timings are wrong, then use TSREMUX (see bottom of post for link) to just remux the same stream without changing anything.

So.....

1 : De-tick Recalc PTS in the settings of H264_TSCutter
2 : If you find timings wrong, remux using the software called TS-Remux (I found TSMuxer would still cause audio problems, but for some reason TS-Remux didn't).

http://download.videohelp.com/download/TsRemux0212.exe

If I have misunderstood your problem then my apologies.

tvconfuse
21st October 2008, 08:02
OK,
for the time being i've found a different method; please check this: (two cut ts files have been merged)

http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335caa9605bd5e10aac98

which file is the merged one? trans cut. video.ts or video_cut.m2ts?

tvconfuse
21st October 2008, 08:04
TVConfuse, I have had the exact same problems, and what I found best to do is just de-tick "Recalc PTS" in the h264TSCutter options. If you haven't already tried that, then give it a go. If you then find the timings are wrong, then use TSREMUX (see bottom of post for link) to just remux the same stream without changing anything.

So.....

1 : De-tick Recalc PTS in the settings of H264_TSCutter
2 : If you find timings wrong, remux using the software called TS-Remux (I found TSMuxer would still cause audio problems, but for some reason TS-Remux didn't).

http://download.videohelp.com/download/TsRemux0212.exe

If I have misunderstood your problem then my apologies.

You didn't misunderstood my problem lol, i'll give it a try and see if that fixes the issue. Each time i cut something and then remux the cut files together audio sync but never on the uncut video.

tvconfuse
21st October 2008, 08:05
i'll post it later tomorrow it's 2 am for me right now lol

rica
21st October 2008, 11:41
which file is the merged one? trans cut. video.ts or video_cut.m2ts?

video.ts

tvconfuse
21st October 2008, 17:38
how did you do the merge?

rica
21st October 2008, 19:00
how did you do the merge?

1)Preview.ts (which you uploaded) demuxed by eac3to.
I got video.h264, audio.aac

2) video.h264, re-encoded with MeGUI.
Method:graph+avs

http://img522.imageshack.us/img522/9725/tvconfuse03cg7.th.png (http://img522.imageshack.us/my.php?image=tvconfuse03cg7.png)http://img522.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

DirectShowSource("C:\Users\rica\Desktop\dene.GRF",fps=29.970,audio=false)

ConvertToYV12()


(here you can use original preview.ts as well; like this:

http://img238.imageshack.us/img238/4692/tvconfuse02vm3.th.png (http://img238.imageshack.us/my.php?image=tvconfuse02vm3.png)http://img238.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
)

3)re-encoded h264mkv remuxed with original audio.aac into a ts container (video.ts) via TSMuxer.

4)got two short video_01.ts and video_02.ts files cutting by TSMuxer.(cut/remux)

5)Merged those two files with eac3to and demuxed into elemantary streams:

eac3to v2.68
command line: eac3to\eac3to C:\video_new_01.ts+video_new_02.ts 1: C:\Output\video.h264 2: C:\Output\audio.aac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:00:08
1: h264/AVC, 1080p29 (16:9)
2: AAC, 2.0 channels, 131kbps, 48khz, 8ms
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[v01] Creating file "C:\Output\video.h264"...
[a02] Applying AAC delay...
[a02] Creating file "C:\Output\audio.aac"...
Video track 1 contains 236 frames.
eac3to processing took 1 second.
Done.

6)Remuxed those main streams into a ts. (uploaded video.ts)

I think issue is up to video, not audio.

tvconfuse
21st October 2008, 21:52
1)Preview.ts (which you uploaded) demuxed by eac3to.
I got video.h264, audio.aac

2) video.h264, re-encoded with MeGUI.
Method:graph+avs

http://img522.imageshack.us/img522/9725/tvconfuse03cg7.th.png (http://img522.imageshack.us/my.php?image=tvconfuse03cg7.png)http://img522.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)

DirectShowSource("C:\Users\rica\Desktop\dene.GRF",fps=29.970,audio=false)

ConvertToYV12()


(here you can use original preview.ts as well; like this:

http://img238.imageshack.us/img238/4692/tvconfuse02vm3.th.png (http://img238.imageshack.us/my.php?image=tvconfuse02vm3.png)http://img238.imageshack.us/images/thpix.gif (http://g.imageshack.us/thpix.php)
)

3)re-encoded h264mkv remuxed with original audio.aac into a ts container (video.ts) via TSMuxer.

4)got two short video_01.ts and video_02.ts files cutting by TSMuxer.(cut/remux)

5)Merged those two files with eac3to and demuxed into elemantary streams:

eac3to v2.68
command line: eac3to\eac3to C:\video_new_01.ts+video_new_02.ts 1: C:\Output\video.h264 2: C:\Output\audio.aac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:00:08
1: h264/AVC, 1080p29 (16:9)
2: AAC, 2.0 channels, 131kbps, 48khz, 8ms
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[v01] Creating file "C:\Output\video.h264"...
[a02] Applying AAC delay...
[a02] Creating file "C:\Output\audio.aac"...
Video track 1 contains 236 frames.
eac3to processing took 1 second.
Done.

6)Remuxed those main streams into a ts. (uploaded video.ts)

I think issue is up to video, not audio.

did you suffer any quality loss when you re-encoded the split file?

rica
21st October 2008, 22:44
did you suffer any quality loss when you re-encoded the split file?

You have both of them; so you can compare them by yourself.
I selected x264 SA Blu-Ray preset, it is 8Mbit while your original is 13Mbit.
Normally i'd prefer to wait madshi to update eac3to. (never like re-encoding personally)
That was made just for test reason to understand the source of the issue.

tvconfuse
22nd October 2008, 00:10
okay gotcha, so the issue isn't so much the audio but more with the video stream itself..

rica
22nd October 2008, 00:16
Correct; i gave it a go with eac3to converting aac to ac3 ,nothing changed:
i saw only 1: audio.ac3 (without video)

tvconfuse
22nd October 2008, 03:13
2.69 of eac3to is out, that's the new version i believe. If it's a video file issue how would i fix it without having to re-encode the original file?

tvconfuse
22nd October 2008, 05:21
TVConfuse, I have had the exact same problems, and what I found best to do is just de-tick "Recalc PTS" in the h264TSCutter options. If you haven't already tried that, then give it a go. If you then find the timings are wrong, then use TSREMUX (see bottom of post for link) to just remux the same stream without changing anything.

So.....

1 : De-tick Recalc PTS in the settings of H264_TSCutter
2 : If you find timings wrong, remux using the software called TS-Remux (I found TSMuxer would still cause audio problems, but for some reason TS-Remux didn't).

http://download.videohelp.com/download/TsRemux0212.exe

If I have misunderstood your problem then my apologies.

I just tried it and i think I don't think this will help me. I don't have a sync issue with the cut's itself, they are fine. The issue is when I'm joining 2 cut files together to form 1 file. That's when the sync issues happen.


unless I'm missing it Ts-remuxer doesn't seem to let me append files (ex. 2 video files together) it just lets me mux a single file into another .ts or m2ts

rica
22nd October 2008, 13:03
2.69 of eac3to is out, that's the new version i believe. If it's a video file issue how would i fix it without having to re-encode the original file?

2.69 is not the version madshi mentioned.
You should wait for 2.70 (i suppose /on Sunday.)

tvconfuse
23rd October 2008, 21:44
2.69 is not the version madshi mentioned.
You should wait for 2.70 (i suppose /on Sunday.)

gotcha

rica
27th October 2008, 00:25
tvconfuse,
it is time to give it a go with eac3to.
2.70 has been just released.
Edit: I've just tried but i'm afraid the issue hasn't been solved on this SVN.

madshi
27th October 2008, 09:15
eac3to v2.70 (or newer) should now list both the h264 and AC3 tracks. At least it does on the sample that was uploaded earlier in this thread.

rica
27th October 2008, 18:41
eac3to v2.70 (or newer) should now list both the h264 and AC3 tracks. At least it does on the sample that was uploaded earlier in this thread.

This is correct; i made a new trial just now.
With 2.72, individual cut files works very well before merging.

Method:
1)Playing file to determine the cut points.

2)Demux hdtv ts file with eac3to:

eac3to v2.72
command line: eac3to\eac3to C:\preview.ts 1: C:\trial_out\video.h264 2: C:\trial_out\audio.aac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:00:29
1: h264/AVC, 1080i60 /1.001 (16:9)
2: AAC, 2.0 channels, 127kbps, 48khz, -100ms
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[v01] Creating file "C:\trial_out\video.h264"...
[a02] Applying AAC delay...
[a02] Creating file "C:\trial_out\audio.aac"...
Video track 1 contains 1766 frames.
eac3to processing took 2 seconds.
Done.

3)Cut/remux (at the same time) with TSMuxer. (cut-file)

At that point eac3to list the tracks and remuxed cut ts files play individually without any synch. issues.

Here are remuxed cut-ts files:

http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335cab7081583fbd7276c

Problem starts in merging with TSMuxer:

Method:

1)Merging those cut files and demuxing into main streams:

eac3to v2.72
command line: eac3to\eac3to C:\trial_out\video_cut_01.ts+C:\trial_out\video_cut_02.ts 1: C:\trial_out\video_cut_out.h264 C:\trial_out\audio_cut_out.aac
------------------------------------------------------------------------------
TS, 1 video track, 1 audio track, 0:00:11
1: h264/AVC, 1080i60 /1.001 (16:9)
2: AAC, 2.0 channels, 131kbps, 48khz, -154ms
Track 2 is used for destination file "audio_cut_out.aac".
[v01] Extracting video track number 1...
[a02] Extracting audio track number 2...
[v01] Creating file "C:\trial_out\video_cut_out.h264"...
[a02] Applying AAC delay...
[a02] Creating file "C:\trial_out\audio_cut_out.aac"...
Video track 1 contains 656 frames.
eac3to processing took 1 second.
Done.

2)Remuxing those video and audio back to ts with TSMuxer.
Here; you will get the synch. issues on this file.


But what is interesting is creating a merged mkv file using the same raw media gives no any kind of issues.

Here is problematic TS and unproblematic mkv:

http://www.mediafire.com/?sharekey=610f03b89c15442eab1eab3e9fa335ca597d786b02107b76

The difference, i specified '--aac-is-sbr/HE-AAC/AAC+' option manually on MKVMergeGui.

Thanks madshi btw.:thanks:

_ _ _ _ _