Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding error when starting some videos on 2x tempo #8953

Open
6 tasks done
amarzot opened this issue Sep 10, 2022 · 10 comments
Open
6 tasks done

Decoding error when starting some videos on 2x tempo #8953

amarzot opened this issue Sep 10, 2022 · 10 comments
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)

Comments

@amarzot
Copy link

amarzot commented Sep 10, 2022

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.23.3

Steps to reproduce the bug

  1. Start playing a video.
  2. Change the tempo to 2x.
  3. Close the video.
  4. Try to open the video again.

Expected behavior

The video should start playing at 2x tempo

Actual behavior

The player encounters a decoder error and doesn't play the video.

Screenshots/Screen recordings

No response

Logs

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=y-l0QZgRS14
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.23.3
  • OS: Linux lge/lv9n_att_us/lv9n:8.1.0/OPM1.171019.026/190661835bf85:user/release-keys 8.1.0 - 27
Crash log

com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(298, null, null, video/avc, avc1.640020, 3829995, null, [1280, 720, 60.0], [-1, -1]), format_supported=YES
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:575)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:175)
	at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.qcom.video.decoder.avc
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1512)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:998)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:499)
	... 3 more
Caused by: java.lang.IllegalStateException
	at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
	at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2632)
	at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:106)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1806)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:792)
	... 5 more


Affected Android/Custom ROM version

Android 8.1.0

Affected device model

LG-H700

Additional information

This only effects some videos and usually all videos from their channel (encoding specific?). I can then close the stopped player open a different video (one from a different channel), which doesn't crash, change the tempo back to 1x, and then go back to the video which caused the crash and it will start playing.

A video which reproduces this behavior is linked in the logs.

@amarzot amarzot added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Sep 10, 2022
@amarzot
Copy link
Author

amarzot commented Sep 11, 2022

Actually after searching around, it looks like this is another #8016 bug. Guess I'll just do the workaround I described. Confirmation that it really is 8016 would be nice. Thanks!

@opusforlife2
Copy link
Collaborator

The way to be sure is to try #8875 and see if it works.

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 10, 2022
@amarzot
Copy link
Author

amarzot commented Nov 10, 2022

I get the following exception with the apk from that PR. Looks the same to me :/ . Looks from the wording of #8875 that it is not expected to solve all decoding errors. Let me know if you have any other ideas.

Exception

  • User Action: play stream
  • Request: Player error[type=ERROR_CODE_DECODING_FAILED] occurred while playing https://www.youtube.com/watch?v=y-l0QZgRS14
  • Content Country: US
  • Content Language: en-US
  • App Language: en_US
  • Service: YouTube
  • Version: 0.24.1
  • OS: Linux lge/lv9n_att_us/lv9n:8.1.0/OPM1.171019.026/190661835bf85:user/release-keys 8.1.0 - 27
Crash log

com.google.android.exoplayer2.ExoPlaybackException: MediaCodecVideoRenderer error, index=0, format=Format(298, null, null, video/avc, avc1.640020, 3829995, null, [1280, 720, 60.0], [-1, -1]), format_supported=YES
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:566)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:175)
	at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: com.google.android.exoplayer2.video.MediaCodecVideoDecoderException: Decoder failed: OMX.qcom.video.decoder.avc
	at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.createDecoderException(MediaCodecVideoRenderer.java:1590)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:813)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:989)
	at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:490)
	... 3 more
Caused by: java.lang.IllegalStateException
	at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
	at android.media.MediaCodec.dequeueOutputBuffer(MediaCodec.java:2632)
	at com.google.android.exoplayer2.mediacodec.SynchronousMediaCodecAdapter.dequeueOutputBufferIndex(SynchronousMediaCodecAdapter.java:106)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.drainOutputBuffer(MediaCodecRenderer.java:1819)
	at com.google.android.exoplayer2.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:792)
	... 5 more


@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 10, 2022
@opusforlife2
Copy link
Collaborator

Did you read the PR description and try the relevant toggle for offloading?

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 11, 2022
@amarzot
Copy link
Author

amarzot commented Nov 11, 2022

Thanks so much for helping out!

...try the relevant toggle for offloading?

I'm not sure what offloading means in this context. That word isn't mentioned in the PR, but I'm assuming you mean fallback as the second bullet point on the PR talks about enabling the "decoder fallback feature" to help with #8016. I enabled that toggle, made sure that the "use old codec selection" toggle was off, and then quit the app. After opening the app back up and making sure the fallback feature was still enabled I was able to reproduce the bug. That's how the error in my comment was generated.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 11, 2022
@opusforlife2
Copy link
Collaborator

Oh! Media tunneling, the 3rd bullet. Sorry, I forgot its name. Try toggling that.

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 11, 2022
@amarzot
Copy link
Author

amarzot commented Nov 11, 2022

Dang, I tried "disable media tunneling", both with fallback and without, but same error. Let me know if you want those error reports as well.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Nov 11, 2022
@opusforlife2
Copy link
Collaborator

No, it's okay. Someone with more knowledge will have to see this, since I'm out of ideas.

@opusforlife2 opusforlife2 added player Issues related to any player (main, popup and background) and removed needs triage Issue is not yet ready for PR authors to take up labels Nov 11, 2022
@CBSkarmory
Copy link
Contributor

This bug still exists in 0.25.0 and 0.25.1 (latest)

Another workaround I found:

  • press Background (audio only) and it will play at 2x speed
  • then (3 dots)
  • Switch to Main

After doing this, it can play the video at 2x speed, where it previously crashed. Resuming video playback of the same video also works fine.

Perhaps there is different behavior when playing (and selecting video format) through the usual interface vs playing video using Switch to Main

@amarzot
Copy link
Author

amarzot commented Jun 23, 2024

Issue still here in 0.27.0, but I did find a workaround using the popout. After following the 4 repro steps from the initial comment, just click on the popup button under the video. It will start playing in the popup at the selected tempo.

Unfortunately you can't merge it back into the app without it crashing again (like you can with the background trick).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug player Issues related to any player (main, popup and background)
Projects
None yet
Development

No branches or pull requests

3 participants