Log in

View Full Version : Audio out of sync when encoding from MPEG-2 to H.264/AAC with megui


St Devious
13th October 2007, 15:34
I encoded MPEG-2 file captured from analog TV source , but the video and audio r always out of sync . I use megui for encoding.

This is wat i have tried over time and still not able to solve the problem .

TEST 1 :

Encode MPEG-2 to H.264/AAC using Megui .

Result : Audio out of sync with video .

TEST 2 :

Encoded MPEG-2 to WMV using Total Video Converter

Result : Audio in sync with video

Encoded the resulting WMV file to H.264/AAC using Megui .

Result : Audio again out of sync with video .

Plz someone help me with this .

Ranguvar
14th October 2007, 02:54
Is it out of sync before or after encoding?

And is it a fixed miss sync (always 500ms off, for example) or does it increase/decrease throughout playback?

St Devious
14th October 2007, 06:31
Is it out of sync before or after encoding?

And is it a fixed miss sync (always 500ms off, for example) or does it increase/decrease throughout playback?

it is off sync after encoding , and the audio is in sync at the start but then goes out of sync as the video progresses .

bond
14th October 2007, 09:59
you are using a wrong video framerate

St Devious
14th October 2007, 14:22
you are using a wrong video framerate

ok so how and where do i enter the correct framerate while using megui ?

Terranigma
14th October 2007, 15:38
ok so how and where do i enter the correct framerate while using megui ?

Well, if it's .mp4, use YAMB 2.0 (http://yamb.unite-video.com/download.html) to correct the framerate (if you prefer to use a gui that is).

St Devious
20th October 2007, 06:10
i first converted mpeg-2 clip to wmv and everything was fine . Then i converted wmv clip to H.264 and audio again went out of sync . PLz Help !

Atak_Snajpera
20th October 2007, 12:56
if you convert from WMV no wonder you have problem with synchronization!

try this:
DirectShowSource("your_movie.wmv",fps=xx,audio=false)

If you are in PAL zone use fps=25 but if you are in NTSC use 29.97

St Devious
22nd October 2007, 18:13
if you convert from WMV no wonder you have problem with synchronization!

try this:
DirectShowSource("your_movie.wmv",fps=xx,audio=false)

If you are in PAL zone use fps=25 but if you are in NTSC use 29.97

i have tried encoding MPEG-2 to H.264/AAC and MPEG-2 to WMV to H.264/AAC , everytime problem is same , and i do use that command in my avisnth script which is created by avisynth script creator of Megui .

Sharktooth
22nd October 2007, 19:51
what about reading the guides, the wikies and using the forum search function?

you have set the wrong framerate (or just left the default framerate which may be not good in your case). correct it using the avisynth script creator in megui BEFORE encoding. how? :readguid:

St Devious
23rd October 2007, 13:35
what about reading the guides, the wikies and using the forum search function?

you have set the wrong framerate (or just left the default framerate which may be not good in your case). correct it using the avisynth script creator in megui BEFORE encoding. how? :readguid:

I have encoded many videos with megui in the past , i have never encountered this problem .

Wat i did is i let megui's avisynth script creator do it's thing and make the script according to the options i choose like deinterlacing . The framerate was the same as that of the source i.e. 25 . But still the audio was out of sync .

scissors
28th October 2007, 18:20
For weeks i've been trying to convert a copy of 300 mkv to an avchd for you on my ps3.

I've finally got it playing, but it's out of sync (seems justabout everyone has this problem reading around the net...)

Anyway, I always assumed it was something i was doing wrong with my recode.

So i tried just extracting the h264 and ac3 files then just remuxed them with xmuxer pro to a mux.ts file.

When i played in neroshowtime, surprise surprise, it's out of sync. Now i never did any changes, just a mux.

yet the mkv stays in sync in vlc media player?

So now I'm wondering what to do ....

St Devious
2nd November 2007, 17:46
Plz someone help !!

Guest
2nd November 2007, 17:58
For weeks i've been trying to convert a copy of 300 mkv Where did you get that?

jethro
2nd November 2007, 19:54
I think something is b0rked when you use AviSynth + WMV.

I had this problem with a/v sync when I tried to recompress a WMV file.
It was strange because a part of video got duplicated at the end (audio got progressively behind video and when video ended before full clip length a couple last minutes got repeated to fill up).
Exact same behavior on 2 different computers with megui, RipBot or VirtualDub.

Please use Virtualdub with fccHandler's WMV plugin for this file. You can try Mencoder as it was without this problem too.

Atak_Snajpera
2nd November 2007, 23:07
I had the same problem with Dust to Glory downloaded from microsoft. Many frames at the begining was skipped and at the end video was repeated. However I've found solution how to correct that in my GUI. You need to rewind in MPC to beginning by pressing stop and play. Next step is to find out correct audio delay and then calculate number of frames decreased by audio delay.

Dust to glory example:
Due to missing frames at the beginning audio was shifted by 5250ms. Original number of frames was 4784. 5.250 multiplied by 23.976 gives you 126 frames. 4784 - 126 = 4658.

Last step is to replace original framecount value with new one in DirectShowSource section (framecount=4658)

^_^x
4th November 2007, 13:58
convert the source to matroska before encoding....
and try using matroska as output container

St Devious
4th November 2007, 16:00
convert the source to matroska before encoding....
and try using matroska as output container

i had used matroska container .

^_^x
5th November 2007, 01:56
may i have the source

Lorek
5th November 2007, 06:45
I have the same problem when encoding all interlaced material. Progressive encodes work without a hitch with audio. This is regardless of whether its in a mkv or mp4 container. Although I have seen a bug posting about mkv containers not passing the correct framerate to x264 on sourceforge.