Log in

View Full Version : MKV to WMV - Why is my process giving sync problems?


rohan
18th April 2007, 23:13
Basically, I'm trying to take a 1080p MKV file (that uses a 264 video stream, and AC3 audio stream) and re-encode it at 720p with WMV9. (simply because my system can't play the original smoothly)

Here's my process:

1) MKVExtract to split the original streams into a .h264 and .ac3
2) AVC2AVI to turn the .h264 video stream into an .avi
3) PX3Convert to turn .ac3 into a .wav
4) VirtualDub to direct stream copy the .wav and .avi file into a new .avi with both audio and video
5) Windows Media Encoder to turn the .avi from step #4 into a WMV

After 20 hours of encoding, I have a WMV, with about half a second of audio sync problems.

Where's my mistake?

HowlerX
19th April 2007, 00:34
I haven't encoded many videos to WMV format, but the 6 or so that I did all had slight audio sync issues. I suggest you encode the audio and video separately and later mux the resulting WMV and WMA with Windows Media Stream editor that comes with the encoder to a new WMV file.

And yeah, this question should really have been posted to the New and alternative video codecs forum. (http://forum.doom9.org/forumdisplay.php?f=54)

rohan
19th April 2007, 01:00
(I figured that because my source is AVC in an MKV wrapper, it should be in this forum - sorry if that was a bad judgement)

At any rate, how can I encode AC3 to WMA directly? Windows Media Encoder doesn't take AC3 files, nor does it take Avisynth scripts... ?

HowlerX
19th April 2007, 01:12
No biggie regarding the wrong forum, just be aware that this thread will probably moved to that forum.

The Windows Media Encoder GUI doesn't accept AC3 files, like you mentioned. But the "WMCmd.vbs WME9 script update (http://forum.doom9.org/showthread.php?t=123812)" will take an AVISynth script. At the moment it seems to have problems encoding a 5.1 WMA file, but I have managed to get it working before.

If you do intend to make a 5.1 WMA audio file, it is recommended to convert the AC3 to 6 mono wave files and using the WME GUI to encode the separate waves to a 5.1 WMA.

Hope this gets you on the right track and everything works out for you.

rohan
19th April 2007, 01:23
Doesn't that require I do the encoding from a command line though? (I'd prefer to use the WME gui)

kornesque
19th April 2007, 11:24
to get the ac3 audio to wma, just build a graph with haali splitter and solveig asf multiplexer on either side - stick sonic cinemaster 4.2, ac3filter and wmaudio encoder DMO along the audio trail. i haven't figured out how to pick bit/sampling rates and such yet, but it's quick and simple. hope this helps.

rohan
20th April 2007, 03:09
Ok, so I tried the command line approach. To clarify, I made an AVS file that opened the MKV, and then tried to encode the AVS file from the command line into WMV.

"Prepare to encode failed with error -1072882813 One or more codecs required to open this content could not be found."

How is this possible? An AVS file (as far as I understand it) doesn't pass along any of the original compression, it just provides what essentially looks like uncompressed audio/video...