Opus always encoded at 48 kHz?

Bug #2002018 reported by Jeff Fortin Tam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SoundConverter
New
Medium
GautierPortet

Bug Description

Running SoundConverter 4.0.3 on Fedora 37, converting some .wav files that Nautilus says are 44100 Hz (and Audacity says they are "stereo 44100Hz 32-bit float"), with SoundConverter set to not resample anything, SoundConverter's output when using the Opus encoder is always 48000 Hz (according to Nautilus' file properties dialog, and Audacity), whereas for other codecs (such as FLAC) it correctly remains at 44100 Hz.

It also happens if transcoding from 44.1 kHz FLAC files to Opus, the resulting Opus files are 48 kHz.

(I haven't tested encoding to MP3, AAC or Speex)

Jeff Fortin Tam (kiddo)
description: updated
Revision history for this message
sezanzeb (sezanzeb) wrote :

Hi. It seems this is a restriction of the opus format: https://en.wikipedia.org/wiki/Opus_(audio_format)#Bandwidth_and_sampling_rate

Revision history for this message
sezanzeb (sezanzeb) wrote (last edit ):

The available sample rates should probably be dynamic depending on the selected output format.

Currently they are hard-coded in liststore_resample in the soundconverter.glade file.

It would probably be possible to change the contents of the liststore in the on_output_mime_type_changed function.

Gtk.ListStore.remove and .insert could modify it. https://lazka.github.io/pgi-docs/#Gtk-3.0/classes/ListStore.html

Unfortunately quite a few other projects have higher priority for me right now, so I probably won't do the research of the possible sample rates for all the different formats, and the implementation, any time soon.

Revision history for this message
GautierPortet (kassoulet) wrote :

Hi. If the sample is fixed when converting to Opus, we could just disable the sample-rate selector when Opus is selected.

Does it sound right to you?

Or can just ignore the issue, as this is due to the format itself.

Changed in soundconverter:
importance: Undecided → Medium
assignee: nobody → GautierPortet (kassoulet)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.