[MEncoder-users] correct options

Karsten Römke k.roemke at gmx.de
Mon Aug 9 19:40:17 CEST 2010


Hello!
As everybody might expect, I have a problem with mencoder.
I have no idea where to search, so I ask here.
I use Suse 11.2 and the versions of mplayer from packman.

I use the following commands to encode an m2v video to h264
(I think mpeg2).

# options:
SUBQ1=6 #5 is faster but quality is not so good, 7 is best but needs 
long time
FRAMEREF1=5 #here was 5 the original value, I think 3 could be enough
SUBQ2=6 #5 is faster but quality is not so good, 7 is best but needs 
long time
FRAMEREF2=5 #here was 5 the original value, I think 3 could be enough
#If you care about speed, a reasonable compromise is to use low subq and
#frameref values on the first pass, and then raise them on the second pass.
#Typically, this has a negligible negative effect on the final quality
ME='umh' #best reasonable choice, esa to slow for practical use
X264_BITRATE=1024

${MENCODER} -ovc x264 -x264encopts \
bitrate=${X264_BITRATE}:subq=$SUBQ1:partitions=all:8x8dct:me=$ME:frameref=$FRAMEREF1:bframes=3:b_pyramid=normal:weight_b:pass=1:threads=aut
-oac copy -of rawvideo -o "${TMP_VID}" "${SRC_VID}" 1>&- || {
        echo -e "\nError: mencoder could not encode (first pass) the 
file. Check the printed errors"
        exit 2
}
${MENCODER}  -ovc x264 -x264encopts \
bitrate=${X264_BITRATE}:subq=$SUBQ2:partitions=all:8x8dct:me=$ME:frameref=$FRAMEREF2:bframes=3:b_pyramid=normal:weight_b:pass=2:threads=aut
-oac copy -of rawvideo -o "${TMP_VID}" "${SRC_VID}" 1>&- || {
        echo -e "\nError: mencoder could not encode the file. Check the 
printed errors"
        exit 2
}

When playing with vlc -> no problem, when playing with my standalone 
player (ms 30) I get only the sound.
I try to use MediaCoder (which also uses x264) which leads in a single 
pass encoding to a result which I can view with my standalone player.

So my question: Are in my options any strange combinations which could 
lead to a file which does not work on the media player?

The MediaCoder gives some information about the files, I append them.

Any hint would be very nice, I don't know where to search.

Greetings
        Karsten

the information I get from MediaCoder:

properties of the file which is created under linux using
mencoder:
Eigenschaften des Files, welches unter Linux erstellt wurde:
(Abspielen mit ms30 geht nicht)

General
Complete name                    : 
Y:\videoConverted\AsterixRennen_f3_mpeg2.mkv
Format                           : Matroska
File size                        : 9.75 MiB
Duration                         : 53s 256ms
Overall bit rate                 : 1 535 Kbps
Movie name                       : AsterixRennen_f3_mpeg2
Encoded date                     : UTC 2010-08-09 14:59:10
Writing application              : mkvmerge v4.2.0 ('No Talking')
Writing library                  : libebml v1.0.0 + libmatroska v1.0.0

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High at L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 5 frames
Muxing mode                      : Container profile=Unknown at 3.0
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 53s 240ms
Bit rate                         : 992 Kbps
Nominal bit rate                 : 1 024 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 25.000 fps
Standard                         : PAL
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.096
Stream size                      : 6.30 MiB (65%)
Writing library                  : x264 core 98
Encoding settings                : cabac=1 / ref=5 / deblock=1:0:0 / 
analyse=0x3:0x133 / me=umh / subme=6 / psy=1 / psy_rd=1.00:0.00 / 
mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / 
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / 
sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / 
constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / 
direct=1 / weightb=1 / weightp=2 / keyint=250 / keyint_min=25 / 
scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=2pass / mbtree=1 / 
bitrate=1024 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 
/ cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00

Audio #1
ID                               : 2
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 3
Format_Settings_Mode             : Joint stereo
Codec ID                         : A_MPEG/L3
Codec ID/Hint                    : MP3
Duration                         : 53s 232ms
Bit rate mode                    : Constant
Bit rate                         : 128 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Stream size                      : 832 KiB (8%)
Writing library                  : LAME3.99a
Encoding settings                : -m j -V 4 -q 3 -lowpass 17 -b 128

Audio #2
ID                               : 3
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 53s 256ms
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 2.44 MiB (25%)
------------------------------------------------------------------------------------
and the file which is created my MediaCoder
und die Datei, die mit MediaCoder erstellt wurde (abspielen mit ms30 geht)
General
Complete name                    : 
Y:\videoConverted\AsterixRennen_f3_mpeg2_mediaCoder.mkv
Format                           : Matroska
File size                        : 9.96 MiB
Duration                         : 53s 208ms
Overall bit rate                 : 1 571 Kbps
Encoded date                     : UTC 2010-08-09 14:43:15
Writing application              : mkvmerge v3.1.0 ('Happy up here') 
built on Jan 19 2010 12:09:24
Writing library                  : libebml v0.7.9 + libmatroska v0.8.1

Video
ID                               : 1
Format                           : AVC
Format/Info                      : Advanced Video Codec
Format profile                   : High at L3.0
Format settings, CABAC           : Yes
Format settings, ReFrames        : 4 frames
Muxing mode                      : Container profile=Unknown at 3.0
Codec ID                         : V_MPEG4/ISO/AVC
Duration                         : 53s 200ms
Bit rate                         : 964 Kbps
Nominal bit rate                 : 1 024 Kbps
Width                            : 720 pixels
Height                           : 576 pixels
Display aspect ratio             : 16:9
Frame rate mode                  : Variable
Frame rate                       : 25.000 fps
Standard                         : PAL
Resolution                       : 8 bits
Colorimetry                      : 4:2:0
Scan type                        : Progressive
Bits/(Pixel*Frame)               : 0.093
Stream size                      : 6.11 MiB (61%)
Writing library                  : x264 core 104 r1683 62997d6
Encoding settings                : cabac=1 / ref=3 / deblock=1:0:0 / 
analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / 
mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / 
deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=4 / 
sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / 
constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / 
direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / 
keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr 
/ mbtree=1 / bitrate=1024 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / 
qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00

Audio #1
ID                               : 2
Format                           : AC-3
Format/Info                      : Audio Coding 3
Codec ID                         : A_AC3
Duration                         : 53s 208ms
Bit rate mode                    : Constant
Bit rate                         : 384 Kbps
Channel(s)                       : 6 channels
Channel positions                : Front: L C R, Side: L R, LFE
Sampling rate                    : 48.0 KHz
Stream size                      : 2.44 MiB (24%)

Audio #2
ID                               : 3
Format                           : MPEG Audio
Format version                   : Version 1
Format profile                   : Layer 2
Codec ID                         : A_MPEG/L2
Codec ID/Hint                    : MP2
Duration                         : 53s 208ms
Bit rate mode                    : Constant
Bit rate                         : 192 Kbps
Channel(s)                       : 2 channels
Sampling rate                    : 48.0 KHz
Stream size                      : 1.22 MiB (12%)







More information about the MEncoder-users mailing list