After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 593466 - bitrate setting is ignored during render
bitrate setting is ignored during render
Status: RESOLVED OBSOLETE
Product: pitivi
Classification: Other
Component: Rendering
Git
Other Linux
: Normal major
: 0.95
Assigned To: Mathieu Duponchelle
Pitivi maintainers
Depends on: 118142 709536
Blocks:
 
 
Reported: 2009-08-29 03:25 UTC by Jean-François Fortin Tam
Modified: 2015-10-20 13:05 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jean-François Fortin Tam 2009-08-29 03:25:38 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.)
Comment 1 Jean-François Fortin Tam 2010-09-19 01:34:39 UTC
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)
Comment 2 Jean-François Fortin Tam 2010-09-26 03:20:34 UTC
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).
Comment 3 kxra 2010-12-04 03:28:28 UTC
This affects me as well, happy to help with testing if someone needs help.
Comment 4 Jean-François Fortin Tam 2010-12-04 18:03:29 UTC
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
Comment 5 Jean-François Fortin Tam 2010-12-04 18:16:05 UTC
Forgot one for x264enc:

7,3M Dragons Dream-cbr500.mp4
Comment 6 Jean-François Fortin Tam 2011-09-12 16:50:49 UTC
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.
Comment 7 Jean-François Fortin Tam 2011-09-23 19:30:58 UTC
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.
Comment 8 Mathieu Duponchelle 2013-09-22 22:20:00 UTC
Could you please test again in 2013 ? :)
Comment 9 Alex Băluț 2014-01-17 14:07:35 UTC
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.
Comment 10 John Leach 2014-05-04 10:58:58 UTC
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 11 Jean-François Fortin Tam 2014-08-19 17:54:07 UTC
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...
Comment 12 w2gw9kqd7h 2014-08-20 18:36:52 UTC
 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.
Comment 13 w2gw9kqd7h 2014-08-20 18:45:27 UTC
Tried with .mkv container and Theora. Short clip with default quality 48 and then again with quality 18. 
Both provided same size output.
Comment 14 w2gw9kqd7h 2014-08-20 19:10:33 UTC
tried with vp8. Target bitrate 256000 and target bitrate 512000. Both provided same size output file
Comment 15 Alex Băluț 2015-05-25 23:30:08 UTC
Works fine, tested with x264 and default/max bitrates.
Comment 16 Thibault Saunier 2015-10-20 13:05:07 UTC
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.