VideoHelp Forum
+ Reply to Thread
Page 1 of 3
1 2 3 LastLast
Results 1 to 30 of 76
Thread
  1. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    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
    Quote Quote  
  2. Member Soopafresh's Avatar
    Join Date
    Jan 2004
    Location
    United States
    Search Comp PM
    Nice one ! I love command line utilities. Thanks.
    Quote Quote  
  3. 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.
    Quote Quote  
  4. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    How do I use it for a file with multiple audio tracks?
    No idea, it is probably possible but I haven't done that much mencoding.

    And just how big can the file you are converting can be?
    Adjust the bitrate, use a bitrate calculator to calculate.

    What are the commands that would allow me to launch or save it to a different drive?
    Change the drive letter, like d:\video.avi
    Quote Quote  
  5. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  6. Member rwmol's Avatar
    Join Date
    Feb 2005
    Location
    United States
    Search Comp PM
    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?
    Quote Quote  
  7. Member
    Join Date
    Jun 2004
    Location
    Australia
    Search Comp PM
    How do I batch convert a whole lot of files with Mencoder?
    Quote Quote  
  8. 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.
    Quote Quote  
  9. *bump*
    Quote Quote  
  10. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    does the c:\video folder exists?? if not create it first or use some other folder.
    Quote Quote  
  11. 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.
    Quote Quote  
  12. *bump*
    Quote Quote  
  13. Member
    Join Date
    Aug 2000
    Location
    MA, USA
    Search PM
    thankyou
    this works a lot better than Video Cleaner
    Quote Quote  
  14. Member
    Join Date
    Aug 2005
    Location
    Canada
    Search Comp PM
    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.
    Quote Quote  
  15. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  16. Member
    Join Date
    Aug 2005
    Location
    Canada
    Search Comp PM
    Fabulous . .. thanks
    Quote Quote  
  17. Member
    Join Date
    Sep 2005
    Location
    singapore
    Search Comp PM
    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]
    Quote Quote  
  18. 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?
    Quote Quote  
  19. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Copying native AVC to an avi could be the problem. Not really a good idea at any rate. Does the mkv use native AVC or VfW compatibility mode? Also how are you testing playback? With mplayer or something else?
    Quote Quote  
  20. 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?
    Quote Quote  
  21. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Try playing it with mplayer.
    If the mkv uses VfW for the video (not recommended or spec compliant for AVC) then remuxing to avi should be fine.

    What build of ffdshow?
    Quote Quote  
  22. it doesn't play in mplayer either. i tried another mkv with the same encoding on the streams and it behaves the same way. i'm using the 9/20/05 build of ffdshow.
    Quote Quote  
  23. 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
    Quote Quote  
  24. how to add subtitles if i convert a dual file?I have problem with the subfont, please guide me.
    thanks in advanced
    Quote Quote  
  25. Member
    Join Date
    Jan 2006
    Location
    New Zealand
    Search Comp PM
    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
    Quote Quote  
  26. Member KIJIN's Avatar
    Join Date
    Feb 2006
    Location
    Philippines
    Search Comp PM
    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
    Quote Quote  
  27. Member
    Join Date
    Jan 2006
    Location
    New Zealand
    Search Comp PM
    audio codecs are selected using the flag -oac CODEC name, look on the manual of mencoder for a list of codecs
    Quote Quote  
  28. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    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.
    Quote Quote  
  29. Member KIJIN's Avatar
    Join Date
    Feb 2006
    Location
    Philippines
    Search Comp PM
    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
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!