GNOME Bugzilla – Bug 593466
bitrate setting is ignored during render
Last modified: 2015-10-20 13:05:07 UTC
Don't know if this only affects theora (the only codec I tried), but you can only set the encoding quality through the "quality" setting. You can't set the bitrate instead, it gets ignored. To test: render a video with three different theora bitrate settings: 500 kbps, 1000 kbps, 1500 kbps, and the end results are identical: exact same quality, with the exact same filesize (down to the byte!). Of course, I guess, this is all one of the symptoms of issues raised in bug #585712, but I'm still stuck with not being able to use bitrate-based encoding, which sucks a lot, because I wanted to compare Theora 1.0 to the much touted Theora "Thusnelda" 1.1. (I tried setting the "quality" value to 0, thinking it would make it "ignore" that and use my specified bitrate instead. Nope.)
Same thing happening today with VP8, so not theora-specific. To reproduce: 1. Set the "Mode" to "Constant Bit Rate (CBR) mode" 2. put any value in the "Bit rate" field (ex: 500) 3. render 4. notice the terrible quality and remember the filesize 5. change the Bit rate setting to 4000 6. render 7. notice the quality is still the same, and notice the filesize is almost exactly the same (maybe a few kilobytes of difference)
Possibly caused by bug #603070 (but my testing so far has not been able to confirm that; the VP8 encoder seems to suffer from this even if you specify that it is only one pass).
This affects me as well, happy to help with testing if someone needs help.
Okay, I figured out what's wrong. Let's compare theora, vp8, x264enc: THEORA (1.1.1) ============== - no combobox to switch between a bitrate (CBR) mode and a "quality" (VBR) mode - setting the bitrate will work *ONLY* if you DON'T TOUCH the quality setting - if you change the quality setting, it will take precedence/priority over anything else Summary: works if you don't touch the "quality" setting. X264ENC (0.98.1653+git88b90d9 ============================= - has a combobox to select between constant "bitrate" (CBR), "quantizer", "quality", etc. - there doesn't seem to be a "Quality" setting slider, only a Quantizer one - the "Quantizer" setting slider works in the inverse way compared to a quality setting: a higher quantizer = lower quality, lower quantizer = higher quality. - changing the quantizer, when in CBR mode, doesn't override the bitrate setting Summary: this one seems to work properly. VP8 (0.9.2) =========== - has a combobox to select between CBR (quality) and VBR modes - in CBR (bitrate) mode: --- changing the bitrate setting doesn't work (tried 2000 and 500), it renders to the same filesize no matter what --- changing the quality setting on top of the bitrate setting doesn't work either, same filesize (so not exactly the same problem as theora) - in VBR (quality) mode: -- the quality setting works (different filesize at 1 than 3) Summary: CBR doesn't work at all, VBR does. Proof/comparisons for everything above: --------------------------------------- jeff@kusanagi:~$ ls -shX |grep Dragon # X264ENC 25M Dragons Dream-cbr2000.mp4 25M Dragons Dream-cbr2000-quant_modified.mp4 45M Dragons Dream-quant19.mp4 4,0M Dragons Dream-quant41.mp4 2,7M Dragons Dream-quant50.mp4 133M Dragons Dream-quant8.mp4 # Theora 26M Dragons Dream-cbr2000.ogv 8,7M Dragons Dream-cbr600.ogv # VP8 1,9M Dragons Dream-cbr2000.webm 1,9M Dragons Dream-cbr500-quality1.webm 1,9M Dragons Dream-cbr500.webm 2,4M Dragons Dream-vbr-quality1.webm 3,2M Dragons Dream-vbr-quality3.webm 5,0M Dragons Dream-vbr-quality5.webm
Forgot one for x264enc: 7,3M Dragons Dream-cbr500.mp4
Talking with Monty, it seems like Theora can work in three modes: - Bitrate only - Quality (quantizer) only - Bitrate *and* quality; as I understand it, in this mode, it would use the given bitrate as a target while using the quality as a "minimum". If the bitrate drops too low, it would use the quantizer. So gstreamer would need to expose a property for choosing the encoding mode for theora, and then respect this.
From what I've been told, libvpx doesn't have a cbr mode yet (supposedly being worked on)... Kind-of "NOTOURBUG", though this touches upon gstreamer bug 118142 for the theora scenario.
Could you please test again in 2013 ? :)
Seems to work fine now, the "New Project 4096.ogv" file I rendered with bitrate 4096 is much larger than "New Project 512.ogv" rendered with bitrate 512: 15,798,228 vs 2,282,116. Both rendered with Theora.
Still broken for me on Ubuntu Trusty, Pitivi 0.93-3. I've found no way at all to alter the bitrate or quality. No matter what I do, the X264ENC encoder always renders a 2048 bitrate (tried some of the above workarounds too). The vp8/vp9 is harder to experiment with as it was taking over an hour to render a 1 minute video.
Comment 10 seems to indicate this is still an issue, and someone else reported the same problem on IRC today. John, if you have time to check with VP8 with a short (10 secs?) video and see if it differs from x264 in that regard, that'd be helpful. As for Theora, alleb's comment #9 seems to indicate that it works, but that was a while ago anyway...
I tried 4 cases. 1) .mkv, x264, vorbis audio, constant quantizer. video length 16:29 minutes, 720p @50fps. Result 255Mb file. 2) changed to constant bit rate, set it to 5192kbs. end result was same size file. 3) changed to .mp4 container, constant quality. Result same size file. 4) changed to....constant quantizer (but different value than in previous 3), still same size file.
Tried with .mkv container and Theora. Short clip with default quality 48 and then again with quality 18. Both provided same size output.
tried with vp8. Target bitrate 256000 and target bitrate 512000. Both provided same size output file
Works fine, tested with x264 and default/max bitrates.
This bug has been migrated to https://phabricator.freedesktop.org/T2339. Please use the Phabricator interface to report further bugs by creating a task and associating it with Project: Pitivi. See http://wiki.pitivi.org/wiki/Bug_reporting for details.