[MEncoder-users] h264 (and help with encoding) or divx

Grozdan Nikolov (openSUSE Linux) microchip at telenet.be
Wed Mar 5 08:11:36 CET 2008


On Wednesday 05 March 2008 01:36, Alex Samad wrote:
> Hi
>
> I am in the process of processing my video camera footage I have taken.
>
> I was hoping to go to h264, but testing the resultant files on my xbox
> (xbmc), it is very choppy, it can't seem to keep up (also encoding sound
> to aac).  So I am thinking to either go back to encoding with divx or
> buy an xbox360 ?
>
> I would like to stay with h264 it saves a lot of space.
>
> My other problem with x264 is I get boxy area's when the back ground is
> a wall, with a visible light gradient (you can see it get darker the
> further away it is).  This looks okay in the original format, but when
> encoded with x264 it goes all blocky and not smooth at all

Hi,

if you want to get the blockiness go away you'd have to patch x264 with the 
variance adaptive quantization patch which is designed just for that purpose. 
To raise quality in flat (dark) areas. You can find VAQ in the link below

also you can try out h264enc which has 2 xbox 360 presets - 
http://h264enc.sourceforge.net

VAQ - http://files.x264.nl/x264_patches/force.php?file=./x264_aq_var.48.diff

>
> these are the flags I am using
>    
> H264COMMON=":frameref=4:mixed_refs:bframes=16:b_adapt:b_pyramid:weight_b:bi
>me:direct_pred=auto:me=umh:me_range=24:subq=7:brdo:chroma_me:trellis=1:cabac
>:deblock:8x8dct:partitions=p8x8,b8x8,i8x8,i4x4:nofast_pskip:nodct_decimate:t
>hreads=auto:keyint=250:qp_min=10:qp_max=51:ip_factor=1.4:pb_factor=1.3:qcomp
>=0.6:qblur=0.5:chroma_qp_offset=0"
>
>     ENC1="x264 -x264encopts pass=1:crf=18:turbo$H264COMMON"
>     ENC2="x264 -x264encopts pass=3:bitrate=$BITRATE$H264COMMON"
>
>     AENC="-af volnorm=1"
>
>     FILTER1=""
>
>     FILTER2="-vf spp,hqdn3d=2:1:2"
>
>    AUDIO="-oac faac -faacopts object=1:tns:quality=300:mpeg=4"
>
>     ASPECT="-aspect 16:9"
>
>     ADDOPT=
>
>
>     echo "Video Pass 1/3"
>  	nice mencoder $QUIET \
>             $ASPECT \
>             -alang en\
>             $FILTER1 \
>             -ovc $ENC1 \
>             -nosound \
>             -passlogfile "$PASSLOG" \
>             -o /dev/null \
>             "$INFILE" $ADDOPT
>
>     echo "Video & Audio Pass 2/3"
>     nice mencoder $QUIET \
>             $ASPECT \
>             -alang en\
>             $FILTER2 \
>             $AENC \
>             -ovc $ENC2 \
>             -passlogfile "$PASSLOG" \
>             $AUDIO \
>             -o "$AVIFILE" \
>             "$INFILE" $ADDOPT
>
>     echo "Video & Audio Pass 3/3"
>     nice mencoder $QUIET \
>             $ASPECT \
>             -alang en\
>             $FILTER2 \
>             $AENC \
>             -ovc $ENC2 \
>             -passlogfile "$PASSLOG" \
>             $AUDIO \
>             -o "$AVIFILE" \
>             "$INFILE" $ADDOPT
>
>
>     echo "Extract Video"
>     nice MP4Box -aviraw video "$AVIFILE" > "$WRKDIR/aviraw_video.out" &
>     WAITPD="$!"
>
>     # Extracts to ${BFILE}_audio.raw
>     echo "Extract Audio"
>     nice MP4Box -aviraw audio "$AVIFILE" > "$WRKDIR/aviraw_audio.out" &
>     WAITPD="$WAITPD $!"
>
>     wait $WAITPD
>
>     mv $SNDFILERAW $SNDFILEAAC
>
>     echo "Make mp4"
>     MP4Box -add "$VIDFILERAW" -add "$SNDFILEAAC" -fps 25 -new
> "${OUTFILE}" > "$WRKDIR/MP4Box.out"
>
>
>
> What can I do to smooth out these ares with out loosing too much
> definition in the for ground.
>
> Also how can I use mplayer (or mencoder) to output to a jpg a specific
> frame (or time reference) so I can give examples
>
> Thanks
>
>
> -
> "The march to war affected the people's confidence. It's hard to make
> investment. See, if you're a small business owner or a large business owner
> and you're thinking about investing, you've got to be optimistic when you
> invest. Except when you're marching to war, it's not a very optimistic
> thought, is it? In other words, it's the opposite of optimistic when you're
> thinking you're going to war."
>
> 	- George W. Bush
> 02/09/2004
> Springfield, MO

-- 
Regards



More information about the MEncoder-users mailing list