mencoder is very useful for converting between different container formats. It is a command line tool so it is not super easy to use for us lazy newbies.
How to convert from OGM to AVI or MKV to AVI with mp3 audio and leave the video source intact.
If the OGM or MKV already has a video that can be stored in AVI like DivX or XviD you only need to copy it. Use gspot to identify the video codec in the ogm,mkv.
How to convert from OGM to AVI or MKV to AVI with mp3 audio and xvid video.
If you want to convert the audio to mp3 and the video to xvid in an avi.
How to convert from OGM to AVI or MKV to AVI with mp3 audio and leave the video source intact.
Download mencoder for windows, http://www1.mplayerhq.hu/MPlayer/releases/win32-beta/MPlayer-mingw32-1.0pre7.zip
Extract all files to a folder on your hd.
Open a Command prompt from Start->Accessories->Command prompt
Type
"C:\Program Files\mplayer\mencoder.exe" "c:\video\video.ogm" -oac mp3lame -ovc copy -o "c:\video\videooutput.avi"
Explanation:
"C:\Program Files\mplayer\mencoder"
The location to the mencoder.exe
"c:\video\video.ogm"
The video ogm or mkv video source
-oac mp3lame
Convert the audio to mp3
-ovc copy
Copy the video, no reconverting
-o "c:\video\videooutput.avi"
Where to output the file and the new video name
Hit enter to start converting
Done!
How to convert from OGM to AVI or MKV to AVI with mp3 audio and xvid video .
Same as above but change the
-ovc copy
to
-ovc xvid -xvidencopts pass=1
so it will be
"C:\Program Files\mplayer\mencoder.exe" "c:\video\video.ogm" -oac mp3lame -ovc xvid -xvidencopts pass=1 -o "c:\video\videooutput.avi"
Explanation:
-ovc xvid -xvidencopts pass=1
Xvid video codec and one pass encoding
You can also add video bitrate if you like,
-ovc xvid -xvidencopts pass=1 bitrate=1000
+ Reply to Thread
Results 1 to 30 of 76
-
-
Here are a few questions with this:
How do I use it for a file with multiple audio tracks?
And just how big can the file you are converting can be?
What are the commands that would allow me to launch or save it to a different drive?
Thanks. I always come here for my conversion needs. -
How do I use it for a file with multiple audio tracks?
And just how big can the file you are converting can be?
What are the commands that would allow me to launch or save it to a different drive? -
Use -aid # or -alang eng if it is tagged properly to specify which track to convert. The second track you would have to process seperatly like say.
mplayer -aocm:file=track2.wav -vo null -vc dummy -aid 2 input.mkv
To extract the 2nd stream, then use mencoder with -aid 1.
Also use -lameencopts to change lame settings. -oac help for a list of audio compressors (pcm, ac3, etc.). -ovc help for a list of video codecs, including lossless ones.
Check the docs over at mplayerhq for full details. -
SimpleDivX uses mencoder for conversion. Only problem it converts 6 channel input to stereo. Is it possible to add a config file to the mplayer directory? If so. what would the command line be?
-
Hello, im sorry to bother but Im in a hurry to format my computer and am trying to get everything onto disk. Ive an OGM file thats just a bit too big and wont fit on the disk, and found your thread/guide to converting to AVI. I followed your instructions, but to no avail. It comes up saying Cant open output file "c:\video\videooutput.avi"
Heres the log:
C:\Documents and Settings\Molly>"C:\Program Files\mplayer\mencoder.exe" "C:\Docu
ments and Settings\Molly\Desktop\ah.ogm" -oac mp3lame -ovc xvid -xvidencopts pas
s=1 -o "c:\video\videooutput.avi"
MEncoder 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon Willamette (Family: 8, Stepping: 2)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
success: format: 0 data: 0x0 - 0x2bed0c75
[Ogg] stream 0: video (FOURCC XVID), -vid 0
[Ogg] stream 1: audio (format 0x2000), -aid 0
[Ogg] stream 2: subtitles (SRT-like text subtitles), -sid 0
Ogg file format detected.
VIDEO: [XVID] 640x352 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:18 fourcc:0x44495658 size:640x352 fps:23.98 ftime:=0.0417
================================================== ========================
Opening audio decoder: [liba52] AC3 decoding with liba52
No accelerated IMDCT transform found
[Ogg] Language for -sid 0 is '-slang "English[eng]"'
AC3: 5.1 (3f+2r+lfe) 48000 Hz 448.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
================================================== ========================
Cannot open output file 'c:\video\videooutput.avi'.
Exiting...
If you have the time, please tell me if you notice any errors or something ive done wrong. I appreciate your time. -
does the c:\video folder exists?? if not create it first or use some other folder.
-
ya, I set up a c:\video folder, hell I even tried putting the video.ogm and videooutput.avi in there, maybe for something to overwrite, but didnt work at all.
-
Thanks for the help in converting my mkv files into avis.
.
..
...
I just have one little glitch. The subtitles were lost in the conversion. Is there anyway to keep the subtitles during the change over?
Thanks. -
mplayer can demux subtitles by using say the -dumpsrtsub if they are textsubs or -dumpsub for vobsubs. See mplayer man for full details/options. Not sure if mencoder can mux subs to avi though and even if it could, external subs are more compatible anyway.
Could also just demux the subs using mkvextract. -
hi... i got prob wit mencoder.... i try to follow ur instruction to copy subtitles and i had this prob as shown below..
C:\Documents and Settings\Used>"Desktop\mplayer\mencoder.exe" "c:\Program Files\
BitComet\Downloads\school rumble1-2\[WF-KAA]_School_Rumble_02.DVD(XviD.AAC)[55F0
8DB6].mkv" -oac mp3lame -ovc xvid -xvidencopts pass=1 -dumpsub -o "c:\Documents
and Settings\Used\Desktop\test.avi"
MEncoder 1.0pre7-3.4.2 (C) 2000-2005 MPlayer Team
CPU: Intel Pentium 4/Xeon/Celeron Foster (Family: 8, Stepping: 7)
Detected cache-line size is 64 bytes
CPUflags: Type: 8 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.
File not found: 'frameno.avi'
Failed to open frameno.avi
dumpsub is not an MEncoder option
can any1 help me???[/b] -
i am trying to use this method to convert an mkv to avi. the source uses the h264 video codec, and the audio is aac (i have both codecs installed). when i combine the video and audio streams into the avi, there is an error in the output file (frame 568). this glitch is not present in the source files, they play perfectly, while the output file crashes what ever player i use, as well as virtual dub when i attempt to put subtitles in it. does anyone know what might be causing this?
-
the mkv is vfw mode. i'm copying the video stream and converting the audio to lame mp3 (i normally use virtual dub mod, but it doesn't support aac audio). i've tried playing the file in both real player and windows media player, as well as loading the file in virtual dub, all 3 result in a program crash when it gets to that particular frame. in media player, i get an error message saying that there is an assertion error in the C++ runtime library and gives the file path for the h264 codec in ffdshow. is it possibly a problem with ffdshow?
-
mencoder also crashes if i try to re-encode the video to xvid during the initial pass, however both the source mkv and the extracted avi stream (i used mkvextractgui for the extraction), which also use the h264 codec, playback with no problems in any player
-
Try this build of mplayer/mencoder: http://ffdshow.faireal.net/mirror/mplayer/mplayer2005.10.09.P4.7z
-
how to add subtitles if i convert a dual file?I have problem with the subfont, please guide me.
thanks in advanced -
try using a new mencoder GUI, which is alltoavi:
http://alltoavi.sourceforge.net
it converts ogm/mkv to avi using subtitle, has batch mode and subtitle/audio selection -
I've been using Mencoder coder for some time now, tho I only use its most basic of commands (ripped from this site
). Thanks for all the posts, BTW!
So, this may sound stupid, but is lame's mp3 encoder its default audio encoder? Is there any other way to change the audio encode to like, say, good ol' wav.?KIJIN,
Befuddled and confused -
Default I think from recollection was libavcodec 224k mp2. Now if you don't sepecify an audio codec, I think you will find it asks you to and won't encode.
Sure for PCM (assuming that is what you meant by "good ol' wav") it is just -oac pcm.
Errr, on second thought, I don't think it ever had a default audio encoder. You always had to specify one, just that if you do -oac lavc, you get 224k mp2. -
K. Got that part at least.
Hope you guyz don't mind another question. I think (correct me if i'm wrong) that you can imbed subs on the avi file using mencoder. But I keep running into the same problem.
C:\>"c:\mplayer\mencoder.exe" "c:\W1.ogm" -alang 0 -oac mp3lame -sub "c:\W1.srt"
-ovc xvid -xvidencopts pass=1 -o "c:\W1.avi"
It works fine, but then it indicates :
[Ogg] Language for -sid 0 is '-slang "English[eng]"'
[Ogg] Language for -sid 1 is '-slang "English[eng]"'
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: XviD (640x480 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=640x480, sampled=640x480
xvid: 2Pass Rate Control -- 1st pass
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
The conversion works. But, no subs still.
I didn't find a /font directory in the mplayer directory. Do you have to DL another specific true type font file for it to work? Or did I use the wrong command?
Sorry to bother ya guyz.KIJIN,
Befuddled and confused
Similar Threads
-
How to convert matroska MKV to AVI or OGM to AVI
By Baldrick in forum User guidesReplies: 211Last Post: 13th Apr 2012, 01:56 -
Need a Program to convert avi/mkv/ogm to dvd that is free for winxp
By animefanx in forum Newbie / General discussionsReplies: 1Last Post: 30th Aug 2009, 04:22 -
HOW-TO - CONVERT AVI, OGM or MKV to DVD
By Ecko_Blue in forum User guidesReplies: 44Last Post: 19th Sep 2008, 10:10 -
mencoder, convert mkv to avi + ac3. sound issues
By clavain in forum Video ConversionReplies: 1Last Post: 29th Jan 2008, 18:02 -
Batch Convert AVI/OGM/MKV to DVD (anime)
By aktee in forum User guidesReplies: 480Last Post: 4th Nov 2007, 19:18