Hi! I have some MP3 audio material which is basically speech with some background noises, essentially > 120Hz and < 5kHz. I had the idea to reduce the file size by recoding the material to Opus at 56kbps. Unfortunately the result is a file sampled at 48kHz much larger than the original. I hope you agree that it does not make sense to create a file larger than the original (MP3). Of course the encoder sees just WAV (RAW) with possible MP3 decoding artefacts, but anyway: Is there a way to handle this? Maybe applying a low-pass filter before sending to Opus? And why is the 48kHz selected, and why does opus have so few sampling rates (nothing between 24kHz and 48kHz)? The frequency steps for bandwidth are: 4kHz, 4kHz, 8kHz, 24kHz (40kHz in total) With 4,8,12,16 you'd have sample rates 8kHz, 12kHz, 20kHz, 32kHz, 48kHz. Still I'd miss 44.1kHz, though Regards, Ulrich
Hi Ulrich, I assume you've been using opusenc to encode the files. If that is the case you can try giving the encoder some more hints about your files: opusenc --speech --set-ctl-int 4008=1103 ... The latter should tell the encoder that the signal bandwidth is 8kHz (OPUS_SET_BANDWIDTH). See opus_defines.h for all valid numbers. You can also experiment with the complexity settings. -Mathias
Ulrich Windl (12019-10-30):> Unfortunately the result is a file sampled at 48kHzThink of it this way: sample rate is the equivalent for sound of resolution for images. In that case, Opus is a vectorial format. Vectorial formats have no resolution, but you have to choose one when rasterizing them to display them.> much larger than the original.What was the bitrate of the original? Regards, -- Nicolas George -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.xiph.org/pipermail/opus/attachments/20191030/2fcbb410/attachment.sig>
Hi! Useful advice, thanks! Actually I had been using foobar2000 to recode, because it just makes it so easy to convert multiple files while keeping the metadata (I confess, I'm a "tagger"). But it's easy to miss some encoder option when being presented some default suggestions in a dialog form... Apart form that I always had the impression that Opus could be quite smart detecting what the input material is like, especially when I request such a low bitrate, it "could at least TRY speech". Can you explain the effect of --set-ctl-int a bit more than the manual does?: --set-ctl-int x=y Pass the encoder control x with value y (advanced). Preface with s: to direct the ctl to multistream s This may be used multiple times Regards, Ulrich>>> Mathias Buhr <napcode at apparatus.de> schrieb am 30.10.2019 um 14:32 in Nachricht<e7036001-c147-c4d0-550c-330331b76f5c at apparatus.de>:> Hi Ulrich, > > I assume you've been using opusenc to encode the files. If that is the > case you can try giving the encoder some more hints about your files: > > opusenc --speech --set-ctl-int 4008=1103 ... > > The latter should tell the encoder that the signal bandwidth is 8kHz > (OPUS_SET_BANDWIDTH). See opus_defines.h for all valid numbers. You can > also experiment with the complexity settings. > > -Mathias > > _______________________________________________ > opus mailing list > opus at xiph.org > http://lists.xiph.org/mailman/listinfo/opus
Hi! So here is what I got with different encoder settings; still not sure what the "best" setting is. 6kbps seems to add distortions, so I tried 12kbps. MP3-Original: LAME 3.99r, 120kbps, 44100Hz, Stereo, VBR V5 (22:23, 19.8MB) Opus (--raw-rate 44100 --bitrate 56 --vbr --comp 5): (44:45?, 23.4MB): Broken Opus (--bitrate 56 --vbr --comp 5 --ignorelength - %d): (22:23, 12.1 MB, 74kbps) Opus (--bitrate 6 --vbr --comp 10 --ignorelength - %d): (1MB, 6kbps) Opus (--speech --set-ctl-int 4008=1103 --bitrate 56 --vbr --comp 5 --ignorelength - %d): (22:23, 9.3 MB, 74kbps) Opus (--speech --set-ctl-int 4008=1103 --bitrate 6 --vbr --comp 5 --ignorelength - %d): (22:23, 1.1 MB, 74kbps) Opus (--bitrate 12 --vbr --comp 5 --ignorelength - %d): (2.1MB, 13kbps) Regards, Ulrich>>> Mathias Buhr 30.10.2019, 14:39 >>>Hi Ulrich, I assume you've been using opusenc to encode the files. If that is the case you can try giving the encoder some more hints about your files: opusenc --speech --set-ctl-int 4008=1103 ... The latter should tell the encoder that the signal bandwidth is 8kHz (OPUS_SET_BANDWIDTH). See opus_defines.h for all valid numbers. You can also experiment with the complexity settings. -Mathias _______________________________________________ opus mailing list opus at xiph.org http://lists.xiph.org/mailman/listinfo/opus
On 2019-10-30, Ulrich Windl wrote:> I have some MP3 audio material which is basically speech with some > background noises, essentially > 120Hz and < 5kHz. I had the idea to > reduce the file size by recoding the material to Opus at 56kbps. > Unfortunately the result is a file sampled at 48kHz much larger than > the original.At the risk of sounding blunt...just don't do it? In general perceptual compression like MP3, Vorbis or AAC are better reserved for final delivery, and are to be avoided in any repeated application. If you once chose to compress that way, you really shouldn't reapply the process, but rather start with a lossless original/master. Otherwise it's well known you could end up with a recording which is 1) higher rate, and at the same time 2) of lower quality. -- Sampo Syreeni, aka decoy - decoy at iki.fi, http://decoy.iki.fi/front +358-40-3751464, 025E D175 ABE5 027C 9494 EEB0 E090 8BA9 0509 85C2