React-native-track-player: [Android] Can't play flac audio

Created on 23 Nov 2018  路  4Comments  路  Source: react-native-kit/react-native-track-player

after implement correctly your plugin, im tried to play .flac files, after that i gor rhis eror in AS

11-22 19:36:48.001 32513-608/com.fancyplayer E/ExoPlayerImplInternal: Source error.
    com.google.android.exoplayer2.source.UnrecognizedInputFormatException: None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor, AmrExtractor) could read the stream.
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:973)
        at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:891)
        at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:379)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:784)
11-22 19:36:48.003 32513-32513/com.fancyplayer E/RNTrackPlayer: Playback error: exoplayer - None of the available extractors (MatroskaExtractor, FragmentedMp4Extractor, Mp4Extractor, Mp3Extractor, AdtsExtractor, Ac3Extractor, TsExtractor, FlvExtractor, OggExtractor, PsExtractor, WavExtractor, AmrExtractor) could read the stream.
11-22 19:37:03.407 32513-32513/com.fancyplayer E/NotificationManager: notifyAsUser: tag=null, id=1, user=UserHandle{0}

any advice?

Android Question

Most helpful comment

As specified in the supported format list, you have to install the Flac extension in order to play .flac files. Unfortunately, there are no maven artifacts for this extension, it needs to be built manually, which you can find instructions here.

Alternatively, you can use the FFmpeg extension, which supports a ton of formats, but it needs to be built manually as well.

All 4 comments

As specified in the supported format list, you have to install the Flac extension in order to play .flac files. Unfortunately, there are no maven artifacts for this extension, it needs to be built manually, which you can find instructions here.

Alternatively, you can use the FFmpeg extension, which supports a ton of formats, but it needs to be built manually as well.

@Guichaguri thanks, i will check it :)

@cinder92 Were you able to add support for other extensions?

Here are all the alternatives:

  • Compiling and using the Flac extension
  • Compiling and using the FFmpeg extension
  • Switching to another format, such as .wav, .ogg or .mp3
  • Using an unofficial pre-compiled build which might work for you, but they are untrusted and are not constantly being updated. Use at your own risk.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

RiccardoNL picture RiccardoNL  路  3Comments

sagargheewala picture sagargheewala  路  3Comments

KalebPortillo picture KalebPortillo  路  4Comments

toooldmohammad picture toooldmohammad  路  3Comments

Sathyanarayan09 picture Sathyanarayan09  路  3Comments