X11 VA-API Youtube 720p & 1080p playback fails after a few seconds
Categories
(Core :: Audio/Video: Playback, defect)
Tracking
()
People
(Reporter: ch-bugzilla, Unassigned)
Details
I'm having issues with X11 VA-API x264 hardware accelerated video either pausing, or irrecoverably halting, every few seconds when playing 720p or 1080p streams from YouTube. Software playback works fine. I haven't tested under Wayland.
This issue does not manifest at lower resolutions. I do not have the hardware to test at 2K or 4K.
I can repeat this on multiple computers. The common traits are openSUSE Leap 15.2, codecs via the Packman repository, and an Intel GPU. I don't have any AMD hardware or other Linux distributions on bare metal to test with.
Steps to replicate:
Install FF 80 on openSUSE Leap 15.2.
Enable VA-VAPI for X11 with the following about:config settings:
- media.ffmpeg.vaapi.enabled = true
- gfx.webrender.all = true
Start Firefox from a console window after exporting MOZ_X11_EGL=1
.
If necessary, install the h264ify plugin to force avc1/h264 on YouTube.
Navigate to a YouTube video that is available at 720p or 1080p in avc1/h264 format. I have been able to repeat this with half a dozen videos but I've been using this test case.
Using the YouTube interface, force a resolution of 720p or 1080p.
Play the video.
After several seconds, the video will either temporarily freeze (the audio will continue) or will halt completely and the YouTube interface will display the usual "something went wrong" error.
Complete halting seems to be more likely if a video is played in full screen mode.
Diagnostics:
If I export MOZ_LOG="PlatformDecoderModule:5"
, I see several potentially significant blocks of errors. If the video freezes but resumes, this block appears in the log:
[h264 @ 0x7fefb88c5000] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[h264 @ 0x7fefb88c5000] get_buffer() failed
[h264 @ 0x7fefb88c5000] thread_get_buffer() failed
[h264 @ 0x7fefb88c5000] decode_slice_header error
[h264 @ 0x7fefb88c5000] no frame!
[Child 23583: MediaPDecoder #7]: D/PlatformDecoderModule avcodec_send_packet error: -1094995529
If the video crashes entirely, this block appears in the log:
h264 @ 0x7fefb7d28800] nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0
[h264 @ 0x7fefb7d28800] get_buffer() failed
[h264 @ 0x7fefb7d28800] thread_get_buffer() failed
[h264 @ 0x7fefb7d28800] decode_slice_header error
[h264 @ 0x7fefb7d28800] no frame!
[Child 23583: MediaPDecoder #1]: D/PlatformDecoderModule avcodec_send_packet error: -1094995529
[Child 23583, MediaDecoderStateMachine #1] WARNING: Decoder=7fefb7b97c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005): file /home/abuild/rpmbuild/BUILD/firefox-80.0/dom/media/MediaDecoderStateMachine.cpp, line 3470
[Child 23583, MediaDecoderStateMachine #1] WARNING: Decoder=7fefb7b97c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005): file /home/abuild/rpmbuild/BUILD/firefox-80.0/dom/media/MediaDecoderStateMachine.cpp, line 3470
[Child 23583, MediaDecoderStateMachine #1] WARNING: Decoder=7fefb7b97c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005): file /home/abuild/rpmbuild/BUILD/firefox-80.0/dom/media/MediaDecoderStateMachine.cpp, line 3470
[Child 23583, MediaDecoderStateMachine #1] WARNING: Decoder=7fefb7b97c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true> > mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /home/abuild/rpmbuild/BUILD/firefox-80.0/dom/media/MediaDecoderStateMachine.cpp, line 3470
[Child 23583, MediaDecoderStateMachine #1] WARNING: Decoder=7fefb7b97c00 Decode error: NS_ERROR_DOM_MEDIA_FATAL_ERR (0x806e0005) - RefPtr<mozilla::MozPromise<RefPtr<mozilla::MediaTrackDemuxer::SamplesHolder>, mozilla::MediaResult, true> > mozilla::MediaSourceTrackDemuxer::DoGetSamples(int32_t): manager is detached.: file /home/abuild/rpmbuild/BUILD/firefox-80.0/dom/media/MediaDecoderStateMachine.cpp, line 3470
Uninformed Speculation:
Googling the "avcodec_send_packet error: -1094995529" error suggests that the message originates with ffmpeg and indicates that ffmpeg believes it was given invalid data.
Further, "nal_unit_type: 1(Coded slice of a non-IDR picture), nal_ref_idc: 0" seems to indicate that ffmpeg believes that it was given a stream that did not begin with a keyframe.
Given that YouTube serves 720 and 1080 videos in (chunked) DASH format, could this be an issue of keyframe data getting mangled, at DASH chunk boundaries, in a way that the hardware decoder can't cope with?
Comment 1•4 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•4 years ago
|
||
Thanks for the report! VAAPI is definitely broken in 80, the first VAAPI on X11 release. (It was left broken for Wayland.)
It's fixed in Beta 81 and Nightly 82.
Description
•