anthumchris

Results 29 comments of anthumchris

Good point...I've been living in `libopusfile` land which always outputs 48k and forgot about the other sample rates. I wrote the sample output for some internal testing I'm doing, but...

I haven't been able to determine what [MSE bytestreams](https://w3c.github.io/media-source/byte-stream-format-registry.html) Safari supports. I probed with: ```js console.log([ MediaSource.isTypeSupported('audio/webm; codecs="opus"'), MediaSource.isTypeSupported('audio/mp4; codecs="opus"'), MediaSource.isTypeSupported('audio/mp2t; codecs="opus"'), MediaSource.isTypeSupported('audio/mpeg; codecs="opus"'), MediaSource.isTypeSupported('audio/aac; codecs="opus"') ]) ```

Yes, `OpusStreamDecoder`'s underlying `libopusfile` library requires the beginning of the file to discover and instantiate an `OggOpusFile` with [`og_open_*`](https://opus-codec.org/docs/opusfile_api-0.7/group__stream__open__close.html) functions. Specifically, the header pages and the first audio data page...

To clarify above, `libopusfile` requires the header pages and _any_ complete audio data page. The test below skips the first page and decodes an Opus file with headers and audio...

@zandaqo [`libopusfile.op_test()`](https://mf4.xiph.org/jenkins/view/opus/job/opusfile-unix/ws/doc/html/group__stream__open__close.html#ga54158ed1570a0062cb674115cd3699ab) could test 0-57 range chunk as a valid Opus file, but I didn't see functions in `libopusfile` would actually return the bytes of the parsed headers. `libogg` may...

I decided against dynamically allocating a buffer for the entire Opus file size. It's wasteful and doesn't scale for large Opus files (e.g. a 3-hour SoundCloud DJ mix hundreds of...

@zandaqo 2 initialization range requests: fetch header pages, fetch last page (to calculate duration). File size would be implicitly obtained via response headers. Your idea is a good one and...

This feature is currently being developed in branch [http-opus-seek](https://github.com/AnthumChris/opus-stream-decoder/tree/http-opus-seek) and [test-seekable-opus-stream-decoder.html](https://github.com/AnthumChris/opus-stream-decoder/blob/http-opus-seek/dist/test-seekable-opus-stream-decoder.html) is a successful test file. The duration seeking (finding last `OggS` page byte sequence from end of file) is...

If the stream is an Ogg Opus byte stream it should work. I think the internal `opusfile` lib requires the Ogg header page to be appended first. I haven't tried...

Yes, it does client-side decoding. Happy to help, feel free to email me directly and I can make some time.