-
Notifications
You must be signed in to change notification settings - Fork 380
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
[question] Playing MP3 and MP4 from InputStream, is it possible? #603
Comments
You can use a custom |
@brianwernick Thanks for looking into the issue. The file sizes are small, MP3s are under 10KB, and MP4s under 100KB. I think LZ4 streams are not seekable, I read somewhere they have a predefined block size, and compress each block separately but can't tell for sure if that information is stored somewhere after compression. Nevertheless, last night I managed to play the MP3s using JLayer on-the-fly (without storing the the file on disk). Playing audio like that added a few milliseconds of delay to the playback compared to raw PCM from a WAV file, but that's ok, the delay is barely noticeable. I'm not into the details of how the MP4 data is stored into the file, but my guess is that since MP4 plays over a stream on the Internet, maybe I could use some similar approach to play those files from an InputStream, and cover both use cases (MP3 and MP4) with the same library. |
There is a code to play from (unencrypted) |
@isabsent thanks, it's very much appreciated. |
@rraallvv: I am going to place the demo project with this stuff on Github soon. |
I've been trying to play an InputStream on Android but it seems there isn't a simple way to do that. The files are compressed and encrypted using LZ4 and AES, so the idea is to get the stream of data without saving the decompressed files to the files system. Does ExoMedia have a way to do that? Thanks.
Keep up the good work!
The text was updated successfully, but these errors were encountered: