← Back to team overview

medibuntu-maintainers team mailing list archive

[Bug 694333] [NEW] mencoder ignores bitrate parameter when encoding H.264 video

 

Public bug reported:

After upgrading to Maverick, Mencoder ignores completeley the "bitrate"
parameter, when encoding H264 videos, using ridculously high bitrates
(10Mb/s for instance).

I have tried many combinations of parameters to the x264encopts option
to no avail, so this one is the simplest in order to reproduce the
problem:

The source material is in this case DVD quality vide (bitrate ~ 9000
kbps)

$ mencoder -ovc x264 -nosound -x264encopts bitrate=1370:pass=1:psnr -o /dev/null tmp/x264.avi
MEncoder 1.0rc4-4.4.5 (C) 2000-2010 MPlayer Team
success: format: 0  data: 0x0 - 0x4004da2
AVI file format detected.
[aviheader] Video stream found, -vid 0
VIDEO:  [H264]  688x560  24bpp  25.000 fps  8944.8 kbps (1091.9 kbyte/s)
[V] filefmt:3  fourcc:0x34363248  size:688x560  fps:25.000  ftime:=0.0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Pos:   0.0s      1f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing vprp header.
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect..000 [0:0]
x264 [info]: using SAR=249/172
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 Cache64
x264 [info]: profile Baseline, level 2.2

1 duplicate frame(s)!
Writing header...
ODML: vprp aspect is 16:9.
Writing header...5f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
ODML: vprp aspect is 16:9.
Pos:  59.9s   1500f (99%) 80.09fps Trem:   0min  73mb  A-V:0.000 [10300:0]
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16:9.

Video stream: 10305.644 kbit/s  (1288205 B/s)  size: 77292323 bytes  60.000 secs  1500 frames
x264 [info]: frame I:6     Avg QP:10.00  size: 57932  PSNR Mean Y:63.95 U:83.16 V:85.64 Avg:65.15 Global:57.10
x264 [info]: frame P:1492  Avg QP:10.02  size: 51572  PSNR Mean Y:54.84 U:67.46 V:73.02 Avg:55.72 Global:53.18
x264 [info]: mb I  I16..4: 100.0%  0.0%  0.0%
x264 [info]: mb P  I16..4: 25.5%  0.0%  0.0%  P16..4: 57.7%  0.0%  0.0%  0.0%  0.0%    skip:16.8%
x264 [info]: final ratefactor: 0.23
x264 [info]: coded y,uvDC,uvAC intra: 86.5% 48.2% 47.4% inter: 66.9% 42.4% 25.8%
x264 [info]: i16 v,h,dc,p: 27% 11% 46% 16%
x264 [info]: i8c dc,h,v,p: 71% 11% 11%  7%
x264 [info]: PSNR Mean Y:54.878 U:67.519 V:73.066 Avg:55.759 Global:53.188 kb/s:412.78

As you can see, I asked to encode at 1370 kbps on the first (of two)
pass and mencoder encoded at 10305kbps. On the second pass I get similar
ouput but in addition, the encoder complains about the "2pass curve
convergence":

x264 [warning]: Error: 2pass curve failed to converge
x264 [warning]: target: 1370.00 kbit/s, expected: 328.52 kbit/s, avg QP: 10.0004
x264 [warning]: try reducing target bitrate or reducing qp_min (currently 10)

Changing the requested bitrate does not have any effect, AFAICS.

This was working just fine in Lucid. The same problem doesn't present
itself if I encode with -ovc lavc -lavcopts vbitrate=1370:vcodec=mpeg4
for instance (Xvid).

$  lsb_release -a 2>/dev/null 
Distributor ID:	Ubuntu
Description:	Ubuntu 10.10
Release:	10.10
Codename:	maverick

Architecture is AMD64

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: mencoder 2:1.0~rc4~try1.dsfg1-1ubuntu1+medibuntu1
ProcVersionSignature: Ubuntu 2.6.35-24.42-generic 2.6.35.8
Uname: Linux 2.6.35-24-generic x86_64
Architecture: amd64
CrashDB: medibuntu
Date: Sat Dec 25 19:33:56 2010
InstallationMedia: Xubuntu 10.04 "Lucid Lynx" - Release amd64 (20100429)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
SourcePackage: mplayer

** Affects: medibuntu
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug maverick

-- 
You received this bug notification because you are a member of Medibuntu
Packaging Team, which is the registrant for Medibuntu.
https://bugs.launchpad.net/bugs/694333

Title:
  mencoder ignores bitrate parameter when encoding H.264 video



Follow ups

References