Log in

View Full Version : Joining .ts files is always a/v out of sync


PetitDragon
11th March 2011, 13:02
Hi,

I found this wonderful site:

http://jpcmhd.tumblr.com/

It may be a stupid question but, I want to merge those short clips to a single .ts file. Unfortunately it is always a/v out of sync whatever apps (HDTV to MPEG2, tsMuxerGUI, etc.) I tried. Could you experts in this field give me solutions to solve this problem?

Thanks in advance.

netmask
12th March 2011, 03:41
I downloaded an example and ran it through MediaInfo, information below. Tried to demux it with ProjectX but didn't find the aac audio.

I think you will need demux both audio and video and then join up the 2 files in a MPEG2 editing program. Womble doesn't find the audio also.

My MP4Box GUI was able to demux and it has a join mode give that a go.

Format : MPEG-TS
File size : 23.7 MiB
Duration : 14s 401ms
Overall bit rate : 13.8 Mbps

Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : MPEG Video
Format version : Version 2
Format profile : Main@High
Format settings, BVOP : Yes
Format settings, Matrix : Default
Format settings, GOP : M=3, N=15
Codec ID : 2
Duration : 14s 448ms
Bit rate mode : Variable
Bit rate : 12.9 Mbps
Nominal bit rate : 20.0 Mbps
Width : 1 440 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.277
Stream size : 22.2 MiB (94%)

Audio
ID : 4352 (0x1100)
Menu ID : 1 (0x1)
Format : AAC
Format/Info : Advanced Audio Codec
Format version : Version 2
Format profile : LC
Muxing mode : ADTS
Codec ID : 15
Duration : 14s 406ms
Bit rate mode : Constant
Bit rate : 192 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 48.0 KHz
Compression mode : Lossy
Stream size : 338 KiB (1%)

-TiLT-
12th March 2011, 04:00
Usually mkvmerge (append style), eac3to (-demux), tsmuxer prevents audio-desync-problems.

First try to leave out the eac3to step.

PetitDragon
12th March 2011, 04:31
...I think you will need demux both audio and video and then join up the 2 files in a MPEG2 editing program..[/CODE]

Hi netmas thanks for reply. Did you mean if merging 10 those clips I have to demux them into 10 videos and 10 audios, and then rejoined the whole things in an editor? Wow it seems not an easy job. I also tried ProjectX to directly join them to a single file, and it's still out of a/v sync beginning the second clip. Playing every single clip separately is sync fine.:rolleyes:

Is there any app can do it in a easy way?

PetitDragon
12th March 2011, 04:39
Usually mkvmerge (append style), eac3to (-demux), tsmuxer prevents audio-desync-problems.

First try to leave out the eac3to step.

Hi,

I tried tsmuxer (mkvmerge doesn't support .ts) too and till no luck. I'll try eac3to. Thanks.

netmask
12th March 2011, 06:21
Hi netmas thanks for reply. Did you mean if merging 10 those clips I have to demux them into 10 videos and 10 audios, and then rejoined the whole things in an editor? Wow it seems not an easy job. I also tried ProjectX to directly join them to a single file, and it's still out of a/v sync beginning the second clip. Playing every single clip separately is sync fine.:rolleyes:

Is there any app can do it in a easy way?

I don't think so :rolleyes: Demuxing especially via ProjectX gets rid of many timing errors but unfortunately it doesn't find the aac audio. That leaves mp4box http://my-mp4box-gui.zymichost.com/ which will demux.

It's not an onerous job really. If you can convert each file into MPEG2 video with say MP3 audio you should be able to just join them up without sync issues. I suspect it is the AAC audio that is causing the problem with the software you are using at the moment.

The final "desperate" method would be to select all 10 files and input them into VSO ConvertXtoDVD and they would play either consecutively without action on your part or as separate items with a menu.

PetitDragon
12th March 2011, 08:58
I don't think so :rolleyes: Demuxing especially via ProjectX gets rid of many timing errors but unfortunately it doesn't find the aac audio...

Hi,

It's strange. Before asking here I tried to joined several clips with ProjectX and the output file did include the AAC audio track. ConvertXtoDVD seems a good idea. Does it support HD content?

netmask
12th March 2011, 09:29
Re ProjectX - if you merely use the join feature by slecting several files and then selecting To TS then yes it should do a dumb copy so the AAC will be carried through. I used To Demux (first option) to get a separate audio and video file. No go with this mode and it is only this mode that ProjectX fixes timing issues.

ConvertXtoDVD does handle HD material in-fact it handles just about anything you throw at it. I use it down scale 1920p files to DVD (for auditioning purposes) for one of my clients.

PetitDragon
12th March 2011, 09:39
Re ProjectX...

Ah I see (ProjectX).

I just want to know is there any app that does the same thing as ConvertXtoDVD, but outputs the HD video stream untouched?

Thanks.

netmask
12th March 2011, 10:23
I can't give any other suggestions that I have used for this application.

There may be other solutions. You could try Handbrake and convert them to mkv format and then use mkvmerge to add them together.

good luck - if you find a solution post it so others may be inspired!

PetitDragon
12th March 2011, 17:39
...if you find a solution post it so others may be inspired!

Sure thing!

Tried VideoRedo and Smart_Cutter_Ps_Ts, and still no luck. :(

VideoRedo even can't open those .ts files ("no PID" error).

-TiLT-
12th March 2011, 19:59
Hi,

I tried tsmuxer (mkvmerge doesn't support .ts) too and till no luck. I'll try eac3to. Thanks.

GDSMux (from haali) supports ts to mkv muxing.
Sorry, I forgot about that.

PetitDragon
13th March 2011, 04:28
Hi, I have been told that "it's because the audio & video have different lengths (overhanging edges), so when you join them , they don't evenly fit flush with the next file". See http://forum.videohelp.com/threads/332824-Joining-ts-files-is-always-a-v-out-of-sync?p=2063992&viewfull=1#post2063992

@-TiLT-
Thanks note it.

netmask
13th March 2011, 23:39
.... and that's why I suggested demuxing to separate audio and video tracks. You are then in a position to standardise the audio parameters. mp4box http://my-mp4box-gui.zymichost.com/ which will demux.

Ghitulescu
14th March 2011, 09:46
I remember reading on this forum about a new software designed to circumvent this problem, I fail to remember its name, sorry.

PetitDragon
15th March 2011, 06:51
I remember reading on this forum about a new software designed to circumvent this problem, I fail to remember its name, sorry.

Thanks for the info. Please post the software name when you recall it.

blis
13th August 2011, 08:20
I found the only way to truely resolve this without using an editor and keeping the clips whole is converting to DV. Every format I tried reported a misalignment using mediainfo of audio and video except for DV. This obviously means that any resolution greater than 576 on the Y means a loss of quality during the intermediate phase.
I tried aligned splices using avisynth but this blew out RAM when joining hundreds of clips.

http://www.beachmumsracing.org.au/joining-video-clips/

Ill keep updating this post over time to include more information.