[MEncoder-users] 1.0rc2: Too-high bitrate problem is back
Francois Visagie
fvisagie at za.spescom.com
Tue Oct 16 21:35:31 CEST 2007
Hi All,
Congratulations on 1.0rc2 and all its enhancements and improvements!
The previously fixed problem with bitrate deemed unnecessarily high not
being properly handled has returned in 1.0rc2. In the comparison below I
used the command line: mencoder %1 -aspect 4/3 -mc 0 -noskip -vf
hqdn3d=2:1:2,harddup -ovc lavc -oac lavc -lavcopts
aspect=4/3:ildct:ilme:keyint=15:vbitrate=7345:vcodec=mpeg2video:vpass=%PASS%
:vrc_buf_size=1835:vrc_maxrate=9800:vstrict=0:acodec=ac3:abitrate=128:psnr
-of mpeg -mpegopts format=dvd:tsaf -o %1.1.mpg
In previous versions with this problem MEncoder would crash, but now the
symptoms are:
* as before it reports the unnecessarily high bitrate,
* it completes the encode (two-pass in my case),
* the movie contains no video (except black ;-)),
* therefore the bitrate is very much lower than specified; in this case it
would be around 152kbps instead of around 7340, and
* the PSNR calculations fail in pass 2
As before this behaviour can be avoided by either specifying a lower bitrate
or by enforcing a higher bitrate usage through increased quality.
The most recent version I used where this worked correctly, was MEncoder
Sherpya-SVN-r24537-4.2.1. I do realise that it may contain patches that
never found their way into 1.0rc2, but hopefully somebody with better access
than I to compiling SVNs can tell. During its two passes MEncoder
Sherpya-SVN-r24537-4.2.1 displays:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----
MEncoder Sherpya-SVN-r24537-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13,
Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0xf205000
AVI file format detected.
AVI_NI: No video stream found.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [dvsd] 720x576 0bpp 25.000 fps 28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:35 fourcc:0x64737664 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [hqdn3d=2:1:2]
==========================================================================
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 00D80B00]SwScaler: BICUBIC scaler, from yuyv422 to yuv420p using
MMX
2
[swscaler @ 00D80B00]SwScaler: using 4-tap MMX scaler for horizontal
luminance s
caling
[swscaler @ 00D80B00]SwScaler: using 4-tap MMX scaler for horizontal
chrominance
scaling
[swscaler @ 00D80B00]SwScaler: using 1-tap MMX "scaler" for vertical scaling
(YV
12 like)
[swscaler @ 00D80B00]SwScaler: 720x576 -> 720x576
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
VideoDecoder::SetExtAttr: registry failure
Selected video codec: [qdv] vfm: dshow (Sony Digital Video (DV))
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 70.3s 1757f (100%) 26.26fps Trem: 0min 62mb A-V:0.000 [7355:127]
Flushing video frames.
Writing index...
Overhead: 1.731% (1118973 / 64644355)
Writing header...
Video stream: 7355.351 kbit/s (919418 B/s) size: 64616759 bytes 70.280
secs
1757 frames
Audio stream: 128.000 kbit/s (15999 B/s) size: 1124864 bytes 70.304 secs
PSNR: Y:39.74, Cb:45.17, Cr:44.30, All:40.86
MEncoder Sherpya-SVN-r24537-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13,
Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0xf205000
AVI file format detected.
AVI_NI: No video stream found.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [dvsd] 720x576 0bpp 25.000 fps 28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:35 fourcc:0x64737664 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [hqdn3d=2:1:2]
==========================================================================
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 00D80B00]SwScaler: BICUBIC scaler, from yuyv422 to yuv420p using
MMX
2
[swscaler @ 00D80B00]SwScaler: using 4-tap MMX scaler for horizontal
luminance s
caling
[swscaler @ 00D80B00]SwScaler: using 4-tap MMX scaler for horizontal
chrominance
scaling
[swscaler @ 00D80B00]SwScaler: using 1-tap MMX "scaler" for vertical scaling
(YV
12 like)
[swscaler @ 00D80B00]SwScaler: 720x576 -> 720x576
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
VideoDecoder::SetExtAttr: registry failure
Selected video codec: [qdv] vfm: dshow (Sony Digital Video (DV))
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 70.3s 1757f (100%) 27.02fps Trem: 0min 62mb A-V:0.000 [7347:127]
Flushing video frames.
Writing index...
Overhead: 1.725% (1113390 / 64561874)
Writing header...
Video stream: 7347.016 kbit/s (918377 B/s) size: 64543538 bytes 70.280
secs
1757 frames
Audio stream: 128.000 kbit/s (15999 B/s) size: 1124864 bytes 70.304 secs
PSNR: Y:39.85, Cb:45.30, Cr:44.35, All:40.97
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----
By comparison, 1.0rc2 displays:
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----
MEncoder 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13,
Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0xf205000
AVI file format detected.
AVI_NI: No video stream found.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [dvsd] 720x576 0bpp 25.000 fps 28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:35 fourcc:0x64737664 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [hqdn3d=2:1:2]
==========================================================================
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 00D24D00]SwScaler: BICUBIC scaler, from yuyv422 to yuv420p using
MMX
2
[swscaler @ 00D24D00]SwScaler: using 4-tap MMX scaler for horizontal
luminance s
caling
[swscaler @ 00D24D00]SwScaler: using 4-tap MMX scaler for horizontal
chrominance
scaling
[swscaler @ 00D24D00]SwScaler: using 1-tap MMX "scaler" for vertical scaling
(YV
12 like)
[swscaler @ 00D24D00]SwScaler: 720x576 -> 720x576
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
VideoDecoder::SetExtAttr: registry failure
Selected video codec: [qdv] vfm: dshow (Sony Digital Video (DV))
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 70.3s 1757f (100%) 38.69fps Trem: 0min 11mb A-V:0.000 [1350:127]
Flushing video frames.
Writing index...
Overhead: 4.106% (480318 / 11697090)
Writing header...
Video stream: 1350.076 kbit/s (168759 B/s) size: 11860419 bytes 70.280
secs
1757 frames
Audio stream: 128.000 kbit/s (15999 B/s) size: 1124864 bytes 70.304 secs
PSNR: Y:50.50, Cb:57.04, Cr:54.50, All:51.64
MEncoder 1.0rc2-4.2.1 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Pentium(R) M processor 2.00GHz (Family: 6, Model: 13,
Stepping: 8)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
success: format: 0 data: 0x0 - 0xf205000
AVI file format detected.
AVI_NI: No video stream found.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [dvsd] 720x576 0bpp 25.000 fps 28800.0 kbps (3515.6 kbyte/s)
[V] filefmt:35 fourcc:0x64737664 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio: 192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed PCM)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [harddup]
Opening video filter: [hqdn3d=2:1:2]
==========================================================================
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 UYVY
Decoder is capable of YUV output (flags 0x9)
VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 9 -> 8
[swscaler @ 00D24D00]SwScaler: BICUBIC scaler, from yuyv422 to yuv420p using
MMX
2
[swscaler @ 00D24D00]SwScaler: using 4-tap MMX scaler for horizontal
luminance s
caling
[swscaler @ 00D24D00]SwScaler: using 4-tap MMX scaler for horizontal
chrominance
scaling
[swscaler @ 00D24D00]SwScaler: using 1-tap MMX "scaler" for vertical scaling
(YV
12 like)
[swscaler @ 00D24D00]SwScaler: 720x576 -> 720x576
videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
[mpeg2video @ 00D299C0][lavc rc] Using all of requested bitrate is not
necessary
for this video with these parameters.
VideoDecoder::SetExtAttr: registry failure
Selected video codec: [qdv] vfm: dshow (Sony Digital Video (DV))
==========================================================================
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 70.3s 1757f (100%) 44.97fps Trem: 0min 2mb A-V:0.000 [152:127]
Flushing video frames.
Writing index...
Overhead: 15.106% (369824 / 2448224)
Writing header...
Video stream: 152.669 kbit/s (19083 B/s) size: 1341193 bytes 70.280 secs
17
57 frames
Audio stream: 128.000 kbit/s (15999 B/s) size: 1124864 bytes 70.304 secs
PSNR: Y:1.#J, Cb:1.#J, Cr:1.#J, All:1.#J
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----
Kind regards,
Francois
This e-mail is sent on the Spescom Terms and Conditions
that can be accessed by clicking on this link http://www.spescom.com/email.html
More information about the MEncoder-users
mailing list