MKV Videos audio out of sync ONLY WHEN using Avisynth/Mencod

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
simplepinoi177
Posts: 6
Joined: Mon Jun 11, 2012 7:14 am

MKV Videos audio out of sync ONLY WHEN using Avisynth/Mencod

Post by simplepinoi177 »

Hi there!

First and foremost, I saw that there is another thread about .mkv videos being out of sync, but mine is only out of sync when using the AviSynth/MEncoder engine, but if you, moderators, feel that this should go through the same thread, please let me know and/or move the thread/topic accordingly.

I also want to take this opportunity to say, as well, that I am enjoying the many new aspects of the program. You are doing a great job, especially considering you are starting a whole new project (still keeping in mind you are working off of PMS and it's/your development over the years).

Now, onto my problem....
First, I've seen it really helps if one attaches one's debug.log first and foremost. So I have done that. BUT it seems that it has been neglected to allow anything outside of picture files and .zip files. So, I inputted 2 files. The "debug (rename extension to .log).zip" is actually the debug.log file with the extension renamed. I imagine if you change the extension back to ".log", you will be able to access it. The second file is the "debug.log inside.zip" which is actually the debug.log file zipped within a .zip container; ...for if the renaming the "debug (rename extension to .log).zip" extension does not work.

Now, a description of my problem. It is rather simple to explain. When I use AviSynth/MEncoder engine to transcode a .mkv (and .mkv's only), the audio is out of sync. Specifically, it seems to lag. Any other format (.avi, .mp4, .mpg) does not come up with this problem. One might ask, "well then why keep insisting on using that engine if MEncoder by itself works?" The reason being that I like being able to transcode a video using the FFDShow configurations from CCCP when watching (through wireless) in the bedroom on my "tube" TV. Unfortunately, with most of the "tube" TVs, the whole picture isn't shown. And when watching shows with subtitles, it is an even worse situation as most/many of the subtitles are cut off rendering the video unwatchable. Settings in FFDShow can make it so the whole image shows on the "tube" TV. I am only a novice in computers, and I am sure there is a way to modify/command MEncoder itself/only itself to manage the same thing, but I imagine that is an extensive topic for another discussion as well as it most likely being more complicated than simply setting up/choosing FFDShow when in the bedroom.

The things I have attempted to resolve the issue...
I have tried on both types of connections of wireless and wired. I have tried older versions of Avisynth. I have tried new, beta versions of Avisynth. I have tried the 4 settings in the Avisynth/MEncoder tab with variable/all possible combinations. (most of the cases, it rendered the video a "corrupt file" and unplayable). I also run MEncoder with the options A/V sync alternative method and Force framerate parsed from FFmpeg enabled as well. I have also "tinkered" with the settings within FFDShow with no success. I have tried using rather old and new .mkv's to see if it may be simply the container or codec (old/new) used for the video portion. I have tried enabling/disabling subtitles both within UMS and FFDShow.

For what it's worth, there isn't this issue/problem when playing the video on PMS 1.40.0 (I believe was the last version that had no issues [at least for me] with .mkv's {which is why i always refer back to it when desperate to play .mkv's proper and/or having sync issues}) But, then again, the video is processed by the mencoder_mt.exe and I never understood why there was a _mt.exe and _alternate versions. But I am simply inputting what I may be imagining as pertinent information.

Also, I am using Windows Vista 32-bit. 2.5 Ghz Dual Core. 4GB of RAM. Integrated graphics card :( . I am using the current UMS 1.1.0 . I stream to both 1st and 2nd generation PS3s ( 60 GB launch/ 160 GB slim). Also, I am using the latest Java 6 release (Java 7 giving me problems with my firewall and other java programs)

If there is any other pertinent information you need, please inform me and I will respond as completely as I can.

I appreciate you and anyone's help on this matter and thank you in advanced for your consideration.
Attachments
debug (rename extension to .log).zip
You should really allow the extension ".log" to be able to upload if you are interested in seeing the debug.log
(177.67 KiB) Downloaded 532 times
debug.log inside.zip
You should really allow the extension ".log" to be able to upload if you are interested in seeing the debug.log
(18.84 KiB) Downloaded 498 times
simplepinoi177
Posts: 6
Joined: Mon Jun 11, 2012 7:14 am

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by simplepinoi177 »

bump

no one has any ideas?
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by SubJunk »

simplepinoi177 wrote:First, I've seen it really helps if one attaches one's debug.log first and foremost. So I have done that. BUT it seems that it has been neglected to allow anything outside of picture files and .zip files. So, I inputted 2 files. The "debug (rename extension to .log).zip" is actually the debug.log file with the extension renamed. I imagine if you change the extension back to ".log", you will be able to access it. The second file is the "debug.log inside.zip" which is actually the debug.log file zipped within a .zip container; ...for if the renaming the "debug (rename extension to .log).zip" extension does not work.
I've allowed the .log extension now.
simplepinoi177 wrote:Now, a description of my problem. It is rather simple to explain. When I use AviSynth/MEncoder engine to transcode a .mkv (and .mkv's only), the audio is out of sync. Specifically, it seems to lag. Any other format (.avi, .mp4, .mpg) does not come up with this problem. One might ask, "well then why keep insisting on using that engine if MEncoder by itself works?" The reason being that I like being able to transcode a video using the FFDShow configurations from CCCP when watching (through wireless) in the bedroom on my "tube" TV. Unfortunately, with most of the "tube" TVs, the whole picture isn't shown. And when watching shows with subtitles, it is an even worse situation as most/many of the subtitles are cut off rendering the video unwatchable. Settings in FFDShow can make it so the whole image shows on the "tube" TV. I am only a novice in computers, and I am sure there is a way to modify/command MEncoder itself/only itself to manage the same thing, but I imagine that is an extensive topic for another discussion as well as it most likely being more complicated than simply setting up/choosing FFDShow when in the bedroom.
Have you seen the "Overscan compensation" feature in UMS?
simplepinoi177 wrote:If there is any other pertinent information you need, please inform me and I will respond as completely as I can.
Thanks for all the information, I appreciate your effort to be complete.

I assume that "[Shinsen-subs]_Initial_D_Extra_Stage_2_OVA_[646C214E]" is one of the files that gives you the problem. I'm grabbing it now to test.
simplepinoi177
Posts: 6
Joined: Mon Jun 11, 2012 7:14 am

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by simplepinoi177 »

SubJunk wrote:
simplepinoi177 wrote:First, I've seen it really helps if one attaches one's debug.log first and foremost. So I have done that. BUT it seems that it has been neglected to allow anything outside of picture files and .zip files. So, I inputted 2 files. The "debug (rename extension to .log).zip" is actually the debug.log file with the extension renamed. I imagine if you change the extension back to ".log", you will be able to access it. The second file is the "debug.log inside.zip" which is actually the debug.log file zipped within a .zip container; ...for if the renaming the "debug (rename extension to .log).zip" extension does not work.
I've allowed the .log extension now.
simplepinoi177 wrote:Now, a description of my problem. It is rather simple to explain. When I use AviSynth/MEncoder engine to transcode a .mkv (and .mkv's only), the audio is out of sync. Specifically, it seems to lag. Any other format (.avi, .mp4, .mpg) does not come up with this problem. One might ask, "well then why keep insisting on using that engine if MEncoder by itself works?" The reason being that I like being able to transcode a video using the FFDShow configurations from CCCP when watching (through wireless) in the bedroom on my "tube" TV. Unfortunately, with most of the "tube" TVs, the whole picture isn't shown. And when watching shows with subtitles, it is an even worse situation as most/many of the subtitles are cut off rendering the video unwatchable. Settings in FFDShow can make it so the whole image shows on the "tube" TV. I am only a novice in computers, and I am sure there is a way to modify/command MEncoder itself/only itself to manage the same thing, but I imagine that is an extensive topic for another discussion as well as it most likely being more complicated than simply setting up/choosing FFDShow when in the bedroom.
Have you seen the "Overscan compensation" feature in UMS?
simplepinoi177 wrote:If there is any other pertinent information you need, please inform me and I will respond as completely as I can.
Thanks for all the information, I appreciate your effort to be complete.
You are most welcome and I appreciate and thank you for your effort to help! I acknowledge/understand how irking it can be for developers (or any who wish to help) to see/hear about a problem but are only given the most basic/limited explanations and yet the one's asking for help complain and push for a simple fix even though their explanation is too simple as well.
SubJunk wrote:[I assume that "[Shinsen-subs]_Initial_D_Extra_Stage_2_OVA_[646C214E]" is one of the files that gives you the problem. I'm grabbing it now to test.

Thank you Subjunk! You are the best! I am so grateful and appreciative that you have considered my predicament.

I am glad you allow .log files, it should help troubleshooting and testing a bit easier for us who have problems/wish to offer suggestions or solutions.

I have NOT seen the "Overscan compensation" option! That is very neat/great! Thank you for including it. I will try it out tonight.

As for the files that gives me problems...I ran a couple of .mkv files to input into the log. I ran the Initial D one's because that's where I first saw this problem. But I can run others as well if need be. As it is, though, i don't have TOO many .mkv's laying around. But they all seem to have the same problem. If any of those .mkv's I ran as a trial are hard to come by, let me know and I'll send a debug.log with an .mkv that isn't so old and/or hard to come by.

Also, pertinent information: I am using the latest stable release of CCCP (2011.11.11 date).

Again, I can't thank you enough for even considering my issue. You have developed a really great program with much better/improved features! (i particularly like the autoupdate[not just a simple reminder]) We are all in your debt....
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by SubJunk »

OK I've tested it and it's due to the video having a weird framerate which no TV will support.
You can fix it by enabling both the "true motion" setting and the "variable framerate" setting in the AviSynth/MEncoder options page in the UMS GUI :)
simplepinoi177
Posts: 6
Joined: Mon Jun 11, 2012 7:14 am

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by simplepinoi177 »

SubJunk wrote:OK I've tested it and it's due to the video having a weird framerate which no TV will support.
You can fix it by enabling both the "true motion" setting and the "variable framerate" setting in the AviSynth/MEncoder options page in the UMS GUI :)
I have been so busy this last week and haven't been able to sit down and catch up on things...
But I wanted to be sure to come on and give my thanks, even if it is late...

I wanted to show my appreciation that you went through the trouble of checking, researching, and debugging my issue. I am very grateful.

So it comes out to "weird framerate's" huh...I figure...especially considering that most of the mkv's I run are anime from japan so I can see how there can be those weird framerates.
I couldn't get the "true motion" setting without getting a "corrupted data", but I don't wish to trouble any further. I have other options at my disposal (old 1.40 pms/using MEncoder with overscan comp.).

In any case, I can't thank you enough for even looking at the problem. All the best!
User avatar
SubJunk
Lead Developer
Posts: 3707
Joined: Sun May 27, 2012 4:12 pm

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by SubJunk »

Sorry it didn't work for you. It will be fixed soon anyway, if not in the next version in the one after that :)
SpeedyQ
Posts: 173
Joined: Tue Jul 03, 2012 9:43 pm

Re: MKV Videos audio out of sync ONLY WHEN using Avisynth/Me

Post by SpeedyQ »

SubJunk wrote:Sorry it didn't work for you. It will be fixed soon anyway, if not in the next version in the one after that :)
I'm also having a sync issue which does not seem to be solved in 1.2.1.
Just to be sure we're talking about the same thing I will try to describe.
Audio and video start in sync. Gradualy the audio will lag behind. After an hour of movie duration the lag is a noticable 1 .. 2 seconds.
The error log is not telling me something, because apparently nothing goes wrong.
I only play mkv files and usually via the transcode folder for the subtitles.
If this is due to the format of the movie file, can you tell me what the mkv properties should look like to have proper playback?
(The workaround I use so far, is to make use of the chapters and restart from the appropriate chapter time.)

Apart from this, I like UMS a lot. Great work and brave decision to go separate from PMS (although your build already was separate). Thumbs up for UMS 8-)
Post Reply