media icon indicating copy to clipboard operation
media copied to clipboard

motion photo player error

Open dulithink opened this issue 6 months ago • 1 comments

Version

Media3 pre-release (alpha, beta or RC not in this list)

More version details

No response

Devices that reproduce the issue

Samsung 23 oneui 8.0 Realme neo5se(android 15)

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

No

Reproduction steps

        playerView.visibility = View.VISIBLE
        val player = ExoPlayer.Builder(act).build()
        playerView.player = player
        val mediaItem = MediaItem.Builder().setUri(uri).build()
        player.addListener(
            object : Player.Listener {
              override fun onPlayerError(error: PlaybackException) {
                println(error)
              }

              override fun onPlaybackStateChanged(playbackState: Int) {
                when (playbackState) {
                  Player.STATE_IDLE -> {
                    
                  }
                  Player.STATE_BUFFERING -> {
                    
                  }
                  Player.STATE_READY -> {
                    
                  }
                  Player.STATE_ENDED -> {
                    
                  }
                }
              }
            })
        player.setMediaItem(mediaItem)

        player.playWhenReady = true
        player.prepare()

Expected result

The motion photo play successfully

Actual result

`

E Playback error androidx.media3.exoplayer.ExoPlaybackException: Source error at androidx.media3.exoplayer.ExoPlayerImplInternal.handleIoException(ExoPlayerImplInternal.java:926) at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:896) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:342) at android.os.HandlerThread.run(HandlerThread.java:85) 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, Mp3Extractor, AviExtractor, JpegExtractor, PngExtractor, WebpExtractor, BmpExtractor, HeifExtractor, AvifExtractor) could read the stream. {contentIsMalformed=false, dataType=1} at androidx.media3.exoplayer.source.BundledExtractorsAdapter.init(BundledExtractorsAdapter.java:108) at androidx.media3.exoplayer.source.ProgressiveMediaPeriod$ExtractingLoadable.load(ProgressiveMediaPeriod.java:1124) at androidx.media3.exoplayer.upstream.Loader$LoadTask.run(Loader.java:453) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012)

The attachment contains images

1011.zip

`

Media

1011.zip

The attachment contains images

Bug Report

  • [x] You will email the zip file produced by adb bugreport to [email protected] after filing this issue.

dulithink avatar Jun 21 '25 05:06 dulithink

The JpegMotionPhotoExtractor expects Exif at the start of the APP1 segment here. I'll try modifying this implementation so it allows not having an Exif segment at the start of the file.

andrewlewis avatar Jun 21 '25 15:06 andrewlewis

This should be fixed by the commit referenced above. Thanks for reporting the problem.

andrewlewis avatar Jun 23 '25 11:06 andrewlewis