Gentoo Archives: gentoo-user

From: Uwe Thiem <uwix@××××.na>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] mencoder did nothing all night at 100% CPU!
Date: Mon, 28 Aug 2006 13:39:59
Message-Id: 200608281416.57169.uwix@iway.na
In Reply to: Re: [gentoo-user] mencoder did nothing all night at 100% CPU! by Iain Buchanan
1 On 28 August 2006 13:39, Iain Buchanan wrote:
2 > On Fri, 2006-08-11 at 08:21 +0100, Uwe Thiem wrote:
3 > > On 10 August 2006 23:06, Iain Buchanan wrote:
4 > > > Hi all,
5 > > >
6 > > > I'm trying out mencoder to try a few different codecs and formats for
7 > > > 1. dvd authoring and 2. just compressing to keep on my HD.
8 > >
9 > > For DVDs, try this:
10 > >
11 > > mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd \
12 > > -vf scale=720:576,harddup -srate 48000 -af lavcresample=48000 \
13 > > -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:\
14 > > vbitrate=5000:keyint=15:acodec=ac3:abitrate=192:aspect=4/3 \
15 > > -ofps 25 -o outfile.mpeg infile
16 >
17 > wow! I just got around to trying that a couple of days ago and it
18 > produces great output: fast, small file size, and no noticeable
19 > difference in quality between the mpeg and the original dv! (I watched
20 > many different clips many times over to make sure! on TV and on my LCD)
21 >
22 > But: the mpeg doesn't seem to scale right. My laptop display is
23 > 1680x1050, and hence the original dv output (4:3) has black edges on
24 > each side, but the converted mpeg plays "stretched", so that everybody
25 > looks fat!
26 >
27 > Is this just a _player_ issue, or is it a problem with the encoding of
28 > the mpeg itself?
29 >
30 > I noticed the command line has aspect=4/3 in it already, which is the
31 > aspect of the original dv file...
32
33 Maybe, the "scale" is wrong for you. How many frame lines do your originals
34 have?
35
36 I actually overlooked "compressing to keep on my HD" in your original post.
37 For that purpose, try:
38
39
40 === begin script ===
41 #! /bin/sh
42
43 BITRATE="730"
44
45 INFILE="dvd://"
46 OUTFILE="myname-br$BITRATE-pass"
47 OUTEXT=".avi"
48
49 VIDCOM="-ovc x264 -x264encopts bitrate=$BITRATE"
50 AUDCOM="-oac mp3lame -lameopts vbr=0:br=64:vol=3"
51
52 RMLOG="rm divx*.log"
53
54
55 $RMLOG
56
57 mencoder $INFILE $VIDCOM $AUDCOM -o "$OUTFILE"1$OUTEXT
58 mencoder $INFILE $VIDCOM=3 $AUDCOM -o "$OUTFILE"2$OUTEXT
59 #mencoder $INFILE $VIDCOM=3 $AUDCOM -o "$OUTFILE"3$OUTEXT
60 #mencoder $INFILE $VIDCOM=3 $AUDCOM -o "$OUTFILE"4$OUTEXT
61 === end script ===
62
63 Obviously, you have to adjust INFILE (can also be a real file) and OUTFILE.
64 You should set "br" to 128 for music movies. Play with BITRATE for higher
65 quality or smaller file size. Beware that it takes *ages* but look at the
66 result!
67
68 Uwe
69
70 --
71 Mark Twain: I rather decline two drinks than a German adjective.
72 http://www.SysEx.com.na
73 --
74 gentoo-user@g.o mailing list

Replies

Subject Author
Re: [gentoo-user] mencoder did nothing all night at 100% CPU! Iain Buchanan <iaindb@××××××××××××.au>