Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify bitrate or something like profile in VPx encoders used in Boombox #939

Open
FelonEkonom opened this issue Feb 5, 2025 · 3 comments
Assignees

Comments

@FelonEkonom
Copy link
Member

No description provided.

@FelonEkonom FelonEkonom changed the title [Boombox] Specify bitrate/sth like profile in VPx encoder Specify bitrate or something like profile in VPx encoders used in Boombox Feb 5, 2025
@FelonEkonom FelonEkonom moved this to Todo in Smackore Feb 5, 2025
@varsill varsill self-assigned this Feb 14, 2025
@varsill varsill moved this from Todo to In Progress in Smackore Feb 14, 2025
@varsill
Copy link
Contributor

varsill commented Feb 14, 2025

It turns out that the option with the biggest impact on the VP9 encoding speed is the -deadline realtime option. It heavily elevates the bitrate (or decreases quality if bitrate is forced).
It turns out that the vpx encoder doesn't use more than 4 CPU threads (even when thread options is passed).
Other option that can be used to improve perfromance is -speed but it doesn't affect the performance that much.
With -deadline realtime option and -speed 16 I was able to achieve x8 realtime encoding speed with bitrate around ~1500kb/s.

On contrary, the H264 encoder with -preset fast options was able to achieve x25 realtime encoding speed with ~500kb/s bitrate, but it was using ~10 CPU cores.

@FelonEkonom
Copy link
Member Author

Moreover, H264 encoder with -preset ultrafast was able to reach x55 reatlime encoding speed, but with worse bitrate

@varsill
Copy link
Contributor

varsill commented Feb 26, 2025

We decided to:

  1. Allow users to specify the following options in the VPX encoders: g_threads, used_cpu and set them by default to default values provided by libvpx
  2. Update encoders used in membrane_transcoder_plugin so that they specify the before-mentioned options to realtime use cases
  3. Use updated membrane_transcoder_plugin in Boombox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

No branches or pull requests

2 participants