You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble getting 32bit WAV audio files (sample provided below) to play using a regular ExtractorMediaSource. I always get an UnrecognizedInputFormatException with the "None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream." message.
I can play these audio files with a regular AudioTrack by specifying the AudioFormat as PCM_FLOAT per Android's developer reference, which suggests there is native support for the file on Android, however, I've had no such luck with ExoPlayer.
Additionally, I found ticket #1246 which confirms there is support for 16bit and 24bit WAV audio files, however I can't find anything about 32bit audio support and would like clarification on whether ExoPlayer supports it or not.
Reproduction steps
Just attempt to play the file using a regular ExtractorMediaSource. I have a project which showcases this issue at this location: https://github.com/Fireblend/exoTest
It contains an audiotrackApp module which showcases the file playing as expected with Audiotrack, and an exoApp module in which the failure to play the file with a regular ExtractorMediaSource is demonstrated.
To support extracting this file, we need to update WavExtractor to handle format 3 (float), outputting a track with PCM float encoding.
For playback of the float track, I'm currently adding support for 32-bit float output (similar to #2517), which can be used by setting a flag when using FfmpegAudioRenderer. We could add an equivalent flag to MediaCodecAudioRenderer to output PCM float directly.
Alternatively, we could update ResamplingAudioProcessor to convert 32-bit float to 16-bit integer PCM, which would be lossy but has the advantage that audio processors could still be applied to the input.
Issue description
I'm having trouble getting 32bit WAV audio files (sample provided below) to play using a regular ExtractorMediaSource. I always get an UnrecognizedInputFormatException with the "None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor) could read the stream." message.
I can play these audio files with a regular AudioTrack by specifying the AudioFormat as PCM_FLOAT per Android's developer reference, which suggests there is native support for the file on Android, however, I've had no such luck with ExoPlayer.
Additionally, I found ticket #1246 which confirms there is support for 16bit and 24bit WAV audio files, however I can't find anything about 32bit audio support and would like clarification on whether ExoPlayer supports it or not.
Reproduction steps
Just attempt to play the file using a regular ExtractorMediaSource. I have a project which showcases this issue at this location:
https://github.com/Fireblend/exoTest
It contains an audiotrackApp module which showcases the file playing as expected with Audiotrack, and an exoApp module in which the failure to play the file with a regular ExtractorMediaSource is demonstrated.
Link to test content
https://github.com/Fireblend/exoTest/raw/master/Exotest/exoApp/src/main/res/raw/th_oial_32_float_48khz.wav
Version of ExoPlayer being used
r2.1.1
Device(s) and version(s) of Android being used
Motorola X Play, Android 6.0
Nexus 5, Android 6.0
A full bug report captured from the device
I suspect this isn't needed, but I'm attaching one anyway.
bugreport.txt
Thanks in advance!
The text was updated successfully, but these errors were encountered: