This project has moved and is read-only. For the latest updates, please go here.

Audio sync problem.

Jul 18, 2014 at 3:58 PM
Hi I am having a problem with the audio being out of sync with the video.

I am recording on both an MC7 machine and one running MediPortal 1.7.1.

I process all of the files .wtv and .ts through MCEBuddy using FFMPEG to convert the mpeg-2 TS to XVID for further editing, the audio is converted to MP3 CBR 192K.

The resulting .avi are then edited in VirtualDub to remove commercials etc.

All of the MC7 files retain audio sync, the MP files lose audio sync with it usually ranging from +750ms to -750ms although I had one file that was out by 12 seconds! The value is fixed through out the file, I correct the offset with VDub when doing the final edit.

There is no pattern to the variation and two consecutive programmes on the same channel can have different offsets/

The MCEB conversions are done using one of four quality based conversion profiles with values of 1-4, however, the offset does not appear to be linked to the profile used (see below), I've also checked the bitrate of the original recordings and can't see a pattern. The profiles all have hardware encoding checked.

Any ideas.

[Divx AVI - Q=1]
Description=DIVX Quality = 1.
ffmpeg-general=-threads 0
ffmpeg-video=-ss 3 -vcodec mpeg4 -vtag xvid -qscale:v 1 -f avi -flags +mv4+aic -g 300 -dts_delta_threshold 0 -sn
ffmpeg-audio=-acodec libmp3lame -ab 192k
Jul 18, 2014 at 4:25 PM
Does the issue happen with libxvid (in avi) or libx264 (in mp4 container) also? Will have to see the log to understand why there is a sync issue.
Jul 18, 2014 at 5:36 PM
So far I have only tried different audio formats and settings.

I've just recorded the same programme on the two systems. I'll process both files later and post the logs.
Jul 23, 2014 at 7:07 PM
Sorry it took longer to find two suitable files.

Both files are of the same programme recorded at the same time on the same channel.

They were both processed using the same profile posted previously only with quality=3 and then edited with VirtualDub to remove the commercials and to top and tail then. Vdub is using smart rendering so is only re-rendering a few frames around the cut points and I am adjusting the audio offset to restore the sync.

The WTV was recorded on my MC7 machine and has no audio sync problem

and .TS was recorded on my MediaPortal machine and had to be adjusted by -600ms to restore the sync.

Aug 11, 2014 at 3:47 PM
Your logs look okay, these things happen sometimes with differnetn recording software. I can't make anything out of the ordinary from teh logs, the delays reported by the original file are 0 so there is no attempt to compensate it either.

TRy using 2.4.1 and if the problem still exists then just use a separate conversion task for media portal files and set the audio delay compensation under expert settings to 6 or -6 (seconds) depending upon which direction it needs sync.
Marked as answer by rboy1 on 8/11/2014 at 7:47 AM
Aug 25, 2014 at 3:51 PM
I've tested under 2.4.1 and still have the problem.

Unfortunately I can't setup a profile to cover it, the offset seems to be random, as an example I've just recorded a two episodes of the same program back to back, same channel, same tuner; the first has an offset of -500ms and the second -1000ms!

It's definitely related to the profile I am using as the problems doesn't occur on some of the others I use, but they take 4-6 times longer to process and therefore aren't practical for my needs, I am wondering if it is the hardware encoding that is introducing the problem as the slower profile can't use it?
Aug 25, 2014 at 6:03 PM
Hardware encoding could lead to these (some users have reported) and the solution has pretty much been to update/use the right drivers.

Are you using the recommended drivers from MCEBuddy? (see the hardware FAQ thread, the drivers are loaded on the MCEBuddy server for you to use). Also use the WHQL drivers (from Windows Update) instead of Intel website. They are most stable.
The best way to test, turn off hardware encoding, if the sync issue goes away then it's the drivers.
Also use the latest build of MCEBuddy, there were some updates to handbrake which make audio sync more resilient to hardware drivers issues (but you will still need stable drivers)