Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: IETF Opus codec now ready for testing (Read 442458 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

IETF Opus codec now ready for testing

Reply #25
Can we have some updates about OPUS? there isn't much info on the opus-code.org page. In fact, it seems pretty stagnant. Maybe on a technology readiness level or something?

The last thing I've seen was the presentation about OPUS. I was looking through the IETF website (some links seem dead from the tread post), but even there seems to be close to no changes.

The only sign of changes and therefore activity, was the change date of this document: http://datatracker.ietf.org/doc/draft-ietf-codec-opus/
On the history table ( http://datatracker.ietf.org/doc/draft-ietf...c-opus/history/ ) it seems, the codec is somewhat in an idle state, waiting for approval from other departments.

The reason why I'm asking about updates, is because there is very little discussions going on about using OPUS being used as archiving codec. I know the codec is designed to be an interactive codec, for VoIP and the likes, but the presentation that I've been watching, suggested that it is also very capable of creating transparent results at lower bitrates than Vorbis is even AAC. So, does OPUS make sense as archiving codec for music collections? I haven't found any documents discussing this.


I think the main developers are focused on getting it published by the IETF so it's all about getting the spec documentation polished up. But because they are at that stage I also believe this means the decoder is 99.9% done and isn't going to change.

The encoder on the other hand, is designed to be improvable even after the decoder is fixed, so I'd guess you might soon see further improvements around the time the spec gets publicised as "done", either because of renewed external interest or because the main developers have more time to work on that side of things.

But I'd guess, at least at first, they'll be aiming for the areas where Opus is fairly unique and has big advantages and building on that, rather than spending time taking on MP3 and AAC on their home turf. I'd guess any improvement in that domain will most likely be a by-product of other work.

IETF Opus codec now ready for testing

Reply #26
Yes, encoder has a big room for improvements.
Some ABC/HR results  for experimental branch (exp4) at 64 kbps http://git.xiph.org/?p=opus.git;a=shortlog.../heads/exp_wip4

CELT 0.11.2 - 3.08
exp4 (20120503) - 3.22



Code: [Select]
CELT_0.11.2   exp4
2,0          3,2
1,1          3,0
4,7          3,7
3,8          2,8
3,4          3,2
2,7          2,8
3,4          4,0
2,5          4,5
2,9          4,0
3,7          3,7
2,3          3,2
3,5          2,8
3,0          2,7
3,3          3,0
4,3          4,0
3,3          2,5
1,5          3,2
3,0          3,2
2,7          3,0
3,4          3,0
4,0          3,8
3,6          2,8
3,6          2,7
4,0          2,8
3,0          3,0
1,0          2,7
3,5          3,5
2,0          3,7
3,2          2,7
4,0          3,4
Mean
3,08       3,22

IETF Opus codec now ready for testing

Reply #27
Indivisual/Average bitrates would have been great so we can have the full picture.

IETF Opus codec now ready for testing

Reply #28
Bitrate calibration was done on 45 tracks of different musical genres.
Encoder - Settings - Average bitrate:
CELT 0.11.2 - complexity 10, VBR 67.5 kbps  -  66.3 kbps
Exp4  - complexity 10, VBR 61 kbps - 66.7 kbps


Average bitrate on tested samples:
CELT 0.11.2 - 66.6 kbps
exp4 - 66.9 kbps


All 30 tested original samples were concatenated into one file and resampled by SSRC resampler with highest quality settings (Ultra mode)  44.1 kHz -> 48 kHz.  Then these files (48 kHz) were encoded by tested encoders.
If You want to reproduce an individial bitrates You can get original files from here http://www.hydrogenaudio.org/forums/index....st&p=749742

IETF Opus codec now ready for testing

Reply #29
Thanks.

IETF Opus codec now ready for testing

Reply #30
Can we have some updates about OPUS? there isn't much info on the opus-code.org page. In fact, it seems pretty stagnant. Maybe on a technology readiness level or something?
The last thing I've seen was the presentation about OPUS. I was looking through the IETF website (some links seem dead from the tread post), but even there seems to be close to no changes.
[...]
The reason why I'm asking about updates, is because there is very little discussions going on about using OPUS being used as archiving codec. I know the codec is designed to be an interactive codec, for VoIP and the likes, but the presentation that I've been watching, suggested that it is also very capable of creating transparent results at lower bitrates than Vorbis is even AAC. So, does OPUS make sense as archiving codec for music collections? I haven't found any documents discussing this.


First—  You're aware of http://opus-codec.org/  Right? 

You're correct that the main focus right now is on getting the standard published, so most commits are related to that.

There is an experimental branch with some pretty substantial (see posts above by IgorC) encoder perceptual enhancements— mostly serving the purpose of actually taking advantage of VBR... but other than fixing some regressions not a lot has happened with it lately.  Right now the Xiph team is splitting resources between Opus and our new video codec work... and just shepherding the format through the IETF is itself a lot of work.

That said— file based usage is absolutely a priority for the time of the 1.0 release (which will happen along with publication of the standard).  I've been spending time getting opus-tools,  a set of simple command-line tools for encoding/decoding Opus in fixed files, ready for an initial official release— hopefully this coming weekend.  I would _really_ appreciate testing and feedback, and if people need windows binaries made for testing, please let me know and I'd be glad to build some.

And the biggest news on this front is that we have support in Firefox, in the audio tag.  It's only in the 'nightly' versions now and is preferences off and has a couple bugs, but it generally works great.  This means that fairly rapidly after Opus' release the files will be playable on a significant fraction of desktop PCs— the browser is not exactly an ideal audio-player but compatibility is important..

There are a lot of things that need to be done (this list is far from inclusive) for the big 1.0 release, and if Opus interests you please come lend a hand (the easiest way to join in is via the IRC channel that you can reach through the Opus website).

IETF Opus codec now ready for testing

Reply #31
For any Windows users who are waiting on binaries to play around with Opus, I've prepared a binary build of opus-tools.
Feedback would be greatly appreciated.  (I'm interested in if "opusdec.exe file.opus"  plays audio on real windows systems, or if it only works in wine). I especially want to hear any bug reports or critical missing features.

https://people.xiph.org/~greg/opus-tools.zip

As we approach the official release I'll get automated builds setup for opus and the exp4 tuning branches.

If anyone is interested in building a GUI oggdrop style tool for encoding Opus, perhaps just a GUI front end on opusenc, I think it would be very useful to people— if it's portable to *nix I'll help out (at least with review and testing), but I don't have the time free to drive the development myself.

IETF Opus codec now ready for testing

Reply #32
Plays audio on my Windows 7 system. Also decodes these Opus tracks I encoded back in January, using the exp_wip3 branch, but I guess nothing has been broken since then.

IETF Opus codec now ready for testing

Reply #33
Works on my Vista system, as well.

IETF Opus codec now ready for testing

Reply #34
Can someone explain how to use the command line decoder without Foobar? Atm I don't even know how to open the decoder properly in Windows...

Edit: Ok, got to work it right now.

IETF Opus codec now ready for testing

Reply #35
Works fine under WindowsXP SP3 32bit. However, i found 2 issues:

1) Channel order (multichannel files)
The channel order may be incorrect for multichannel files. Feeding the encoder WAVEFORMAT_PCM (no channelmask) and WAVEFORMAT_EXTENSIBLE (channelmask) makes no difference. I have no idea if this is an encoder or decoder issue, the .wav files were analyzed with Audacity/foobar2000.

Channelnumber - Source WAV - Opus->WAV
1 - FL - FL
2 - FR - FC
3 - FC - FR
4 - LFE - SL
5 - SL - SR
6 - SR - LFE

Example files: Source WAV / Opus / Decoded Opus->WAV / Six mono .wav files for custom testing

2) Piping audio
  • 'opusenc.exe' will crash when encoding from STDIN and the piped wav stream was created by ffmpeg. IIRC ffmpeg uses a value of 0 for the wav size header.
    Example: ffmpeg.exe -i "test.wav" -f wav -|opusenc.exe - "test_pipe_ffmpeg.opus"
    Solution: Most commandline encoder have an option to read to EOF and ignore the size header, this enables support for .wav files larger than 2/4 GB.
  • 'opusenc.exe' will print a lot of 'Skipping chunk...' messages and doesn't create a file if piped audio has more than 2 channels.
    Example: sox.exe "test.wav" -t wav - remix 0 1 0 1|opusenc.exe - "test_pipe_sox.opus"



IETF Opus codec now ready for testing

Reply #36
@dr. schanker
The Opus codec does not support multichannel audio, only mono and stereo ist supported.

IETF Opus codec now ready for testing

Reply #37
How can i get a compiled encoder of this codec:)?
Would really like to try it out, as if it´s from the vorbis ppl, i am quite excited of it:)

IETF Opus codec now ready for testing

Reply #38
@dr. schanker
The Opus codec does not support multichannel audio, only mono and stereo ist supported.

The encoder accepted the linked multichannel .wav just fine. It even checked the channelmask in another testfile (WAVEFORMAT_EXTENSIBLE .wav) and changed channelorder (SL/SR remapped to RL/RR). I understand that mono/stereo has a higher priority and may be more polished codewise, but wanted to point out the multichannel issues anyway.

IETF Opus codec now ready for testing

Reply #39
@dr. schanker
The Opus codec does not support multichannel audio, only mono and stereo ist supported.


Multichannel absolutely is supported. 

I'll take care of the encoder issues that Dr. schanker found— I'd hoped to avoid issues with wav reading by using the oggenc input code, and stdin does work and has been extensively tested— in the two channel case.    Edit:  Can you get me your test.wav, as well as the output of the ffmpeg pipe redirected to a file?  I'm unable to reproduce the issue piping from ffmpeg here. Works fine for me.

Opusdec's multichannel order absolutely is broken, known limitation at the moment. I was hoping someone to change the output in opusdec to use libao and so I didn't touch it— but that hasn't happened in time, as I really needed to get something in people's hands.  Thank you so much for the feedback.

How can i get a compiled encoder of this codec:)?
Would really like to try it out, as if it´s from the vorbis ppl, i am quite excited of it:)


It's linked above— https://people.xiph.org/~greg/opus-tools.zip

IETF Opus codec now ready for testing

Reply #40
Multichannel absolutely is supported.

Hmm. Ok. (But) I haven't seen a word about multichannel audio in the specification doc of Opus. Only mono and stereo are mentioned there.

IETF Opus codec now ready for testing

Reply #41
If anyone is interested in building a GUI oggdrop style tool for encoding Opus, perhaps just a GUI front end on opusenc, I think it would be very useful to people— if it's portable to *nix I'll help out (at least with review and testing), but I don't have the time free to drive the development myself.


As Firefox can encode Opus (at least I assume it will soon for WebRTC uses), and decode WAV (and Ogg), and supports drag and drop of files,  you might cover a fair bit of ground with a (relatively) simple Firefox extension (or even a webpage?). There's also the example of the Firefogg extension, but I think that includes ffmpeg  for decoding various formats which makes it a bit more ambitious.

Integrating Javascript decoders for FLAC and ALAC would also score extra cool points.

 

IETF Opus codec now ready for testing

Reply #42
The inputfile: "test_wav.7z" (5 MB)
The piped data: "test_piped_bin.7z" (5 MB)
I used the commandline: ffmpeg.exe -i "test.wav" -f wav - 1>"test_piped.bin"
As suspected, the difference between both is that the piped file has the value 0 for RIFF and Data chunksize.

Bonus content  :  the used ffmpeg binaries "ffmpeg-20120525-git-e02e58f-win32-static.7z" (16 MB) / a screenshot video "opusenc_crash_ffmpeg_pipe.mp4" (1 MB)

IETF Opus codec now ready for testing

Reply #43
The inputfile: "test_wav.7z" (5 MB)
The piped data: "test_piped_bin.7z" (5 MB)
I used the commandline: ffmpeg.exe -i "test.wav" -f wav - 1>"test_piped.bin"
As suspected, the difference between both is that the piped file has the value 0 for RIFF and Data chunksize.

Bonus content  :  the used ffmpeg binaries "ffmpeg-20120525-git-e02e58f-win32-static.7z" (16 MB) / a screenshot video "opusenc_crash_ffmpeg_pipe.mp4" (1 MB)


I take it if you type test_piped.bin | ./opueenc.exe - output.opus    that works okay for you?

The closest I can come to reproducing is running with
wine /tmp/bin/ffmpeg.exe -i "test.wav" -f wav -  | wine ./opusenc.exe - /dev/null
which results in opusenc sleeping forever on an fread().

May just be some kind of brokenness with pipes in windows that I'm clueless about.

IETF Opus codec now ready for testing

Reply #44
did som fast tests after finally getting it to work.
I tried using a Mono recording from a microphone, as -2 Q with ogg vorbis Autov, and 30 bitrate comp 10 on CELT.

I am sure this isn´t the way to test it, but anyway, the Autov version of ogg atleast, won pretty nice, and they both are pretty much the same file size:)

Just a quick test by a beginner, so not telling any facts on the codecs here.

IETF Opus codec now ready for testing

Reply #45
a rough test is done here:

test file: vocal only song ("20 - P-01s - Tooshi Douka - Vocal Version.flac")
target bitrate: 44100Hz 48kbps 2ch

convert to wav first (like the upper posts, I'm getting APPCRASH when piping from avconv to opusenc)
Code: [Select]
I:\>avconv -i 20.flac -f wav 20.wav
avconv version v0.8-1900-g0fcf301, Copyright (c) 2000-2012 the Libav developers
  built on May 31 2012 09:22:52 with gcc 4.6.2
Input #0, flac, from '20.flac':
  Duration: 00:01:03.42, start: 0.000000, bitrate: 718 kb/s
    Stream #0.0: Audio: flac, 44100 Hz, stereo, s16
Output #0, wav, to '20.wav':
    Stream #0.0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (ape -> pcm_s16le)
Press ctrl-c to stop encoding
packet size is not a multiple of 4. extra bytes at the end will be skipped.
size=   10938kB time=70.08 bitrate=1278.6kbits/s
video:0kB audio:10938kB global headers:0kB muxing overhead 0.000411%


Ogg Vorbis avTuV b6.02 at same bitrate for reference:
Code: [Select]
I:\>oggenc2 -b 48 20.wav
Opening with wav module: WAV file reader
        [ 99.7%] [ 0m00s remaining] \

Done encoding file "20.ogg"

        File length:  1m 03.0s
        Elapsed time: 0m 01.0s
        Rate:         63.4933
        Average bitrate: 38.4 kb/s


Opus (CELT) command line:
Code: [Select]
I:\>opusenc --music --bitrate 48 --framesize 60 20.wav 20.opus
Encoding using libopus 0.9.11-66-g64c2dd7 (audio)
-----------------------------------------------------
   Input: 44.1kHz 2 channels
  Output: 2 channels (2 coupled)
          60ms packets, 48kbit/sec VBR
Preskip: 356

Encoding complete
-----------------------------------------------------
    Encoded: 1 minute and 3.54 seconds
    Runtime: 2.563 seconds
             (24.8x realtime)
      Wrote: 357387 bytes, 1059 packets, 69 pages
    Bitrate: 44.4888kbit/s (without overhead)
Rate range: 1.06667kbit/s to 72.6667kbit/s
             (8 to 545 bytes per packet)
   Overhead: 1.13% (container+metadata)


When I play 20.opus with opusdec, I can hear some spark sound in the output.
And since there is no good equipment here, the vorbis reference is near transplant to me. 
Sorry for my English.

IETF Opus codec now ready for testing

Reply #46
Quote
I:\>opusenc --music --bitrate 48 --framesize 60 20.wav 20.opus


I might be wrong, but isn't the max framesize for CELT mode 20ms?

>20ms will be SILK mode I think.

IETF Opus codec now ready for testing

Reply #47
Quote
I:\>opusenc --music --bitrate 48 --framesize 60 20.wav 20.opus


I might be wrong, but isn't the max framesize for CELT mode 20ms?

>20ms will be SILK mode I think.

OK I retry with --framesize 20 then, but same spark sound appears in same position.

Code: [Select]
I:\>opusenc --music --bitrate 48 --framesize 20 20.wav 20.opus
Encoding using libopus 0.9.11-66-g64c2dd7 (audio)
-----------------------------------------------------
   Input: 44.1kHz 2 channels
  Output: 2 channels (2 coupled)
          20ms packets, 48kbit/sec VBR
Preskip: 356

Encoding complete
-----------------------------------------------------
    Encoded: 1 minute and 3.52 seconds
    Runtime: 3.266 seconds
             (19.45x realtime)
      Wrote: 357503 bytes, 3176 packets, 66 pages
    Bitrate: 44.3879kbit/s (without overhead)
Rate range: 1.2kbit/s to 81.2kbit/s
             (3 to 203 bytes per packet)
   Overhead: 1.42% (container+metadata)
Sorry for my English.

IETF Opus codec now ready for testing

Reply #48
Quote
did som fast tests after finally getting it to work.
I tried using a Mono recording from a microphone, as -2 Q with ogg vorbis Autov, and 30 bitrate comp 10 on CELT.

I am sure this isn´t the way to test it, but anyway, the Autov version of ogg atleast, won pretty nice, and they both are pretty much the same file size:)

Just a quick test by a beginner, so not telling any facts on the codecs here.


If it just was speech then you should try using --speech --framesize 60

IETF Opus codec now ready for testing

Reply #49
Quote
did som fast tests after finally getting it to work.
I tried using a Mono recording from a microphone, as -2 Q with ogg vorbis Autov, and 30 bitrate comp 10 on CELT.

I am sure this isn´t the way to test it, but anyway, the Autov version of ogg atleast, won pretty nice, and they both are pretty much the same file size:)

Just a quick test by a beginner, so not telling any facts on the codecs here.


If it just was speech then you should try using --speech --framesize 60



--speech doesn´t exist, and with framesize 60 it doesn´t encode.


Options:
--bitrate n        Encoding bit-rate in kbit/sec
--cbr              Use constant bitrate encoding
--comp n          Encoding complexity (0-10)
--framesize n      Frame size (Default: 960)
--noltp            Do not use long-term prediction
--independent      Encode frames independently (implies noltp)
--skeleton        Outputs ogg skeleton metadata (may cause incompatibilities)
--comment          Add the given string as an extra comment. This may be
                    used multiple times
--author          Author of this track
--title            Title for this track
-h, --help        This help
-v, --version      Version information
-V                Verbose mode (show bit-rate)
Raw input options:
--rate n          Sampling rate for raw input
--mono            Consider raw input as mono
--stereo          Consider raw input as stereo
--le              Raw input is little-endian
--be              Raw input is big-endian
--8bit            Raw input is 8-bit unsigned
--16bit            Raw input is 16-bit signed
Default raw PCM input is 48kHz, 16-bit, little-endian, stereo