marl / marl/pysox

There is no way to create 320 kbps mp3

Open
#171 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
540
Forks
83
PR merge metrics
No merged PRs in 30d

Description

Thanks for Pysox , its very useful indeed :)

I want my application to be able to create 320kbps MP3 files which is something sox can do but with this library there is no way to control the output bandwidth. I can understand this back when Sox was developed we thought 128kpbs was ok and now we know better, unfortunately it will default to 128kbps and this library will not override that default.

Sox needs to receive a -C 320 command line option before the output filename , the only option close to this is in the builder with extra args but these are only after the file name so they wont work for this.

I am using sox because of its wide support for multiple formats and its format detection , it would be great if i could signal that i want the highest quality output as general flag which could be applied to multiple different formats , but for now the noticable one is mp3 being only 128kbps.

i have tried all sorts of disgusting things like putting a shell script handler in front of sox to intelligently insert the -C 320kpbs option.

Lame has the concept of "Encoding engine quality" which allows 3 choices: fast, standard or high. it would be great if pysox could do something like this as an option for the Transformer.set_output_format() method. These levels could then be mapped to some configs for each format.

There is a reasonable case for in 2026 the default rate for MP3 encoding to be 320kbps even if the wider quality settings don't happen.

I have a good environment to test this and could contribute to the development to get this going with a bit of help.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting Transformer.set_output_format and the builder's extra-argument handling, then check how pysox orders options relative to the output filename. Confirm how Sox accepts -C 320 and decide whether the change should cover MP3 only or expose a broader output-quality setting; done means producing an MP3 at the requested bitrate without breaking existing format handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
audio-video-rtc
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.