Author Topic: Trying to Convert Matroska to AVI  (Read 732 times)

Offline stricktoo

  • Hero Member
  • *****
  • Posts: 520
  • Linux - it's elementary
Trying to Convert Matroska to AVI
« on: February 13, 2010, 10:46:02 PM »
I'm trying to covert a couple of Matroska (.mkv) files to AVI. I used Mencoder for the first one, and it worked perfectly fine. However, the rest aren't playing along quite so nicely. I've tried WinFF and Handbrake in addition to the Mencoder command line, but that hasn't helped; WinFF simply outputs a broken file, and Handbrake crashes while converting. I'm an absolute beginner at video conversions (especially on the command line), so I'm probably doing something wrong. Any advice?

Here's the output from Mencoder for a failed run:

Code: [Select]
[stricktoo@localhost Desktop]$ mencoder Episode_002.mkv -oac mp3lame -ovc lavc -o Ep02.avi                                                                               
MEncoder SVN-r30040-4.4.1 (C) 2000-2009 MPlayer Team                                 
success: format: 0  data: 0x0 - 0x1c17ed97                                           
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC) "Episode 02", -vid 0             
[mkv] Track ID 2: audio (A_AAC/MPEG4/LC/SBR) "Episode 02", -aid 0, -alang jpn                                                                                   
[mkv] Will play video track 1.                                                       
Matroska file format detected.                                                       
VIDEO:  [avc1]  832x464  24bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)               
[V] filefmt:31  fourcc:0x31637661  size:832x464  fps:23.976  ftime:=0.0417           
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 96000 Hz, 2 ch, s16le, 128.0 kbit/4.17% (ratio: 16000->384000)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Cannot set LAME options, check bitrate/samplerate, some very low bitrates
(<32) need lower samplerates (i.e. -srate 8000).
If everything else fails, try a preset.
Exiting...
[stricktoo@localhost Desktop]$

Offline Roc4fun

  • Hero Member
  • *****
  • Posts: 620
  • The life so short, the craft so long to learn
Re: Trying to Convert Matroska to AVI
« Reply #1 on: February 14, 2010, 09:21:52 AM »
Hi Stricktoo,  I'm not real smart about Lame, but I would have you look in man lame.  There are several options that can be called in your command...

mencoder Episode_002.mkv -oac mp3lame -lameopts (options go here) -ovc lavc -o Ep02.avi 

It looks like your error code wants a lower sampling rate.  The man page also talks about presets.

Maybe a step in the right direction,

Dave

Offline davidwillis

  • Sr. Member
  • ****
  • Posts: 278
Re: Trying to Convert Matroska to AVI
« Reply #2 on: February 14, 2010, 10:01:34 AM »
you could try this...
Quote
mencoder -ni -vf harddup -vf-add smartblur=.6:-.5:0,unsharp=l5x5:.8:c5x5:.4 -xvidencopts bitrate=1200:profile=dxnhtntsc -lameopts cbr:br=128:aq=0:vol=1 -oac mp3lame -ovc xvid infile.mkv -o outfile.avi

I have not used it for an mkv to avi, but I think it will work.  obviously you can change bitrate, etc to what you want.