Log in

View Full Version : Convert MKV to wmv1


ronyn
6th December 2008, 15:14
Hello, I'm trying to convert Mkv to wmv file using ffmpeg command line. It's very fast, but i've a couple of problems. In most case I encode both audio and video together, but usually the audio goes out of syncronization. So, i try to encode separately the audio and the video from the Mkv, then to mux in one file. I use the the following command lines :

ffmpeg.exe -i "c:\orinalmovie.mkv" -map 0:0 -an -vcodec wmv1 -b 5872k -s 1280x688 -r 25.00 "encodedvideo.wmv"

ffmpeg.exe -i "c:\orinalmovie.mkv" -map 0:1 -vn -acodec wmav2 -ac 2 -ab 192000 -ar 48000 -vol 768 -async 25.00 "
c:\encodedaudio.wma"

ffmpeg.exe -i "encodedvideo.wmv" -itsoffset 00:00:01.3 -i "c:\encodedaudio.wma" -map 0:0 -map 1:0 -vcodec copy -acodec copy "c:\movie.wmv"

The first command line extract and convert only the video in wmv format. The second command line extract and convert the audio to wma giving higher volume and I'm not sure to sync the audio to 25 frame per second.
The last command line mux the two files in the final movie delaying the audio with 01.3 seconds.

I've the following errors in the final result :
1) The process can't finish correctly, so the final size of the resulting file is smaller then the "encodevideo". Also the file is not seekable.
2) It gives the following error in the command line during the encoding:

[asf @ 0003AA80]ff asf bad header 99 at:8744685280
[asf @ 0003AA80]invalid padsize 125887164 at:8744685283
[asf @ 0003AA80]ff asf bad header a8 at:8744685344
[asf @ 0003AA80]invalid padsize 166 at:8744685345
[asf @ 0003AA80]ff asf bad header 75 at:8744685468
[asf @ 0003AA80]invalid packet_length -947885623 at:8744685475
[asf @ 0003AA80]ff asf bad header a4 at:8744685728
[asf @ 0003AA80]packet_obj_size invalid

I don't know what's the matter. But I would like to know how to solve this in order to find a procedure the could permit me to encode correctly to a wmv file.

Regarding the audio, usually I get this kind of problems :
1) The lenght of the audio doesn't match the lenght of the video;
2) The audio starts before than in the original movie, so it goes out of syncronization.
3) The worst case is that the audio goes out of syncronization in different point of the movie due to different frame rate(i suppose).
Could you anyone help me?

Guest
6th December 2008, 15:17
How did you make the MKV movie or where did you get it?

ronyn
6th December 2008, 15:49
How did you make the MKV movie or where did you get it?

Why do you ask me? The original Mkv hasn't syncronization problems...

Guest
6th December 2008, 16:03
I ask because I am a forum moderator and you are talking about converting MKV movies when it makes much more sense to convert your original DVDs.

Thread closed for presumed rule 6 violation. Explain matters in a PM to me if you think the thread was closed in error.

This thread is also a cross-post of a problem you brought up in another thread. That's a rule 8 violation.

http://forum.doom9.org/forum-rules.htm

Further violations will incur strikes.