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

Audio/video increasingly out of sync

Jan 25, 2016 at 9:05 AM
Hi,

Converting a load of WTV and DVR-MS, and for every resulting MP4 (high qaulity, all defaults), the audio and video become progressively more out of sync as I watch the MP4.

Please advise,

Thanks,
Jan 25, 2016 at 12:52 PM
Edited Feb 4, 2016 at 7:08 AM
Are you using hardware encoding? If so try turning it off. Bad hardware drivers can cause this issue. Use a recommended version.
Marked as answer by rboy1 on 2/3/2016 at 11:07 PM
Jan 25, 2016 at 2:56 PM
Is that under Expert Settings -> Hardware Acceleration?
Jan 25, 2016 at 3:33 PM
Yes, do you know if your system is using hardware acceleration? (QuickSync or NVIDIA)

Jan 25, 2016 at 4:33 PM
Not sure... how can I tell?
Jan 25, 2016 at 10:18 PM
See the FAQ's / sticky page on hardware acceleration to see how to tell if it's being used. But anyways try it without the box checked and see if it fixes the issues. If the issue is fixed then your display drivers are the problem.

Jan 26, 2016 at 9:29 AM
Thanks, I'm testing it now... although it looks like it's going to take 12 hours instead of 1-2hours :(
Apr 13, 2016 at 5:34 PM
Regardless of the order of encoders as stated in the profiles.conf file, the first few seconds of my converted videos are always cut off (both audio and video are missing) and the audio sync is typically off for the entire video. This problem is also not improved through varying values of the "-ss" parameter, choosing hardware encoding vs. software, how I configure ComSkip, etc. My videos already have the commercials removed so I don't really need to involve ComSkip. Some of these are home videos lasting only 30 seconds, so losing the first 5 or 10 seconds is a much bigger deal than losing the opening credits of a 2-hr movie! But the real deal-killer is the big mis-alignment of the audio.

However, if I run ffmpeg from the command line over the same input files, with the simplest possible set of parameters, I get the full video output and it doesn't have any sync problems. For example the following command works like a charm:
ffmpeg.exe" -y -i "Santa Claus Is Comin' to Town.dvr-ms" "Santa Claus Is Comin' to Town.mp4"
So how do I mangle MCEBuddy into using a similarly simple version of ffmpeg? I could continue to just do encoding from the command line but I do like the service-oriented, hands-off nature of MCEBuddy.

As per Readme.rtf, I am running MCEBuddy 2.4.3 (fully paid-up / donated via PayPal).
Apr 13, 2016 at 8:39 PM
Are they getting out of sync progressively or a fixed amount?

Apr 13, 2016 at 8:59 PM
I haven't checked a given video to see if the audio sync gets worse the farther into the video I scan. Mainly that's because the audio is so wildly out of sync that I consider the videos to be useless. Take for example Raiders of the Lost Ark. In the scene where Indiana Jones scrambles onto the floatplane and gets freaked out by the snake in it, that's where the audio track was. Meanwhile the video was lagging by about 2 minutes, depicting Dr. Belloq and the band of natives capturing Indy just as he escapes the rolling boulder and emerges from the Peruvian cave with the golden idol (which Belloq then takes from him).
Apr 13, 2016 at 9:10 PM
Are you using hardware encoding? If so turn it off and try it

Apr 14, 2016 at 7:48 PM
@rboy1: Since your suggestion to turn off hardware encoding I haven't loaded any old dvr-ms files manually into MCEBuddy. However I did turn off hardware encoding in my standing task which converts new content as soon as NextPVR gets done recording it. The few episodes of The Simpsons recorded yesterday seem to have proper audio sync. Next I will try to re-encode some longer dvr-ms content and see what happens. Assuming hardware-based encoding is the culprit does it mean I would need to swap out my GPU in order to enjoy faster encoding?
Apr 15, 2016 at 5:56 AM
If that fixed it then your video driver is the culprit. You'll should use the recommended version or find one that works for you.

Apr 15, 2016 at 7:53 AM
Actually that doesn't seem to have fixed the problem with long-form media. I re-encoded Raiders of the Lost Ark and the audio is still way out of sync, and the first 7 minutes of the video is chopped off. Seems very odd, since the command-line ffmpeg works so much more as expected.
Apr 15, 2016 at 10:01 PM
Can you share the command line you're using. Maybe it's some parameter causing the issue

Apr 16, 2016 at 5:03 AM
Edited Apr 16, 2016 at 5:06 AM
I grabbed this out of the .log file. Is that what you wanted?:
2016-04-14T18:19:00 MCEBuddy.Transcode.ConvertWithFfmpeg --> Command line parameters -> -threads 0 -drc_scale 0.8 -y -i 'C:\Program Files\MCEBuddy2x\working0\Raiders of the Lost Ark.ts' -ss 10 -vf hqdn3d,crop=720:368:0:56 -vcodec libx264 -b 1800000 -x264opts me=hex:trellis=2:subq=8:partitions=all:8x8dct=1:ref=5:rc-lookahead=50:keyint=25:min-keyint=20:bframes=3:weightb=1:level=4.0:b-pyramid=normal:direct=auto:mixed-refs=1:deblock=-1,-1:no-fast-pskip=1:no-dct-decimate=1:b-adapt=2:threads=auto -map 0:v -sn -acodec libfdk_aac -ab 384k -cutoff 18000 -map 0:a -ac 2 -pass n -passlogfile 'C:\Program Files\MCEBuddy2x\working0\MCEBuddy2Pass.log' 'C:\Program Files\MCEBuddy2x\working0\Raiders of the Lost Ark-converted.mp4'         
Apr 16, 2016 at 5:34 AM
You had mentioned that it worked fine when you ran ffmpeg as a command line. Can you share the command line you had used?

Apr 16, 2016 at 6:34 AM
The command line parameters I used appears earlier in this thread, included here as well. They are extremely rudimentary:
ffmpeg.exe" -y -i "Santa Claus Is Comin' to Town.dvr-ms" "Santa Claus Is Comin' to Town.mp4"
Apr 16, 2016 at 4:12 PM
Can you upload your original video file to the mcebuddy server. We will try to replicate it

Apr 17, 2016 at 4:40 PM
I just saw this, you're using a dvr-ms file. Are you using Windows XP or are you converting WTV to DVR-MS?

Apr 17, 2016 at 6:02 PM
Not XP. Windows 7 probably at the time of recording. So I must've converted WTV to DVR so as to be consistent with even older content I have from vista days. Hard to recall.

-DC

Apr 17, 2016 at 6:49 PM
That's why, use the original WTV and it should be fine. Conversion from WTV to DVR-MS causes an audio delay shift issue.

Apr 17, 2016 at 8:53 PM
But if that were the case, why does the audio seem fine if I encode it via ffmeg manually? Some of my vids I don't have the original VOB or WRV files.

-DC

Apr 17, 2016 at 10:06 PM
That's because if the remuxing. The process first converts toTS which is where your problem starts since the WTV or DVRMS that you're doing has a bug to begin with the audio shift. Ffmpeg can take care of it directly but not when remuxed

Again why are your converting a WTV to DVRMS ?

Apr 17, 2016 at 11:47 PM

I believe that saving to DVR-MS was a habit I got into for a now-obsolete workflow where I would rip a DVD to VOB files, then use VideoReDo to join and mux them. At the time VideoReDo didn’t support saving as .WTV, and because I was using Media Center I wanted to save to a format which WMC’s 10-foot UI supported w.r.t. 30-second skip, fast forward, etc.

As a result a lot of my movie-length content is in DVR-MS format, but I am trying to move away from that now that WMC is officially dead. I could go back and re-rip the movies I care about, and choose either VOB or MPG as the intermediary output format before converting to MP4. Is one preferred over the other?

Apr 17, 2016 at 11:59 PM
Mpg or TS is fine (VOB is not supported as a container but it contains TS files)