Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for FLAC & Opus in ISO-BMFF/MP4 for MPEG DASH playback #4883

Closed
ronak2121 opened this issue Sep 27, 2018 · 6 comments
Closed

Support for FLAC & Opus in ISO-BMFF/MP4 for MPEG DASH playback #4883

ronak2121 opened this issue Sep 27, 2018 · 6 comments
Assignees

Comments

@ronak2121
Copy link

ronak2121 commented Sep 27, 2018

We tried out using Exoplayer 2.8.4 to play streams created from Ffmpeg's experimental support for storing FLAC & Opus audio in an ISO-BMFF container using MPEG DASH.

From the sample Exoplayer app, it looked like Exoplayer was able to parse the container, but it wasn't able to actually play the audio that was inside.

We tried this out in the Android Emulator.

If you need a test stream, you can use:

FLAC: https://d1v9in513d8d86.cloudfront.net/flac_opus-tests/flac_output.mpd
Opus: https://d1v9in513d8d86.cloudfront.net/flac_opus-tests/opus_output.mpd

@pedronveloso
Copy link

+1

@erdemguven erdemguven self-assigned this Oct 1, 2018
@ojw28
Copy link
Contributor

ojw28 commented Nov 5, 2018

@ronak2121 - I don't think the links you've provided work any more (or they're geo-restricted). Could you take a look? Thanks.

@ronak2121
Copy link
Author

Apologies, I've updated the above links.

@ojw28 ojw28 assigned ojw28 and unassigned erdemguven Nov 16, 2018
@ojw28
Copy link
Contributor

ojw28 commented Nov 16, 2018

There are few things missing:

For FLAC:

  1. We don't handle codecs="fLaC" in the DASH manifest
  2. We don't handle the fLaC atom in the MP4 container

For Opus:

  1. We don't handle the Opus or dOps atoms in the MP4 container

Adding in support for these is pretty easy, and gets both streams working. Note that for the streams to work, you either need a device that has platform decoders for FLAC/Opus, or you need to be using the ExoPlayer extensions that bundle them. A platform Opus decoder has been required from Android Lollipop. I think a standalone FLAC decoder has only been bundled in the platform as of relatively recently (Android's supported formats page is a bit misleading on this point, since although support has been around for a while, it was not in the form of a standalone decoder as ExoPlayer requires). I tested on a Galaxy S8, which has platform decoders for both.

I can look at cleaning up the test changes I made and getting them submitted. My question before doing that would be: To what extent is carrying Opus and FLAC in MP4 actually standardized? And to what extent is the choice of codecs value for FLAC in the DASH manifest standardized? The status of these two efforts seemed somewhat unclear from my very brief search.

ojw28 added a commit that referenced this issue Nov 22, 2018
Issue: #4883

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222392621
@ojw28
Copy link
Contributor

ojw28 commented Nov 22, 2018

Support added in the change above. Note that the underlying decoders still need to be present, as described in my response above.

@ojw28 ojw28 closed this as completed Nov 22, 2018
@ronak2121
Copy link
Author

ronak2121 commented Nov 22, 2018

ojw28 added a commit that referenced this issue Nov 28, 2018
Issue: #4883

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=222392621
@google google locked and limited conversation to collaborators May 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants