Giter Site home page Giter Site logo

opus's People

Contributors

edaniels avatar egonelbre avatar pionbot avatar sean-der avatar stv0g avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

opus's Issues

Implement CELT

  • Implement the rawbits/reverse bitreader
  • Implement the other symbol reading methods
  • Implement the fixed maths routines (isqrt)
  • ...

Playback example module contains replace directive

go install github.com/pion/opus/examples/playback@latest

Running this command produces an error message:

go: github.com/pion/opus/examples/playback@latest (in github.com/pion/opus/examples/[email protected]):
	The go.mod file for the module providing named packages contains one or
	more replace directives. It must not contain directives that would cause
	it to be interpreted differently than if it were the main module.

Wasm based decode example

In a web worker , this would make it easy to build various apps that need sound

in a server , mobile iot desktop you can do the same with Wazero with no cgo also.

Encode too ?

Question: this is a decoder only ?

no plans to also encode ?

Is there a plan to support pcm->opus encoding?

Summary

If I understand correctly, pion opus only support decoding operations, is there any plan to support encoding operations in the future?

Motivation

I've written a streaming-WebRTC gateway app that can convert av streams from streaming devices to WebRTC via pion, but now there's a tricky problem, the audio encoding provided by these media devices is usually aac (or can be set to pcm, which is configurable on the device), I can't find a library that implements pcm -> opus in pure go, only some library based on c-go (like this one). The c-go based library has some limitations (e.g. it can't be self-contained), so it would be nice if pion opus supported pcm->opus.

Describe alternatives you've considered

.

Additional context

.

Opus packet parsing

  • Implement/use a bitstream reader
  • Implement/use a reverse bitstream reader
  • Implement the RangeCoder
  • Parse the packet information
  • Parse the opus compressed frame information

Range Decoder

Extract the ec_ctx from libopus and write tests against it. Write a Go idiomatic version that passes all the same tests

`ParseNextPage()` in oggreader.go does not handle OPUS packets that span multiple segments

Your environment.

  • Version: master

What did you do?

Decoding SILK OGG OPUS streams and some of them are changing from to CELT codec after some time and thus failing.

What did you expect?

Proper decoding of the of the whole SILK encoded stream

What happened?

oggreader returned error that CELT is not supported

Fix

The problem is in the loop that is reading the segments. It does not handle the case if the segment's length is 255, which means that the OPUS packet spans multiple segments

for _, s := range sizeBuffer {

Pseudo code of the correct loop can be found at https://gist.github.com/amishshah/68548e803c3208566e36e55fe1618e1c

Implementing something similar in my own, heavily modified oggreader, solved all the decoding problems.

Roadmap

This is a covering ticket for the Pion Opus roadmap. If you have any requests feel free to leave them here/vote on others.

0.0.1

  • SILK Decoder
  • CELT Decoder

0.0.2

  • SILK Encoder
  • CELT Encoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.