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

Alex Samad alex at samad.com.au
Sat Mar 8 02:17:03 CET 2008


On Sat, Mar 08, 2008 at 12:03:18PM +1100, Alex Samad wrote:
> On Fri, Mar 07, 2008 at 01:43:18PM -0600, Brian Penick wrote:
> > Sorry, the nob_pyramid. won't help with the blocking, only the choppiness.
> > The cpu in the xbox isn't fast enough to handle the b_pyramid option because
> > it requires extra decoding time due to the fact that it allows b-frames to
> > be predicted off of other b-frames.  The problem is that the reference
> > b-frames also have to be predicted from a P or I frame.  So it results in
> > extra decoding time before a frame can be displayed. As far as the blocking
> > is concerned try taking out the 8x8dct option and setting partitions=all
> > (this option dependent on how new your mencoder version is).  You could try
> > using the pp deblocking video filters before encoding. Also I believe crf
> > was designed for single pass video encoding which negates all of your qp
> > settings the x264 codec will ignore them for crf.  Pretty sure you have to
> > set a bitrate for multipass encoding. Lastly I think setting qpmax to 51
> > might result in some bad quality still frames because it'll pull the bitrate
> > to motion scenes try setting it to 31.
> Okay will have a look at that.
> 
> This might also explain why when I play my mp4 files on QT viewer on a
> dual intel it goes all choppy (when played with m$ media player its okay
> - using other codecs though.
I ran a quick test with no_b_pyramid and the choppiness of the video has
disappeared, video plays fine now the aac seems to be giving it
problems, I am going to try object_type=2 and see if that helps. the
next step I guess is to move to mp3.

Still having playing problems on the xbox though


> 
> So I am going to try removing the pyramid stuff first see how that goes,
> remove the crf as well and replace with a bitrate for pass 1.
> 
> try out 8x8dct & pp in a different session
> 
> I will check out the qpmax once I have done the above
> 
> Also when i look at my .mp4 file with MP4Box -info i get this
> 
>  MP4Box -info 20080305114201-MOV023-brames.mp4 
> * Movie Info *
> 	Timescale 600 - Duration 00:00:17.520
> 	Fragmented File no - 2 track(s)
> 	File Brand isom - version 1
> 	Created: GMT Wed Mar  5 00:46:06 2008
> 
> File has root IOD
> Scene PL 0xff - Graphics PL 0xff - OD PL 0xff
> Visual PL: AVC/H264 Profile (0x15)
> Audio PL: High Quality Audio Profile @ Level 2 (0x0f)
> No streams included in root OD
> 
> Track # 1 Info - TrackID 1 - TimeScale 25000 - Duration 00:00:17.520
> Media Info: Language "Undetermined" - Type "vide:avc1" - 438 samples
> MPEG-4 Config: Visual Stream - ObjectTypeIndication 0x21
> AVC/H264 Video - Visual Size 704 x 576 - Profile High @ Level 5.1
> NAL Unit length bits: 32
> Pixel Aspect Ratio 16:11 - Indicated track size 1024 x 576
> Self-synchronized
> 
> Track # 2 Info - TrackID 2 - TimeScale 48000 - Duration 00:00:17.386
> Media Info: Language "Undetermined" - Type "soun:mp4a" - 815 samples
> MPEG-4 Config: Audio Stream - ObjectTypeIndication 0x40
> MPEG-4 Audio AAC Main - 2 Channel(s) - SampleRate 48000
> Synchronized on stream 1
> 
> 
> The thing that has me worried (i think) is the 
> Pixel Aspect Ratio 16:11 - Indicated track size 1024 x 576
> 
> how do I change this to stick to wide screen 704x576 ?
> 
> Thanks
> Alex
> 
> > 
> > On Fri, Mar 7, 2008 at 12:58 AM, Alex Samad <alex at samad.com.au> wrote:
> > 
> > > On Wed, Mar 05, 2008 at 07:14:29PM -0600, Brian Penick wrote:
> > > > I suggest changing b_pyramid to nob_pyramid, subq=7 to subq=6 (you
> > > shouldn't
> > > > notice a drop in quality at all but it will speed up the encode), and
> > > > frameref=4 to frameref=2.  Optionally you could increase the b_bias to
> > > 20
> > > > (b_bias=20) to favor bframes a little more since b_adapt still strongly
> > > > favors P frames even when the image is totally still.  But I'm pretty
> > > sure
> > > > your biggest issue here is the b_pyramid option.
> > > Hi
> > >
> > > Is there a simple way of explaing why this option is giving me the
> > > blockiness.  The mn pages in mencoder only talk about referencing
> > > B-Frames
> > >
> > > Thanks
> > >
> > > >
> > > > On Tue, Mar 4, 2008 at 6:36 PM, Alex Samad <alex at samad.com.au> 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
> > > > >
> > > > > these are the flags I am using
> > > > >
> > > > >
> > >  H264COMMON=":frameref=4:mixed_refs:bframes=16:b_adapt:b_pyramid:weight_b:bime: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:threads=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
> > > > >
> > > > > -----BEGIN PGP SIGNATURE-----
> > > > > Version: GnuPG v1.4.6 (GNU/Linux)
> > > > >
> > > > > iD8DBQFHzesikZz88chpJ2MRAhU5AJ99LTsMw5u5h1rLN/fiMV2yaas8jQCgtizW
> > > > > u3KheaAME+oLkJSZn0i11aI=
> > > > > =N5tm
> > > > > -----END PGP SIGNATURE-----
> > > > >
> > > > > _______________________________________________
> > > > > MEncoder-users mailing list
> > > > > MEncoder-users at mplayerhq.hu
> > > > > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > > > >
> > > > _______________________________________________
> > > > MEncoder-users mailing list
> > > > MEncoder-users at mplayerhq.hu
> > > > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > > >
> > >
> > > --
> > > Chemist who falls in acid is absorbed in work.
> > >
> > > -----BEGIN PGP SIGNATURE-----
> > > Version: GnuPG v1.4.6 (GNU/Linux)
> > >
> > > iD8DBQFH0Od6kZz88chpJ2MRArdMAJ0c84m8qARw2o3/ZcKXKq0IDC/8QgCfWCVI
> > > jUski37//POX7r5outyRjRM=
> > > =9eN6
> > > -----END PGP SIGNATURE-----
> > >
> > > _______________________________________________
> > > MEncoder-users mailing list
> > > MEncoder-users at mplayerhq.hu
> > > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > >
> > _______________________________________________
> > MEncoder-users mailing list
> > MEncoder-users at mplayerhq.hu
> > https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
> > 
> 
> -- 
> "Put the 'off' button on."
> 
> 	- George W. Bush
> 02/14/2000
> giving advice to parents troubled by the graphic fare on television



> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

-- 
"We're concerned about AIDS inside our White House -- make no mistake about it."

	- George W. Bush
02/07/2001
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/mencoder-users/attachments/20080308/1231f609/attachment.pgp>


More information about the MEncoder-users mailing list