Search code examples
androidvideo-streamingmp4video-processingexoplayer

Can't play EAC streams with Android Google ExoPlayer in IPTV app


I have issue with streaming livestream and movie which has EAC Streams.

10-24 22:43:57.800 1606-11797/ E/WavHeaderReader: Unsupported RIFF format: 1096173856
10-24 22:43:57.805 1606-1606/Exo Player BitRate:-1
10-24 22:43:57.820 1606-11796/ 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) could read the stream.
                                                                               at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractorHolder.selectExtractor(ExtractorMediaPeriod.java:924)
                                                                               at com.google.android.exoplayer2.source.ExtractorMediaPeriod$ExtractingLoadable.load(ExtractorMediaPeriod.java:846)
                                                                               at com.google.android.exoplayer2.upstream.Loader$LoadTask.run(Loader.java:308)
                                                                               at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
                                                                               at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
                                                                               at java.lang.Thread.run(Thread.java:841)
10-24 22:43:57.825 1606-1606/ExoPlayer-onPlayerError

Is there anybody who has experienced with this issue?


Solution

  • I had built ffmpeg extension and set EXTENSION_MODE_PREFER when initialize ExoPlayer.

    I could check if ExoPlayer supports EAC3 and other streams format like this;

    Logger.print ("FFMPEG AVAILABLE: " + FfmpegLibrary.isAvailable());
    
            Logger.print( "AUDIO_AAC SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_AAC));
            Logger.print( "AUDIO_MPEG SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_MPEG));
            Logger.print( "AUDIO_MPEG_L1 SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_MPEG_L1));
            Logger.print( "AUDIO_MPEG_L2 SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_MPEG_L2));
            Logger.print( "AUDIO_AC3 SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_AC3));
            Logger.print( "AUDIO_E_AC3 SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_E_AC3));
            Logger.print( "AUDIO_TRUEHD SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_TRUEHD));
            Logger.print( "AUDIO_DTS SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_DTS));
            Logger.print( "AUDIO_DTS_HD SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_DTS_HD));
            Logger.print( "AUDIO_VORBIS SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_VORBIS));
            Logger.print( "AUDIO_OPUS SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_OPUS));
            Logger.print( "AUDIO_AMR_NB SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_AMR_NB));
            Logger.print( "AUDIO_AMR_WB SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_AMR_WB));
            Logger.print( "AUDIO_FLAC SUPPORT: "  + FfmpegLibrary.supportsFormat(MimeTypes.AUDIO_FLAC));