sox --help-format mp3 says "Writes:" (nothing) #628

Open
opened 2025-09-25 00:56:02 +00:00 by martinwguy · 0 comments
martinwguy commented 2025-09-25 00:56:02 +00:00 (Migrated from codeberg.org)

sox --help-format mp3 says "Writes:" (nothing)

Description

$ sox --help-format mp3
Format: mp3
Description: MPEG Layer 2/3 lossy audio compression
Also handles: mp2 audio/mpeg
Sample-rate restricted to: 8000 11025 12000 16000 22050 24000 32000 44100 48000
Reads: yes
Writes:

Analysis

It should pick the writable encoding(s) for SOX_FORMAT_MP3 from
formats.c:s_sox_encodings_info[].

src/mp3.c does include in its sox_format_handler_t

 static unsigned const write_encodings[] = {
    SOX_ENCODING_MP3, 0, 0};

In fact, it should probably say whether it can write MP2 or MP3 in CBR, ABR or VBR.

Come to that, format_handlers should also say which encodings they can read instead of just "yes".

# sox --help-format mp3 says "Writes:" (nothing) ## Description ``` $ sox --help-format mp3 Format: mp3 Description: MPEG Layer 2/3 lossy audio compression Also handles: mp2 audio/mpeg Sample-rate restricted to: 8000 11025 12000 16000 22050 24000 32000 44100 48000 Reads: yes Writes: ``` ## Analysis It should pick the writable encoding(s) for `SOX_FORMAT_MP3` from `formats.c:s_sox_encodings_info[]`. `src/mp3.c` does include in its `sox_format_handler_t` ``` static unsigned const write_encodings[] = { SOX_ENCODING_MP3, 0, 0}; ``` In fact, it should probably say whether it can write MP2 or MP3 in CBR, ABR or VBR. Come to that, format_handlers should also say which encodings they can read instead of just "yes".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
martinwguy/sox_ng#628
No description provided.