Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

[Pico]Only allow 5K resolution youtube videos on devices that can support it #3193

Closed
picoxr opened this issue Apr 20, 2020 · 8 comments
Closed
Assignees
Labels
ARCHIVED CLOSED at time of archiving Youtube Youtube related issue
Milestone

Comments

@picoxr
Copy link

picoxr commented Apr 20, 2020

Configuration

Firefox Reality version: Firefox Reality version 10-141060720
Firefox Reality build ID: 9b36c14

Hardware:
Pico G2 4K - Android - 8.1.0

Steps to Reproduce

  1. Enter home page and find "Enjoy Busan like BTS" under category "Spotlight: Korea"
  2. Select video to enter and click button to play

Current Behavior

Default resolution is 5K and it can't play correctly.

Expected Behavior

The video plays correctly in panoramic view.

Possible Solution

Context

Error Logs and Stack Traces

@emstanley emstanley added this to the #11 polish milestone Apr 20, 2020
@bluemarvin
Copy link
Contributor

Looks like the Media Process is crashing when video is set to 5k:

04-21 19:29:43.040  4036  4799 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.044  4036  4799 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.047  4036  4329 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.053  5616  5627 W GeckoShmem: dispose() not called before finalizing
04-21 19:29:43.053  5616  5627 W GeckoShmem: dispose() not called before finalizing
04-21 19:29:43.054  4036  4329 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.056  5616  5627 W GeckoShmem: dispose() not called before finalizing
04-21 19:29:43.056  5616  5627 W GeckoShmem: dispose() not called before finalizing
04-21 19:29:43.057   865  1552 E PvrPlatform: ALOOPER_POLL_TIMEOUT
04-21 19:29:43.064  4036  4799 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.068   865  1552 E PvrPlatform: ALOOPER_POLL_TIMEOUT
04-21 19:29:43.077  4036  4799 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2000
04-21 19:29:43.089  1139  7540 E OMX-VDEC-1080P: Failed to call streamon on OUTPUT
04-21 19:29:43.089  1139  7540 E OMX-VDEC-1080P: empty_this_buffer_proxy failure
04-21 19:29:43.089  1139  7540 E OMX-VDEC-1080P: ERROR: Sending OMX_ErrorHardware to Client
04-21 19:29:43.089  1139  7540 E OMX-VDEC-1080P: OMX_COMPONENT_GENERATE_HARDWARE_ERROR
04-21 19:29:43.090  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.090  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.090  5616  7538 E ACodec  : [OMX.qcom.video.decoder.vp9] ERROR(0x80001009)
04-21 19:29:43.090  5616  7538 E ACodec  : signalError(omxError 0x80001009, internalError -2147483648)
04-21 19:29:43.090  5616  7537 E MediaCodec: Codec reported err 0x80001009, actionCode 0, while in state 6
04-21 19:29:43.090  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.090  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.091  5616  7537 D SurfaceUtils: disconnecting from surface 0x7c780de010, reason disconnectFromSurface
04-21 19:29:43.091  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.091  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
...
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.Codec$Callbacks.onError(Codec.java:48)
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec$CodecCallback$Forwarder.handleMessage(LollipopAsyncCodec.java:62)
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec$CodecCallback$Forwarder.notify(LollipopAsyncCodec.java:76)
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec$CodecCallback$Forwarder.onError(LollipopAsyncCodec.java:94)
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec$CodecCallback$Forwarder.access$400(LollipopAsyncCodec.java:32)
04-21 19:29:43.104  5616  5616 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec$CodecCallback.onError(LollipopAsyncCodec.java:134)
04-21 19:29:43.104  5616  5616 W System.err: 	at android.media.MediaCodec$EventHandler.handleCallback(MediaCodec.java:1689)
04-21 19:29:43.104  5616  5616 W System.err: 	at android.media.MediaCodec$EventHandler.handleMessage(MediaCodec.java:1629)
04-21 19:29:43.104  5616  5616 W System.err: 	at android.os.Handler.dispatchMessage(Handler.java:106)
04-21 19:29:43.104  5616  5616 W System.err: 	at android.os.Looper.loop(Looper.java:164)
04-21 19:29:43.104  5616  5616 W System.err: 	at android.app.ActivityThread.main(ActivityThread.java:6625)
04-21 19:29:43.104  5616  5616 W System.err: 	at java.lang.reflect.Method.invoke(Native Method)
04-21 19:29:43.104  5616  5616 W System.err: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
04-21 19:29:43.105  5616  5616 W System.err: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
04-21 19:29:43.105  4122  7403 I Gecko   : [Child 4122, Unnamed thread 7bd64f2790] WARNING: Decoder=7bb4b03c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - OnError: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp, line 3367
04-21 19:29:43.106  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.106  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
...
04-21 19:29:43.206  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.206  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.206  4122  4169 W Web Content: [JavaScript Warning: "Media resource blob:https://www.youtube.com/8a5bb3b0-8616-49e6-bd82-2bd949efcd10 could not be decoded." {file: "https://www.youtube.com/watch?v=74IRL4_heRI&mozVideoProjection=360_auto" line: 0}]
04-21 19:29:43.207  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.207  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
...
04-21 19:29:43.213  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.213  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.216  4122  4169 W Web Content: [JavaScript Warning: "This error message will be blank when privacy.resistFingerprinting = true.  If it is really necessary, please add it to the whitelist in MediaError::GetMessage: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - OnError" {file: "https://www.youtube.com/s/player/f676c671/player_ias.vflset/en_US/base.js" line: 5229}]
04-21 19:29:43.216  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.217  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
...
04-21 19:29:43.263  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.263  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.266  4036  4091 D GeckoViewModule: dispatch GeckoView:MediaObserve, data={"id":9}
04-21 19:29:43.266  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.266  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.267  2137  2191 E QAngleA : QAngle:20.536802,27.881702,-1.512087
04-21 19:29:43.270  5616  5664 W System.err: java.lang.IllegalStateException
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.271  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.272  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.272  5616  5664 W System.err: 	at android.media.MediaCodec.native_flush(Native Method)
04-21 19:29:43.272  5616  5664 W System.err: 	at android.media.MediaCodec.flush(MediaCodec.java:2114)
04-21 19:29:43.272  5616  5664 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec.flush(LollipopAsyncCodec.java:184)
04-21 19:29:43.272  5616  5664 W System.err: 	at org.mozilla.gecko.media.Codec.flush(Codec.java:566)
04-21 19:29:43.272  5616  5664 W System.err: 	at org.mozilla.gecko.media.ICodec$Stub.onTransact(ICodec.java:122)
04-21 19:29:43.272  5616  5664 W System.err: 	at android.os.Binder.execTransact(Binder.java:697)
04-21 19:29:43.272  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.272  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.272  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.272  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.273  5616  5664 W System.err: java.lang.IllegalStateException
04-21 19:29:43.273  5616  5664 W System.err: 	at android.media.MediaCodec.native_stop(Native Method)
04-21 19:29:43.273  5616  5664 W System.err: 	at android.media.MediaCodec.stop(MediaCodec.java:2067)
04-21 19:29:43.273  5616  5664 W System.err: 	at org.mozilla.gecko.media.LollipopAsyncCodec.stop(LollipopAsyncCodec.java:179)
04-21 19:29:43.273  5616  5664 W System.err: 	at org.mozilla.gecko.media.Codec.stop(Codec.java:551)
04-21 19:29:43.273  5616  5664 W System.err: 	at org.mozilla.gecko.media.ICodec$Stub.onTransact(ICodec.java:115)
04-21 19:29:43.273  5616  5664 W System.err: 	at android.os.Binder.execTransact(Binder.java:697)
04-21 19:29:43.273  4036  4091 D GeckoViewMedia: onEvent: event=GeckoView:MediaObserve, data={"id":9}
04-21 19:29:43.273  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.273  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
...
04-21 19:29:43.276  1139  7540 E OMX-VDEC-1080P: Failed to qbuf to driver, error Invalid argument
04-21 19:29:43.276  1139  7540 E OMX-VDEC-1080P: fill_this_buffer_proxy failure
04-21 19:29:43.281  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c78028b80
04-21 19:29:43.281  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 22 to native window
04-21 19:29:43.282  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c780dd600
04-21 19:29:43.282  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 21 to native window
04-21 19:29:43.284  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c780dd680
04-21 19:29:43.284  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 20 to native window
04-21 19:29:43.284  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c780dd700
04-21 19:29:43.284  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 19 to native window
04-21 19:29:43.285  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c780dd780
04-21 19:29:43.285  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 18 to native window
04-21 19:29:43.285  5616  7538 E Surface : getSlotFromBufferLocked: unknown buffer: 0x7c780dd800
04-21 19:29:43.285  5616  7538 W ACodec  : [OMX.qcom.video.decoder.vp9] can not return buffer 17 to native window
04-21 19:29:43.289  1139  1655 I OMX-VDEC-1080P: omx_vdec::component_deinit() complete
04-21 19:29:43.290  1139  1655 I OMX-VDEC-1080P: Exit OMX vdec Destructor: fd=10
04-21 19:29:43.291  1139  1655 I OMX-VDEC-1080P: Video slvp perflock released
04-21 19:29:43.292  1136  1976 E ResourceManagerService: Rejected removeResource call with invalid pid.
04-21 19:29:43.292  1136  1976 E ResourceManagerService: Rejected removeResource call with invalid pid.
04-21 19:29:43.297  1142  1142 I cnss-daemon: wlan_service_core_minfreq: RESET
04-21 19:29:43.297  1142  1142 I cnss-daemon: wlan_service_core_minfreq: perf_lock_rel(474)
04-21 19:29:43.297  1142  1142 I cnss-daemon: wlan_service_core_minfreq: RELEASED lock
04-21 19:29:43.299  5616  5616 I GeckoMediaManager: Media service has been unbound. Stopping.

@bluemarvin
Copy link
Contributor

The video seems to work better on Neo 2 but it seems the media process can still occasionally fail:

04-21 17:03:29.404  5477  5750 I Gecko   : [Child 5477, Unnamed thread 74c3dd9df0] WARNING: Decoder=74b30a8000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp, line 3367
04-21 17:03:29.404  5477  5750 I Gecko   : [Child 5477, Unnamed thread 74c3dd9df0] WARNING: Decoder=74b30a8000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp, line 3367
04-21 17:03:29.420  5477  5542 D GeckoViewMedia[C]: handleEvent: UAWidgetSetupOrChange
04-21 17:03:29.422  5477  5750 I Gecko   : [Child 5477, Unnamed thread 74c3dd9df0] WARNING: Decoder=74b30a8000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp, line 3367
04-21 17:03:29.425  5477  5750 I Gecko   : [Child 5477, Unnamed thread 74c3dd9df0] WARNING: Decoder=74b30a8000 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<MediaSourceTrackDemuxer::SamplesPromise> mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /builds/worker/checkouts/gecko/dom/media/MediaDecoderStateMachine.cpp, line 3367
04-21 17:03:29.427  5393  5451 D GeckoViewModule: dispatch GeckoView:MediaObserve, data={"id":2}
04-21 17:03:29.427  5393  5451 D GeckoViewMedia: onEvent: event=GeckoView:MediaObserve, data={"id":2}

@bluemarvin
Copy link
Contributor

I think we need to disable 5k video support until we can resolve the issue in Gecko. In my testing, the media process has issue with 5k youtube video.

@bluemarvin bluemarvin self-assigned this Apr 29, 2020
@bluemarvin bluemarvin modified the milestones: #11 polish, #10 features Apr 29, 2020
bluemarvin added a commit that referenced this issue Apr 29, 2020
@bluemarvin
Copy link
Contributor

@bluemarvin bluemarvin added blocked Bugzilla Main activity on this bug is in Bugzilla labels Apr 29, 2020
bluemarvin added a commit that referenced this issue Apr 29, 2020
@bluemarvin
Copy link
Contributor

I've disabled 5k youtube video in #3288. I will leave this issue open to track the Gecko issue.

@bluemarvin bluemarvin added the blocked-media Issue blocked by Gecko Media Layer label Apr 30, 2020
@daron-walters
Copy link
Contributor

Issue #2946 talks about issues about playback quality of some videos. If you read here and search for 'Revision history' it says that some of the methods we use have been deprecated. In particular they say setPlaybackQuality and even though we use setPlaybackQualityRange I wonder has that been deprecated as well. I am still researching but I wanted to at least include this as it may relate to #3288 #2946 and this issue

@bluemarvin
Copy link
Contributor

The issue is older devices can’t play 5k. See https://bugzilla.mozilla.org/show_bug.cgi?id=1634189#c3
I turned off 5k in our youtube webext for now. I’m guessing the pico neo 2 can handle it so we should look at enabling on platforms that support it.

@picoxr picoxr changed the title 5K resolution video from Webxr.today won't play [Pico]5K resolution video from Webxr.today won't play May 7, 2020
@bluemarvin bluemarvin removed Bugzilla Main activity on this bug is in Bugzilla blocked blocked-media Issue blocked by Gecko Media Layer labels May 12, 2020
@bluemarvin bluemarvin changed the title [Pico]5K resolution video from Webxr.today won't play [Pico]Only allow 5K resolution youtube videos on devices that can support it May 12, 2020
@bluemarvin
Copy link
Contributor

We need to figure out which of the supported devices can handle 5k video and enable it for those platforms.

@keianhzo keianhzo modified the milestones: #10 features, #11 polish May 20, 2020
@keianhzo keianhzo added the Youtube Youtube related issue label May 20, 2020
@bluemarvin bluemarvin modified the milestones: #11 polish, #13 Polish Jun 25, 2020
@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Jul 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving Youtube Youtube related issue
Projects
None yet
Development

No branches or pull requests

6 participants