XenonMKV Forum
July 30, 2010, 08:13:34 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: XenonMKV Home · Downloads · FAQ · Screenshots
 
   Home   Help Search Login Register  
Pages: [1] 2 3 ... 5
  Print  
Author Topic: Audio always out of sync  (Read 5126 times)
LordBarker
Forum Member
*
Offline Offline

Posts: 1


View Profile
« on: September 05, 2008, 12:35:06 pm »

After converting a few MKV's noticed that all of them have out of sync audio.
The audio starts in sync then by about 30 minutes of the show the audio goes 2 or so seconds out.
Have tried using safesync and different downmix modes and still had no luck.
I have checked the original MKV files and noticed that they are all perfectly in sync, however when I play the output .MP4 on my P.C or 360 it always goes out, any ideas how to fix this?
Cheers
Logged
RadioHowie
Forum Member
*
Offline Offline

Posts: 129


View Profile
« Reply #1 on: September 05, 2008, 04:15:18 pm »

I'm REAL curious about this phenomenon, since it's NEVER happened to me, and believe me, I've pushed XMKV VERY hard!

Could you post one of your conversion logs?

Trying to think what could possible cause the symptoms you describe, the only thing that comes to mind is VBR audio in the original MKV, specifically Variable Bit Rate MP3 audio.

For some ungodly reason, there are some poster/rippers who insist on using VBR MP3 audio for their rips.  Completely unnecessary, and quite frequently problematic.

This is just a Wild Ass Guess on my part, but are the MKVs you're trying to convert contain AVIs with MP3 audio?  Or are they H264 videos with AC3 or DTS audio?

Again, sheer speculation on my part, but I'm guessin' VBR audio compression may be the culprit.  There's really no reason a DTS or AC3 track would ever de-sync, but VBR MP3 audio?  Yep, that would definitely fit with your description, i.e., "wandering" sync throughout the video.


Logged
ragnar2008
Forum Member
*
Offline Offline

Posts: 2


View Profile
« Reply #2 on: September 29, 2008, 02:47:32 pm »

I have experienced the same thing but I have only tried on two files but it would seem that the audio seems to go faster than the image.
It happened when converting episodes of tv-series. One episode of Prison break and one episode of Ugly Betty, both in 720p x264.
Here is my log.

[2008-09-29 21:41] XenonMKV build 20080927_34 (Delicious Pie) started.
[2008-09-29 21:42] No scratch folder set. Temporary files will be stored in D:\H264\temp\. Use Tools/Options to change.
[2008-09-29 21:42] Processing file: D:\ctu-x264-ugly.betty.301-sample.mkv.
[2008-09-29 21:42] Starting conversion process for D:\ctu-x264-ugly.betty.301-sample.mkv.
[2008-09-29 21:42] Checking whether the MKV file needs to be split.
[2008-09-29 21:42] ctu-x264-ugly.betty.301-sample.mkv is ~26 MiB.
[2008-09-29 21:42] Not splitting file, since it is under 4096 MiB.
[2008-09-29 21:42] Retrieving MKV information.
[2008-09-29 21:42] Length of MKV file is ~61 seconds.
[2008-09-29 21:42] Detected video or audio codec: A_AC3.
[2008-09-29 21:42] Detected video or audio codec: V_MPEG4/ISO/AVC.
[2008-09-29 21:42] Video dimensions (width x height) are 1280 x 720.
[2008-09-29 21:42] Video display aspect ratio (DAR) is 16/9.
[2008-09-29 21:42] [E]Could not convert the display aspect ratio 1.778. Using 1:1 ratio.
[2008-09-29 21:42] Video pixel aspect ratio (PAR) is 1:1.
[2008-09-29 21:42] All tracks from MKV file were detected.
[2008-09-29 21:42] Automatically selecting video and audio tracks from the MKV file.
[2008-09-29 21:42] Using track 2 (.h264) for video and track 1 (.ac3) for audio.
[2008-09-29 21:42] [W]Demuxing the MKV file into video and audio tracks.
[2008-09-29 21:42] [A]Changed video bit from AVC 5.1 profile to AVC 4.1 profile.
[2008-09-29 21:42] [W]Starting Azid AC3 decoder to create a WAV file.
[2008-09-29 21:42] Initializing Nero AAC encoder with quality parameters: -q 0,5
[2008-09-29 21:42] [W]Using Nero to convert WAV to 2-channel AAC. (This might take a while to get started.)
[2008-09-29 21:42] [W]Generating MP4 file from x264 video and 2-channel AAC.
[2008-09-29 21:42] [W]Using mp4box version 0.4.5-dev (default, September 2007) to generate file.
[2008-09-29 21:42] [A]Conversion complete.
[2008-09-29 21:43] No scratch folder set. Temporary files will be stored in D:\H264\temp\. Use Tools/Options to change.
[2008-09-29 21:43] Processing file: D:\movie.mkv.mkv.
[2008-09-29 21:43] Starting conversion process for D:\movie.mkv.mkv.
[2008-09-29 21:43] Checking whether the MKV file needs to be split.
[2008-09-29 21:43] movie.mkv.mkv is ~26 MiB.
[2008-09-29 21:43] Not splitting file, since it is under 4096 MiB.
[2008-09-29 21:43] Retrieving MKV information.
[2008-09-29 21:43] Length of MKV file is ~61 seconds.
[2008-09-29 21:43] Detected video or audio codec: A_AC3.
[2008-09-29 21:43] Detected video or audio codec: V_MPEG4/ISO/AVC.
[2008-09-29 21:43] Video dimensions (width x height) are 1280 x 720.
[2008-09-29 21:43] Video display aspect ratio (DAR) is 16/9.
[2008-09-29 21:43] [E]Could not convert the display aspect ratio 1.778. Using 1:1 ratio.
[2008-09-29 21:43] Video pixel aspect ratio (PAR) is 1:1.
[2008-09-29 21:43] All tracks from MKV file were detected.
[2008-09-29 21:43] Automatically selecting video and audio tracks from the MKV file.
[2008-09-29 21:43] Using track 2 (.h264) for video and track 1 (.ac3) for audio.
[2008-09-29 21:43] [W]Demuxing the MKV file into video and audio tracks.
[2008-09-29 21:43] [A]Changed video bit from AVC 5.1 profile to AVC 4.1 profile.
[2008-09-29 21:43] [W]Starting Azid AC3 decoder to create a WAV file.
[2008-09-29 21:43] Initializing Nero AAC encoder with quality parameters: -q 0,5
[2008-09-29 21:43] [W]Using Nero to convert WAV to 2-channel AAC. (This might take a while to get started.)
[2008-09-29 21:43] [W]Generating MP4 file from x264 video and 2-channel AAC.
[2008-09-29 21:43] [W]Using mp4box version 0.4.5-dev (default, September 2007) to generate file.
[2008-09-29 21:43] [A]Conversion complete.
 
« Last Edit: September 29, 2008, 02:56:20 pm by ragnar2008 » Logged
vorob
Forum Member
*
Offline Offline

Posts: 1


View Profile
« Reply #3 on: October 08, 2008, 08:01:02 am »

I also have same thing, and also i've got an error with mp4box_default.exe

Logged
ragnar2008
Forum Member
*
Offline Offline

Posts: 2


View Profile
« Reply #4 on: October 12, 2008, 04:16:08 pm »

I read in another thread that the mp4box issue is due to long filenames and long directories. I fixed it by just renaming my files with movie.mkv f.e but the sound is still out of sync and now I've tried with a few movies as well. Same results there.
Logged
norrgrd
Forum Member
*
Offline Offline

Posts: 12


View Profile
« Reply #5 on: December 24, 2008, 04:22:27 pm »

I have the exact same problem though the audio gets out of sync after just a couple of minutes and get worse and worse the longer I let it roll. I haven't been able to figure something out and it's very frustating since I just found xmkv and I think it's lovely (otherwise I extract migrate etc etc takes too long time).

It happens to every movie I ever tried to convert (about 25-30 of them) and with every type of audio in the original mkv.
Logged
de_dave
Forum Member
*
Offline Offline

Posts: 1


View Profile
« Reply #6 on: December 25, 2008, 09:59:45 am »

I have the same problem...

Does anyone have the solution the the out-of-sync problem?
Logged
lars667
Forum Member
*
Offline Offline

Posts: 2


View Profile
« Reply #7 on: December 29, 2008, 05:50:00 am »

Hi, first time post here. Finally found this great little app after having failed with gotsent to get playable mp4 files on the xbox 360 thru tversity. A big thanks to the creator of the app.

My first test of xenonmkv was with a Fifth Element 1080p file that is reported to work. It converted right away, and the result was two files that came up and played on the xbox, but unfortunately the audio was way out of sync (both on xbox and pc). It starts out way out of sync even in the first conversations, and gets worse and worse throughout. I searched these forums and tried adding the "safe sync" option, but that won't work. I get this output (when using safesync):

Code:
[29.12.2008 11:27] XenonMKV build 20081123_35 (New MKV Experience) started.
[29.12.2008 11:29] Processing file: E:\Film\(movie).mkv.
[29.12.2008 11:29] Starting conversion process for E:\Film\(same movie).mkv.
[29.12.2008 11:29] Checking whether the MKV file needs to be split.
[29.12.2008 11:29] the.fifth.element.1997.remastered.edition.1080p.bluray.x264-wpi.mkv is ~8139 MiB.
[29.12.2008 11:29] Splitting file to 2 pieces of ~4069 MiB.
[29.12.2008 11:29] Retrieving MKV information.
[29.12.2008 11:29] [E]Could not retrieve video or audio track from the MKV file. (A: -1 V: -1)
[29.12.2008 11:29] [E]Conversion process aborted due to an error.
[29.12.2008 11:29] Processing next MKV file in queue.
[29.12.2008 11:29] [E]File not found for conversion: C:\mkv-tmp\part-002.mkv.

I haven't got that many other files to test with, and the samples are usually too small to get serious out-of-sync problems, but one sample I did get to play with the safe sync option. It was 720p, though. (Blade Runner final cut sample).

I'm grateful if there's a solution to this. The application looks very nice.

Edit: I'm running on XP SP3, AMD Athlon 64 x2.
« Last Edit: December 29, 2008, 10:38:15 am by lars667 » Logged
norrgrd
Forum Member
*
Offline Offline

Posts: 12


View Profile
« Reply #8 on: December 29, 2008, 09:42:02 am »

I was just about to bump this thread myself.

I get the exact same problems with safe sync and now I've also tried all the versions avaliable on sourceforge aswell. Was a pain in the ass but now I know it's not that.

Anywho, I tried this on another computer aswell and I get the exact same problems. Could it be some problem (codec interfeering/other tools interfeering)? I can't point my finger on anything really.

Again, thanks for a wonderful application, let's just hope we can get it to work.
Logged
norrgrd
Forum Member
*
Offline Offline

Posts: 12


View Profile
« Reply #9 on: January 03, 2009, 10:47:31 pm »

A sum up of what I know and what I've tried to solve this problem so far.

  • Tried DTS, AC3 and other audio formats, doesn't matter.
  • Tried with three different computers. One AMD A64 3700+ and two Intel Core2Duo E8400.
  • Tried with every version of XenonMKV that's online on one of the Intels.
  • Tried over 30 releases, both 720p and 1080p.
  • Uninstalled all PC codecs on all three computers and reinstalled them several times. Also tried without any codecs installed.
  • Tried with every possible setup in XenonMKV.
  • Tried running it as administrator.
  • Tried saving to different hard drives, hard drives on networks and .mkv's from network sources as well as local mkv's.
  • Converted files always 2 seconds longer than source files.
  • All tests done on Windows XP Professional SP3.

I can't think of anything else I tried at the moment. If I remember something I forgot I will add it to the list.

Last but not least, Jake, I really appreciate the effort you are putting into this. Great work!
« Last Edit: January 03, 2009, 11:24:40 pm by norrgrd » Logged
ddiangelo
Forum Member
*
Offline Offline

Posts: 8


View Profile
« Reply #10 on: January 05, 2009, 04:12:51 pm »

I think I may have found a bug that causes this issue... I ended up pulling the .h264 and .m4a de-muxed files out of the temp directory that XMKV uses and muxed them together with VirtualDUB and the output worked perfectly, so I figured the problem had to be something to do with framerate and how XMKV calls out to MP4Box, so I grabbed the source from SourceForge and ran the same file through XMKV running from the Visual Studio IDE with breakpoints set and saw that it was correctly determining the framerate for the file at 29.97 FPS, but when calling MP4Box was using the default value of 23.976. When I manually changed the value to 29.97 and allowed the process to finish, the output was spot on.

Jake, if you're reading - first of all, great job on a simple and effective tool - the code I'm referring to is in the StartSingleProcess method. You assign the first item in the filesToConvert list to a temp ConvertItem, and then copy the properties of temp to curItem, but you don't copy the FPS property (or PAR, GUID, or AudLength either - but this issue I think comes from not copying the FPS value). I'm about to run a test with the code modified to copy the FPS property and see what happens. Feel free to contact me if you have any questions.

Drew
Logged
RadioHowie
Forum Member
*
Offline Offline

Posts: 129


View Profile
« Reply #11 on: January 05, 2009, 05:03:43 pm »

This is an EXCELLENT catch, DD.

MP4Box defaults to 25fps if no framerate is given in the commandline parameters, so Jake apparently coded the default at 23.976 within the program.

I've been watching these "Audio Out Of Sync" threads with GREAT interest for months, hoping a bug could be rooted out so a solution can be found.

In all the months I've lurked and participated in this forum, I've read in amazement all the sync issues because for the (literally) hundreds of videos I've converted, I've never had a problem.  Not one -- ever!

But the reason for that is actually VERY simple....the videos I convert are 100% BluRay rips posted in HD and they are ALL ripped and processed at 23.976 FPS, the "original" "FILM" framerate.

Wouldn't surprise me at all to discover the problematic videos XMKV is choking on are ALL 29.97 FPS, due to some ripper/encoder's ham-fisted encoding techniques.

I felt badly that I was never able to contribute to a solution, but I never had a problem so I couldn't "dig deep" as you did.

Congrats, if you have INDEED solved this major headache.

Hopefully Jake will chime in soon with his take on the issue.

Now, I need to go make some 29.97fps MKVs and run them through XMKV to confirm your findings.  Smiley

RadioHowie

Logged
ddiangelo
Forum Member
*
Offline Offline

Posts: 8


View Profile
« Reply #12 on: January 05, 2009, 05:20:50 pm »

Thanks Howie -- though my suggested fix to Jake doesn't appear to solve the problem, but I'm still digging there. FYI - the files I'm using are HDTV rips... I'll post more once I work more through my debugging session.

-- Drew
Logged
ddiangelo
Forum Member
*
Offline Offline

Posts: 8


View Profile
« Reply #13 on: January 05, 2009, 07:39:25 pm »

Okay - I've found the offending code and it ends up being a simple coding fix. In the Set accessor of the FPS property in the ConvertItem class - the code attempts to take the string value passed in (i.e. "29.97" in this case) and use the Int32.TryParse method to assign it to the local _fps variable (which is a Double - not an Int32) - this fails because 1) the the Int32 variant of TryParse returns an Int32 and the data type of _fps doesn't match and 2) even if we passed a valid Integer variable, the TryParse wouldn't be successful because "29.97" isn't an integer -- no rounding or anything is attempted.

Simple fix -- change this to Double.TryParse and the code works as expected. Updated code below with the change highlighted:

Public Property FPS() As String
        Get
            Return _fps
        End Get
        Set(ByVal value As String)
            Double.TryParse(value, _fps)
            If _fps = 0 Then
                _fps = Constants.DEFAULT_FPS
            End If
        End Set
End Property


Jake - I hope that helps fix this issue. Let me know if you have any questions.

-- Drew
Logged
norrgrd
Forum Member
*
Offline Offline

Posts: 12


View Profile
« Reply #14 on: January 05, 2009, 08:08:04 pm »

This is wonderful news!

I'm sad to say though that I've tried with source files with a FPS of 23.976 as well and that didn't work either. Tried once more just a second ago too.

Are there any source files online? I could compile with the fix and see what happens.

Your debugging is _greatly_ appreciated ddiangelo!
Logged
Pages: [1] 2 3 ... 5
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!