moneytoo / Player

▶ Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer
https://play.google.com/store/apps/details?id=com.brouken.player
The Unlicense
1.57k stars 182 forks source link

Cannot open MP4 from direct url #445

Closed 89jd closed 1 year ago

89jd commented 1 year ago

Describe the bug

03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:   androidx.media3.exoplayer.ExoPlaybackException: Source error
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:652)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:622)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at android.os.Handler.dispatchMessage(Handler.java:102)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at android.os.Looper.loop(Looper.java:223)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at android.os.HandlerThread.run(HandlerThread.java:67)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:   Caused by: androidx.media3.exoplayer.source.UnrecognizedInputFormatException: None of the available extractors (FlvExtractor, FlacExtractor, WavExtractor, FragmentedMp4Extractor, Mp4Extractor, AmrExtractor, PsExtractor, OggExtractor, TsExtractor, MatroskaExtractor, AdtsExtractor, Ac3Extractor, Ac4Extractor, AviExtractor, Mp3Extractor, JpegExtractor) could read the stream.
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.source.BundledExtractorsAdapter.init(BundledExtractorsAdapter.java:94)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1018)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:414)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
03-05 19:09:48.637 23683 23717 E ExoPlayerImplInternal:       at java.lang.Thread.run(Thread.java:923)

To Reproduce Steps to reproduce the behavior:

  1. Open url which returns following from ffprobe:
    [hevc @ 0x558c3c083480] Skipping NAL unit 62
    [mpegts @ 0x558c3bdc2ec0] start time for stream 3 is not set in estimate_timings_from_pts
    [mpegts @ 0x558c3bdc2ec0] start time for stream 4 is not set in estimate_timings_from_pts
    [mpegts @ 0x558c3bdc2ec0] start time for stream 5 is not set in estimate_timings_from_pts
    [mpegts @ 0x558c3bdc2ec0] Could not find codec parameters for stream 3 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [mpegts @ 0x558c3bdc2ec0] Could not find codec parameters for stream 4 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    [mpegts @ 0x558c3bdc2ec0] Could not find codec parameters for stream 5 (Subtitle: hdmv_pgs_subtitle (pgssub) ([144][0][0][0] / 0x0090)): unspecified size
    Consider increasing the value for the 'analyzeduration' (0) and 'probesize' (5000000) options
    Input #0, mpegts, from 'https://....:
    Duration: 00:59:04.06, start: 4200.000000, bitrate: 20065 kb/s
    Program 1 
    Stream #0:0[0x1015](eng): Video: hevc (Main 10) (HDMV / 0x564D4448), yuv420p10le(pc), 3840x2160 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 23.98 tbc
    Side data:
      DOVI configuration record: version: 1.0, profile: 5, level: 6, rpu flag: 1, el flag: 0, bl flag: 1, compatibility id: 0
    Stream #0:1[0x1100](eng): Audio: eac3 (EAC3 / 0x33434145), 48000 Hz, 5.1(side), fltp, 768 kb/s
    Stream #0:2[0x1101](pol): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s
    Stream #0:3[0x12a0](eng): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:4[0x12a1](pol): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
    Stream #0:5[0x12a2](pol): Subtitle: hdmv_pgs_subtitle ([144][0][0][0] / 0x0090)
  2. Looks like its about to load and then shows the play button

Expected behavior Video to play

Device: Nvidia Shield Pro - Android 11 SDK 30 App version: v0.138 + v0.139 - Legacy and non-legacy

Additional context I thought that this should be able to be played, but maybe there is something that is unsupported. This happens either through kodi or directly launching URL with

adb shell am start -n com.brouken.player/.PlayerActivity -d or adb shell am start -n com.brouken.player.legacy/com.brouken.player.PlayerActivity -d

moneytoo commented 1 year ago

Please provide some media sample as it looks more like a media or ExoPlayer issue.

MP4 generally works for me just fine. So does adb shell am start -n com.brouken.player/.PlayerActivity -d 'http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'

89jd commented 1 year ago

I cannot share the link, I will try and get a small selection

I can play it with ffplay or vlc.

It is a DV file which is why I am trying to use Just Player to play it. Any other information I can give you about the file in question?

moneytoo commented 1 year ago

I'm afraid I won't be able to help without any reproducible steps/sample.