INDEX  F.A.Q.  SEARCH  LATEST POSTS     Rules  Register  Profile  Private messages  Login


Login:   Username:  Password:   Log me on automatically    
Register I forgot my password I forgot my username Resend the activation key

How to convert MKV to AVI or OGM to AVI using mencoder

Forum Index -> How to's -> User guides Printer-friendly version
Goto page Previous  1, 2, 3  Next
Reply to topic
Author Message
subcomply
Member


Joined: 08 Oct 2005
Location: united states

Post Posted: Feb 17, 2006 22:17 Posts Comp View users profile Send private message Reply with quote

KIJIN copy any true type font mine was in the windows font directory into the "mplayer" directory and rename it to subfont. Fixed it for me.

KIJIN
Member


Joined: 12 Feb 2006
Location: Philippines

Post Posted: Feb 18, 2006 08:59 Posts Comp View users profile Send private message Reply with quote

If you you don't mind me asking, what was the exact name of the renamed font? "___.tff" ?
_________________
KIJIN,
Befuddled and confused


funnybunny
Member


Joined: 07 Dec 2005
Location: United States

Post Posted: Feb 21, 2006 01:06 Posts Comp View users profile Send private message Reply with quote

go_yy wrote:
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 got a similar problem 2. Here's my code
Code:
C:\Documents and Settings\Owner>"C:\Program Files \mplayer\mencoder.exe" "c:\video\video.ogm" -oac mp3lame -ovc copy -o "c:\video\videooutput.avi"
MEncoder dev-CVS-051227-13:21-3.4.2 <C> 2000=2005 MPlayer Team
CPU: Intel Pentium 4/Celeron 4 Northwood; Pentium 4 EE/Xeon Prestonia, Gallatin <Family: 15, Stepping: 9>
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 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.
89 audio & 203 video codecs
MPlyer was compiled without libmp3lame support.

Exiting... <error parsing cmdline>

C:\Documents and Settings\Owner>


CAn someone please help?


chaos_maiden
Member


Joined: 01 Sep 2005
Location: US

Post Posted: Apr 03, 2006 18:15 Posts Comp View users profile Send private message Reply with quote

Ok, before I get to my own issue: Kijin, if you haven't been able to fix your issue yet, I'd suggest using the method described in this topic: http://forum.videohelp.com/viewtopic.php?t=272736

But anyway, I have a rather nasty mkv file that I'm trying to convert to avi. It has h264 video, which is ugly, but I can deal with that, but the audio format is DTS. I have downloaded the newest version of ffdshow, which has DTS support, but mencoder still won't encode this file. I've also tried extracting the streams and using virtualdub, but mkvextractGUI doesn't support DTS and therefore won't extract the audio stream. Does anyone have any ideas on this?


romm
Member


Joined: 06 May 2006
Location: United States

Post Posted: May 07, 2006 22:13 Posts Comp View users profile Send private message Reply with quote

any way to reduce the number of frames skipped sometimes? or... make it try not to skip at all.

celtic_druid
Member


Joined: 07 Dec 2004
Location: Australia

Post Posted: May 08, 2006 04:02 Posts Comp View users profile Send private message Reply with quote

add -noskip. Might not work on all mencoder builds though. Works with mine.

sp1rt
Member


Joined: 24 Jul 2006
Location: Norway

Post Posted: Jul 29, 2006 21:23 Posts Comp View users profile Send private message Reply with quote

Hi, I must keep AC3... what do i need to write to keep it from being convented to mp3 ??
Quote:
add -noskip
Where ??
Code:
a52: CRC check failed!  )  12fps Trem:   0min   0mb  A-V:-0.039 [4719:223]
a52: error at resampling
a52: CRC check failed!  )  12fps Trem:   0min   0mb  A-V:-0.052 [4807:224]
What does that mean ??

celtic_druid
Member


Joined: 07 Dec 2004
Location: Australia

Post Posted: Jul 30, 2006 04:28 Posts Comp View users profile Send private message Reply with quote

To keep a stream just use copy. So for audio -oac copy.

EwanG
Member


Joined: 06 May 2002
Location: Texas

Post Posted: Sep 05, 2006 14:19 Posts Comp View users profile Send private message Reply with quote

Just a tip from someone who has been getting WAY too involved with Mencoder and FFMpeg lately (I have a couple Tivos, a PSP, and like Anime..) - If you have an MKV that you are trying to decode directly with ffmpeg, make sure to get the MKV patch from the maillist and rebuild ffmpeg with that.

Alternately, use mencoder first, and then ffmpeg. As long as you use high quality settings, you will not see that much difference from going through the double-step. In fact, using ffmpeg without mencoder first on many MKV and OGM files will leave you with a somewhat "jerky" video.

If you have more than one audio stream, for ffmpeg you want:
-map 0:0 -map 0:2
if you are using the first video and second audio stream.

For mencoder, however, you'd want:
-aid 1
because mencoder starts counting at 0. In both cases, the argument should be right after the input filename.

Hope this helps other folks as much as this thread has helped me.


flumpf
Member


Joined: 20 Oct 2001

Post Posted: Feb 12, 2007 16:25 Posts View users profile Send private message Reply with quote

This created an avi file that will not play on my system.

rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 01, 2007 07:27 Posts Comp View users profile Send private message Reply with quote

Same here. As a test I broke mplayer a few minutes in so I could see if the clip I created would play and look good. It did, looked great and sounded great. So I let it run for a few hours to finish but when it did the resulting file is unplayable. Here's the output from mencoder

---------------------------------------------------------------

C:\mencoder>mencoder.exe Heroes.S01E17.720p.HDTV.x264-CTU.mkv -oac mp3lame -ovc xvid -xvidencopts pa
ss=1 -o heroes.avi
MEncoder 1.0rc1-3.4.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
This codecs.conf is too old and incompatible with this MPlayer release! at line 6
success: format: 0 data: 0x0 - 0x44a42af2
[mkv] Track ID 1: audio (A_AC3), -aid 0, -alang und
[mkv] Track ID 2: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Will play video track 2
Matroska file format detected.
VIDEO: [avc1] 1280x720 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31 fourcc:0x31637661 size:1280x720 fps:23.98 ftime:=0.0417
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
No accelerated IMDCT transform found
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
xvid: using library version 1.1.0 (build xvid-1.1.0)
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
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
MP3 audio selected.
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
videocodec: XviD (1280x720 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=1280x720, sampled=1280x720
xvid: 2Pass Rate Control -- 1st pass
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.
Pos: 0.0s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.008 [0:0]
1 duplicate frame(s)!
Pos: 0.1s 5f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.017 [0:0]
1 duplicate frame(s)!
Pos: 1.1s 29f ( 0%) 19.92fps Trem: 0min 0mb A-V:0.084 [416:133]
Skipping frame!
Error while decoding frame!0.24fps Trem: 0min 0mb A-V:0.045 [416:133]
ODML: Starting new RIFF chunk at 1023MB. 45min 1516mb A-V:0.010 [4644:170]
Pos:2525.9s 60565f (99%) 7.34fps Trem: 0min 1621mb A-V:-0.002 [5200:172]
Flushing video frames
Writing index...
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.

Video stream: 5200.823 kbit/s (650102 B/s) size: 1642149747 bytes 2525.984 secs 60565 frames

Audio stream: 172.063 kbit/s (21507 B/s) size: 54330048 bytes 2526.048 secs

---------------------------------------------------------------

Ideas???

Thanks,

Ross


EwanG
Member


Joined: 06 May 2002
Location: Texas

Post Posted: Mar 01, 2007 08:01 Posts Comp View users profile Send private message Reply with quote

rosscarlson wrote:

This codecs.conf is too old and incompatible with this MPlayer release! at line 6


Probably not a good sign.

Quote:

Pos: 1.1s 29f ( 0%) 19.92fps Trem: 0min 0mb A-V:0.084 [416:133]
Skipping frame!
Error while decoding frame!0.24fps Trem: 0min 0mb A-V:0.045 [416:133]
ODML: Starting new RIFF chunk at 1023MB. 45min 1516mb A-V:0.010 [4644:170]
Pos:2525.9s 60565f (99%) 7.34fps Trem: 0min 1621mb A-V:-0.002 [5200:172]
Flushing video frames
Writing index...
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.


Definately not a good sign since it seems to be saying that it dumped everything from frames 416 to 4644...

I'd see if fixing the first option (i.e. make sure you get compatible releases of mencoder and MPlayer) might not fix the second.

FWIW,
Ewan


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 01, 2007 08:33 Posts Comp View users profile Send private message Reply with quote

D'oh, guess I could look at my own output huh?

Ok, just downloaded the latest release of mplayer/mencoder - running a test now - will post back in a few hours...

Thanks,

Ross


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 02, 2007 07:11 Posts Comp View users profile Send private message Reply with quote

Well I upgraded to the latest version of mplayer/mencoder but I'm still having no luck. The errors are gone, but with a different file I get the same results. What's odd is if I break it during the encoding it plays fine, it's only when I let it finish that I get a bad file.

I've tried leaving the audio intact and converting it to MP3. What I did realize is that the resulting file will play in the DivX player, just not in WMP. I need it to play in WMP so I can play it through Media Center in Vista. I don't want to install the CCCP on Vista as it is really buggy with just standard DivX/XviD files and crashed Media Center a lot. I've been using FFDShow on my media center box and that has been very stable.

Here's the output I'm getting:

Quote:

C:\mencoder>mencoder.exe Lost.S03E10.720p.HDTV.x264-SAiNTS.mkv -oac mp3lame -ovc xvid -xvidencopts p
ass=1 -o lost.avi
MEncoder 1.0rc1-3.4.2 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.20GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0x44cc940a
[mkv] Track ID 1: video (V_MPEG4/ISO/AVC), -vid 0
[mkv] Track ID 2: audio (A_AC3), -aid 0, -alang und
[mkv] Will play video track 1
Matroska file format detected.
VIDEO: [avc1] 1280x720 24bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31 fourcc:0x31637661 size:1280x720 fps:23.98 ftime:=0.0417
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
No accelerated IMDCT transform found
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
xvid: using library version 1.1.0 (build xvid-1.1.0)
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
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
MP3 audio selected.
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
videocodec: XviD (1280x720 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=1280x720, sampled=1280x720
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.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.
Pos: 0.0s 3f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.008 [0:0]
1 duplicate frame(s)!
Pos: 0.1s 5f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.017 [0:0]
1 duplicate frame(s)!
Pos: 1.1s 29f ( 0%) 4.46fps Trem: 0min 0mb A-V:0.084 [4496:168]
Skipping frame!
Error while decoding frame!4.57fps Trem: 0min 0mb A-V:0.045 [4496:168]
Pos: 876.1s 21009f (35%) 5.91fps Trem: 107min 1544mb A-V:0.084 [5044:190]
Skipping frame!
Error while decoding frame!5.91fps Trem: 107min 1544mb A-V:0.046 [5044:190]
ODML: Starting new RIFF chunk at 1023MB. 48min 1480mb A-V:-0.074 [4670:185]
Pos:2544.0s 61001f (99%) 6.68fps Trem: 0min 1503mb A-V:-0.044 [4757:188]
Flushing video frames
Writing index...
Writing header...
ODML: vprp aspect is 16:9.
Setting audio delay to 0.048s.

Video stream: 4757.831 kbit/s (594728 B/s) size: 1513039837 bytes 2544.083 secs 61001 frames

Audio stream: 188.586 kbit/s (23573 B/s) size: 59977152 bytes 2544.288 secs


Any other thoughts would be GREATLY appreciated...

Thanks,

Ross


EwanG
Member


Joined: 06 May 2002
Location: Texas

Post Posted: Mar 02, 2007 09:26 Posts Comp View users profile Send private message Reply with quote

You're specifiying XVID as your video codec. If you want it to play in WMP you are going to need a WMP friendly codec. Not sure if WMP will let you install the free DiVX codec, particularly in Vista.

Personally, I always use mpeg2 since all of my playback devices support that. However you get some rather largish file sizes doing that.

FWIW,
Ewan


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 02, 2007 09:51 Posts Comp View users profile Send private message Reply with quote

Ewan,

Thanks again for the help, and the quick help at that!

I am purposefully specifying DivX as I have ffdshow installed in Media Center and can play DivX just great, including some 720p DivX files that I have. It's just odd that the resulting file will play if I break the encode but not if I let it finish.

I'll try MPEG next, disk space isn't an issue at all so that would be fine. Do I just use -ovc mpeg (I'll look after I post this...)

Thanks,

Ross


EwanG
Member


Joined: 06 May 2002
Location: Texas

Post Posted: Mar 02, 2007 10:52 Posts Comp View users profile Send private message Reply with quote

Well, "I" run mencoder to get a smooth output from the originating MKV file, and then run ffMPEG to get the final version. So I generally don't try to watch what comes out of mencoder which may or may not relate to the problem you're having. IOW, it's possible I've been having the same problem you're having, but not noticing it because I always run the ffMPEG next, and so only watch the .mpg file.

In my case, I would take the AVI you created with mencoder and then shoot it to ffMPEG with:

"c:\program files\ffmpeg\ffmpeg.exe" -i "myfile.avi" -target ntsc-dvd -acodec mp2 -ab 192 -ac 2 -ar 48000 -b 4096 -r 29.97 -s 720x480 -vcodec mpeg2video "myfile.mpg"

YMMV,
Ewan


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 02, 2007 11:26 Posts Comp View users profile Send private message Reply with quote

So what command line are you using for part 1? I'm happy to do both if that will work, of course that will take more time to do both but if the resulting file still looks great I'm fine with that...

Again thanks for all the help...

Ross


emmgunn
Member


Joined: 09 Mar 2007
Location: United States

Post Posted: Mar 16, 2007 20:12 Posts Comp View users profile Send private message Reply with quote

I'm having trouble with .mkv files with h264 video and ac3 (or mp3 for that matter) audio using mencoder. I try -ovc xvid to convert the video and -oac copy to pass through the audio, and the result in the log file is a "1 duplicate frame(s)" message approximately every half second and eventually a "Too many audio packets in the buffer: (4100 in 2570449 bytes)" message and the process stops. I've tried all sorts of options like -noskip that I've found in my research of this problem, but I still get the duplicate frames. The best I could do was using the -mc 0 option which suppressed all but one "duplicate frames" messages but the end result was the same - the process stopped prematurely. I've included a copy of the log below. This one has me stumped. Any ideas would be appreciated.



MEncoder dev-SVN-rUNKNOWN-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU T7400 @ 2.16GHz (Family: 6, Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0 data: 0x0 - 0x4ac6a83
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_MPEG/L3), -aid 0, -alang eng
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO: [H264] 928x384 12bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31 fourcc:0x34363248 size:928x384 fps:23.98 ftime:=0.0417
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
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=44100 bits=16 B/s=16000 sample-1152)
VDec: vo config request - 928 x 384 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.42:1 - prescaling to correct movie aspect.
videocodec: libavcodec (928x384 fourcc=34504d46 [FMP4])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Pos: 0.0s 2f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos: 321.7s 7713f (68%) 77.48fps Trem: 0min 52mb A-V:0.000 [804:128]]
Too many audio packets in the buffer: (4100 in 2570449 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.

Video stream: 804.716 kbit/s (100589 B/s) size: 32359265 bytes 321.696 secs 7713 frames


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 16, 2007 21:54 Posts Comp View users profile Send private message Reply with quote

I'm having the EXACT same issue. Same exact situation - same exact results...

Any ideas anyone?


EwanG
Member


Joined: 06 May 2002
Location: Texas

Post Posted: Mar 16, 2007 23:11 Posts Comp View users profile Send private message Reply with quote

rosscarlson wrote:
So what command line are you using for part 1?


Sorry for the delay, I've been out of town. Command line is:

Code:
"c:\program files\mplayer\mencoder.exe" "Your Video.mkv" -oac mp3lame -ovc xvid -xvidencopts pass=1 -o Your_Video.avi


Hope this helps!


rosscarlson
Member


Joined: 01 Mar 2007
Location: United States

Post Posted: Mar 17, 2007 09:18 Posts Comp View users profile Send private message Reply with quote

Yup, that's what I'm using but I'm having the same issues that emmgunn is having. The odd thing is if I break it before the output completes the file plays fine.

What version of mencoder are you using, do you know?


lalitA04
Member


Joined: 20 Mar 2007
Location: India

Post Posted: Mar 20, 2007 07:40 Posts Comp View users profile Send private message Reply with quote

I want to convert mpeg to avi with mjpeg yuvj420p codec, size 128x104 for my mobile phone but i didnot get any converter with yuvj420p codec please suggest the video converter for this codec I urgently need

Startropic1
Member


Joined: 30 Sep 2006
Location: United States

Post Posted: Apr 02, 2007 23:22 Posts Comp View users profile Send private message Reply with quote

In the guide you say to check the codecs in the mkv by opening the mkv in gspot. Well I did this (gspot v2.70) and gspot does not tell you what codecs are in the mkv. What program can I use to check the codecs in an mkv? question.gif
_________________
do u teevee?


Biglou13
Member


Joined: 13 Apr 2007
Location: United States

Post Posted: Apr 13, 2007 13:08 Posts Comp View users profile Send private message Reply with quote

I sucessfully converted from MKV to AVI. But!, the only player I can view the movie from is gmplayer.

VLC, Media Player Classic, Zoom PLayer Professional all pause when I select the movie


I set audio to MP3.

Any ideas why this is happening?

Thanks,

Louis


jolson
Member


Joined: 12 Apr 2007
Location: Sweden

Post Posted: Apr 14, 2007 14:04 Posts Comp View users profile Send private message Reply with quote

emmgunn wrote:
I'm having trouble with .mkv files with h264 video and ac3 (or mp3 for that matter) audio using mencoder. I try -ovc xvid to convert the video and -oac copy to pass through the audio, and the result in the log file is a "1 duplicate frame(s)" message approximately every half second and eventually a "Too many audio packets in the buffer: (4100 in 2570449 bytes)" message and the process stops.

It seems like your AC3 audio is 5.1, while mencoder thinks it's 128kbps 2-channel audio.

I'm interested in doing exactly the same conversion, but haven't found anything that really works for me...


Bonchick
Member


Joined: 30 Oct 2006
Location: United States, CA

Post Posted: Apr 20, 2007 21:12 Posts Comp View users profile Send private message Reply with quote

Hi.
I need somebody's help with mencoder. I'm encoding MKV to AVI files using old version alltoavi batcher with option of manually change comand. What I need is how to encode audio track #2 or if it says only languadge kind.
Here I have a comand:
mencoder "PATH\FILENAME.EXTENSION" -ovc copy -oac lavc -lavcopts acodec=mp3:abitrate=96 -o "PATH\cvt_FILENAME.avi"
What and to where should I add some change?


jester30
Member


Joined: 25 May 2007
Location: Australia

Post Posted: May 25, 2007 11:51 Posts Comp View users profile Send private message Reply with quote

what command would i use to set the bitrate at 384kbps and the resolution reduced from 1280x720 down to 960x528???

thanks

jesse


kindredphantom
Member


Joined: 21 Jan 2007
Location: United Kingdom

Post Posted: Aug 22, 2007 11:22 Posts Comp View users profile Send private message Reply with quote

Hi, i have converted a mkv file to avi following the instructions given in the topics first post but when i play the video the audio is out of sync with the video.
Does anyone have any idea how i can fix this? Should i try using a different audio codec?
These are the commands i used to convert.

Code:
"C:\Documents and Settings\User\Desktop\mplayer\mencoder.exe" "C:\Documents and Settings\User\Desktop\Live.Free.Or.Die.Hard.2007.DVDRip.R5.x264.VoRbis.MatRoska.NhaNc3.mkv" -oac mp3lame -ovc xvid -xvidencopts pass=1 -o "C:\Documents and Settings\User\Desktop\diehard4.avi"


G1ngerNinja
Member


Joined: 12 Sep 2007
Location: United Kingdom

Post Posted: Sep 12, 2007 15:19 Posts Comp View users profile Send private message Reply with quote

OK for those having problems as I did with a MKV file that has H264/AVC and AC3 audio.

Here's my command that does work but requires the re-encoding of the audio I'm afraid.

mencoder -channels 6 -aid 0 -noskip -mc 0 cdd_x264_hd.mkv -ovc xvid -xvidencopts bitrate=<your bitrate> -oac lavc -lavcopts acodec=ac3:abitrate=<your bitrate> -o test.avi

For the person who asked about picking the right audio track if there is more than 1, well in the above example file I have 2 audio tracks and the "-aid 0" option in the above command picks out the 1st audio track of the 2.

Hopes this helps people out. If so let me know.

Also if anyone can figure out how to get "-oac copy" working without audio sync issues for AC3 I would be glad to know.
And if anyone knows how to get mencoder to use multiple threads for use with several CPU's I have 4 of them that would be nice too.

Cheers
G1ngerNinja

UPDATE:

Well it turns out that the centre audio channel ends up in the rear-right channel. So what I have managed to do instead is this:-
./mencoder -nosound -noskip -mc 0 s-disturbia/ccd_x264_hd.mkv -ovc xvid -xvidencopts bitrate=<your bitrate> -o ccd_x264_hd_1280_vidonly.avi

This gives us the video in xvid format without sound. Then we need to extract the original AC3 audio like this :-
mplayer ccd_x264_hd.mkv -aid 0 -dumpaudio -dumpfile ccd_x264_hd_1280.ac3

Then we need to mux the 2 together, I use AVIDEMUX which works a treat.

So hope this helps people out.


Reply to topic All times are GMT - 6 Hours
Goto page Previous  1, 2, 3  Next
Forum Index -> How to's -> User guides Page 2 of 3





You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You can vote in polls in this forum



Jump to:  
Display:   
DVDFab DVD to DVD and Blu-ray to Blu-ray offers a 20% discount until Nov 22, 2009. More info or download trial!
About   Advertise   Forum Archive   RSS Feeds   Statistics