Skip to content

[HELP] Play raw Opus frames from websocket stream #24

Closed

Description

@Wyctus

Hey, thanks for the great library, I'm really pleased with it!
I would like to ask for help related to these questions:

I'm streaming from my server raw Opus frames, without OGG or CAF container. Since iOS uses CAF instead of the standard OGG container, I'm trying to play the raw frames, so maybe somehow both of them can play my stream. But if necessary I can encapsulate it in a container.
Is it possible to play raw Opus? Or somehow play CAF/Opus on Android maybe?

My app receives audio data periodically through the websocket. I would like to redirect this audio stream to the player so it can play it continously. Is it somehow possible?

Thank you very much in advance!

Activity

  1. added
    help wanted
    on Aug 4, 2020
  2. bsutton commented on Aug 6, 2020

    @bsutton
    Owner

    The short answer is I don't know.
    At this point I'm not looking to support additional codecs directly within the project.

    The idea is that we will only support the codecs that android/ios support natively.
    I've done some VERY preliminary work on a sister project 'sounds_codecs' which is intended to provide support for a additional codecs.

  3. Wyctus commented on Aug 6, 2020

    @Wyctus
    Author
  4. bsutton commented on Aug 6, 2020

    @bsutton
    Owner
  5. Wyctus commented on Aug 6, 2020

    @Wyctus
    Author

    Buffer support sounds great!
    Could you please show me a basic example? I can't find it anywhere.

    Thanks!

  6. bsutton commented on Aug 8, 2020

    @bsutton
    Owner

    Its covered in the doco for Track.

    Uint8List buffer = ....
    // Load a local audio file and get it as a buffer
    Uint8List buffer = (await rootBundle.load('assets/samples/audio.mp3'))
    .buffer
    .asUint8List();

    Track.fromBuffer(buffer)
    QuickPlay.fromTrack(track, volume: 1.0);

  7. Wyctus commented on Aug 8, 2020

    @Wyctus
    Author

    Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions