HD video playback on Qubes OS / older computers

There are a lot of reports on forum about not being able to play Youtube properly in Firefox without lags (as users are used to on GNU/Linux).

I myself had to update less than 10-years old laptop to have reasonable youtube experience.
I made a HCL that describes it, if you are interested I can find the link. HCL also includes some ways to improve situation a bit, like using smtube, so the issue was important for me.

Please post you CPU model, I will check its speed according to websites that compare CPUs using benchmark.

No, I mean frame-drops.

You can try this:

  • open youtube in firefox, a video 1080p@60fps with dynamic scenes (e.g. computer games),
  • right-click on the video and click “Stats for nerds”
  • to play it at 2X speed (preferably on high-res monitor, 1440p+).
  • work normally like using other firefox instance in other qubes on the same screen.

Does the stat say that playback has frame drops?

Update: I checked x320 specs, it says that average CPU option is i5-3320M. This CPU according to https://www.cpubenchmark.net/ is even slower that I had on my Macbook Pro 11 (Retina). So, I am almost certain this CPU will not be able to flawlessly play dynamic youtube videos without frame drops at 1080p@60fps at 2X speed as I am used to.
Of course all this works flawlessly on the same laptop in Kubuntu or other GNU/Linux due to the hardware acceleration, it can play multiple instances of the same videos with no issues.

If you think differently you can make proper tests as I described above. But you have to use external display, because x320 has display with only 768p resolution according to specs.

As I said, “These judgements will depend on what applications you are
running, and how you manage your qubes.” I should have added “how you
use those applications”.
Evidently my users tend not to run 5 players at 2x speed. Is this a
common thing?

1 Like

I got something for you: GitHub - pystardust/ytfzf: A posix script to find and watch youtube videos from the terminal. (Without API)
mpv + yt-dlp + fzf obsoletes youtube’s bloated frontend.

2 Likes

No, 1 would be enough, as I said, but it lags and drops frames in Qubes OS.
Running 5 videos flawlessly in GNU/Linux without lags was mentioned just to show performance superiority compared to Qubes OS that struggles with 1 youtube video.

Thank you for the link. Unfortunately it is still not a solution. It is only like 20%-30% faster than playing youtube in Firefox with addons like ublock for blocking cross-site requests and other javascript activity.

Well, even if I download video manually with youtube-dl and open in mpv - it still drops frames for 1080p@60fps at 2x on 10 years old laptop in Qubes OS.
The only real solution is a modern CPU in the laptop (in case of desktop: top model of Intel 6-Gen can be almost enough).

1 Like

I have used Qubes OS on my X230, X270, T480 and 12th gen workstation, and they are all able to play YouTube video without any issues.

I have a T480 i5-8350U 32GB running Qubes and sure it plays YouTube and videos. However the video playback is definitely not as smooth compared to all of my other linux devices (with the exact same resolution and refresh rate, with older or newer components). If I fullscreen the video and/or increase resolution from 720p to 1080p, tearing and choppiness worsen. If I connect a monitor with higher resolution than 1080, the playback drops even more frames and becomes more stuttery and choppy. And this is all with only one browser + tab open with no other non-essential qubes or applications running in the background.

xrandr output in a fedora Qube playing youtube with the latest version of firefox on my T480 shows a refresh rate of 46.10. I’m guessing that this probably has something to do with the stutters and choppiness.

I enjoy Qubes for most things. However in my experience it is not suitable for watching videos where quality of motion is important. So I use my other devices for that.

1 Like

This is my T480 playing YouTube video in full screen 1080p, with no issues, the 32 dropped frames were from YouTube switching between ads and the video.

This is low-bitrate (static, not dynamic), low-fps (30, not 60) video at 1x speed?

Please try to play this one: https://www.youtube.com/watch?v=6sWcB_EwhTE
And please set 1080p@60fps with 2x playback speed (gear icon in the bottom).

P.S. You can avoid ads by installing uBlock Origin addon in Firefox.

rofl … thank you for that @unman, made my day.

2 Likes

It dropped ~400 frames at the very beginning before I could bring the stats up, but then played the entire video without dropping another frame on this machine.

3 Likes

Unfortunately youtube stats for nerds is not the full story. Try watching 4K VIDEO TEST TV Motion - YouTube at 1080p60, fullscreen on Qubes and then compare the smoothness to any other non-Qubes device. The dropped frames count appears acceptable in Qubes, however the stuttering is jarring, especially during the panning. For videos with less motion, Qubes does a “good enough” job. For videos where motion is important, in my experience the VM refresh rate is not high enough and everything looks choppy.

I’m not saying OP shouldn’t use Qubes. As I said earlier I enjoy using Qubes for other things. I agree with unman’s suggestion to try it, but I would add that video consumption may not be the most pleasurable depending on the content that’s being watched and how sensitive OP is to choppiness.

3 Likes

Thanks for the report, maybe we should make some sort of table with the results if people are interested in playing Youtube at different resolutions and bitrates.
About your CPU, it is more than 2 times faster than x230 has that we discussed above. I had similar one on desktop PC and watching youtube was fine. It will drop frames on 2x from time to time (during other work on the second display), but more or less OK.
After I upgraded to 11-Gen (like 3 times faster) I noticed significant improvement of smoothness of playback. And both players were not dropping frames, just xorg was rendering them faster (maybe finally giving me real 60fps). So, this level like i7-3840QM I would describe as a minimum required for today.

Completely agree, as I mention above in my message, frame drop is not all but it is bare minimum of calling something “working”. Another thing is smoothness, that is probably about xorg being able to actually redraw the screen at least 60 times per second for 60fps videos.

I have used multiple laptops both new(latest that I used has an i7-1280P with 6p cores and 8e cores so more than powerful enough) and old with qubes and on all laptops playing a 1080p video without losing a frame(at 30fps) is impossible.

1 Like

This is at odds with other users experience.

I’ll say again - this is wildly off topic, and possibly suitable for
splitting to another thread.
Whether it’s worth doing so? I don’t know.

There will be users who value playing games over security: there will be
users who value playing smooth YouTube at full screen at x2 speed over
security. Those are priorities that they set, and that they are happy
with.

Each user has to decide what their needs are, what they want from Qubes,
and what their budget and hardware availability is.

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.

Done.

That’s true, no arguing.

My point being that when somebody is asking “Should I use Qubes?” we should point them at a drastic video-playback performance degradation when one moves to Qubes OS from any common GNU/Linux.
It will minimize the chance of dissapointment in case they value video playback a lot.
Saying that youtube works perfectly well in Qubes OS is simply not true.
Now I see that it does not work well on both old CPUs and even newest ones as @vxc and @cristiioan said. I checked it myself:

I checked the video on my 11-Gen Intel CPU. I thought that I finally have decent 1080p@60 playback in Qubes OS (not even dreaming of 4K, of course), but that video provided strong evidence that I do not. The video is played without frame drops but panning is quite choppy.
I can notice the difference especially well if I make the video/browser window very small, than it finally will become smooth.

So, the issue is indeed in X11/Qubes itself: even without frame drops it is not possible to play youtube smoothly. We probably have to wait another 5-10 years for real smooth experience of 1080p@60 on some latest CPU in Qubes OS.

I hear what you say.
As you’d expect, I think you are over stressing the extent of any
“degradation”.
For most users who come to qubes in my experience, video playback is not
an issue.(Or perhaps it is, but they just accept it and move on.)

What’s special about this use case?
Should we highlight problems with (e.g) Video editing? Mixing? 3d
modelling? Large dataset manipulation?
There are cases with all of these where Qubes will struggle.

In my experience people who come to Qubes for what it can offer,
security through compartmentalisation, accept limitations if they come
across them.

I never presume to speak for the Qubes team. When I comment in the Forum or in the mailing lists I speak for myself.
7 Likes

Or alternatively they’ll just wonder if it’s something specific to the combination of their hardware and qubes.

I’ve learned to be careful with audio; if it starts to stammer because I forgot and tried to play audio in two different qubes, I’ll not be able to get it to stop short of rebooting the machine. (There seems to be no way to reset the controller.)

Hardware limitation anfd/or Qubes? I have no idea.

I just deal with it.

1 Like

What is special? The huge difference that make playing videos special is that Video editing, 3d modelling and etc - are niche activities, not for everybody.
And watching video is quite the opposite - everybody does it and people expect it to work properly, at least on reasonably modern hardware.

So, everybody should know in advance that watching videos (not only youtube but any videos) will be a problem in Qubes OS, especially on a laptop (due to limited cooling).

And I am talking about lowest possible HD resolution - 1080p, because proper 4K playback is not reachable for Qubes OS at all, even on any high-end mass market CPU. It should be made clear for new users to avoid possible disappointments.

I’ve been using Qubes Os for more than 5 years and I never had any problem watching and creating YouTube videos even on my old x200 ThinkPad.
I can confirm that watching YouTube Videos on my powerful Desktop computer with the I9-12900K is not really a problem for me since I do many things that requires much more power. :slight_smile:

While you can have some problems, that do not necessary means it is the case for everyone.

Btw, 1080p is not the lowest resolution “possible”. The lowest HD resolution is 720p (1280 x 720 pixels)

1 Like