Closed Bug 1679274 Opened 4 years ago Closed 2 years ago

Stuttering AVC1 video playback

Categories

(Core :: Audio/Video: Playback, defect, P5)

Firefox 83
defect

Tracking

()

RESOLVED DUPLICATE of bug 1737113

People

(Reporter: romain.failliot, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0

Steps to reproduce:

The playback of some videos on Youtube are stuttering, like this one: https://www.youtube.com/watch?v=T5HwucOAHJ4

After a little investigation I observed this was happening on Youtube videos encoded with codec "avc1.640028" (from the "nerds statistics" popup). Other videos encoded with different codecs such as "vp09.00.51.08.01.01.01.01.00" works flawlessly.

My setup:

  • Fedora 33 (fresh install)
  • Installed RPM Fusion free and non-free repos: https://rpmfusion.org/
  • Installed packages: gstreamer1-vaapi gstreamer1-plugins-good gstreamer1-plugins-bad-free gstreamer1-plugins-ugly mesa-vulkan-dri vers mesa-vdpau-drivers gstreamer1-svt-av1 dav1d
  • CPU: AMD Ryzen 7 3800X
  • GPU: AMD RX 480
  • Drivers: Mesa 20.2.2

Actual results:

The videos are stuttering significantly, making them quite impossible to watch (i.e. it is not subtle at all)

Expected results:

Considering my setup, I would assume these videos should play smoothly.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core

Ok, so I continued to investigate and I fixed my issue by installing the 'x264' and 'x265' packages (I don't know which one is used for AVC1 videos) which come from the rpmfusion-free repo.

Would it be possible to install/recommend these packages when installing Firefox on Fedora?

Component: Audio/Video: Playback → Untriaged
Product: Core → Firefox
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
Severity: -- → S4
Priority: -- → P5

I have this issue on Arch with the flatpak version. Is the flatpak mission the packages mentioned above?

Attached file youtube debug info (deleted) —
I think I'm seeing the same bug (mozilla-flatpak 97.0.1 (64-bit)) and it certainly seems to be limited to avc01 encoded video. Curiously the OP's example video plays smoothly for me but is indicated as av01.0.08M.08 (399)/ opus (251). It could be that YouTube has re-encoded the video since the bug report was listed. My current example of a choppy video is this one: https://www.youtube.com/watch?v=MoHpqLkRtiA which reports the coded as

I think I'm seeing the same bug (mozilla-flatpak 97.0.1 (64-bit)) and it certainly seems to be limited to avc01 encoded video. Curiously the OP's example video plays smoothly for me but is indicated as av01.0.08M.08 (399)/ opus (251). It could be that YouTube has re-encoded the video since the bug report was listed. My current example of a choppy video is this one:

https://www.youtube.com/watch?v=MoHpqLkRtiA

which reports the codec as avc1.6400028 with the opus audio codec. Other videos generally seems to be vp9 and are buttery smooth. I can grab a profile if it would be useful.

How would we go about fixing the flatpak? As far as I understand it is maintained by Mozilla, so this is the right spot to report bugs like this, right?

Can we just add the missing libraries to it or is there some licensing issue that prevents this?

I still see this issue on Firefox 100, I think. For me, Youtube is mostly fine but a lot of other sites, e.g., Twitter, have a stuttering issue. Unfortunately, I am not sure how to figure out which encoding a Twitter video uses.

For example this video: https://twitter.com/RedHat/status/1524015460596989952

However, in my case I see this, both, on the flatpak version and the pacman/arch version. Do other folks only encounter this on flatpak? If so I will open a new issue.

I think this is a dup of 1737113. If not, feel free to reopen it.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE

(In reply to Kai Mast from comment #6)

How would we go about fixing the flatpak? As far as I understand it is maintained by Mozilla, so this is the right spot to report bugs like this, right?
Can we just add the missing libraries to it or is there some licensing issue that prevents this?

H264 video is decoded with a patent-licensed h264 software decoder (openh264) downloaded from Cisco by Flatpak's FreedesktopSDK.
Some h264 videos may stutter.

  • Ideally report openh264 bugs to https://github.com/cisco/openh264.
  • To avoid stuttering, you need to manually install ffmpeg as alternative software decoder. The flatpak package can't depend on a patented h264 software decoder, otherwise Mozilla would have to pay patent fees.
  • bug 1737113 would just remove current decoding ability, is that really desired? No h264 video would play then unless the user has found out that fmpeg must be installed manually.
  • Even hardware decoding (bug 1752494) would require the user to manually install ffmpeg for h264 hardware decoding.

Thanks Darkspirit!

I didn't realize you can install the ffmpeg runtime through Flatpak to resolve this.
Switching to ffmpeg also fixed other issues for me, e.g., various issues on Twitch.

With regards to openh264: my Firefox lists version 1.8.1.2, but on the github repo you linked tags the latest release as 2.2.
Not sure whether the plugin is outdated or the version numbering is inconsistent. If it is the former, maybe updating the plugin might help.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: