Improving video playback speed?

I still would recommend smplayer (it will automatically install mpv backend). Because it has GUI including buttons for average users and more functions for advanced users. Also FLOSS and also available in fedora fusion repos.

1 Like

@rustybird

After upgrading to 4.2 and running the same VM (with up-to-date template), I am getting this:

 mpv video.mp4 
 (+) Video --vid=1 (*) (h264 640x360 29.970fps)
 (+) Audio --aid=1 (*) (aac 2ch 44100Hz)
[vo/x11] Warning: this legacy VO has bad performance. Consider fixing your graphics drivers, or not forcing the x11 VO.
[W][00055.676183] pw.conf      | [          conf.c:  939 try_load_conf()] can't load config client.conf: No such file or directory
[E][00055.676484] pw.conf      | [          conf.c:  963 pw_conf_load_conf_for_context()] can't load default config client.conf: No such file or directory
AO: [pulse] 44100Hz stereo 2ch float
VO: [x11] 640x360 yuv420p
AV: 00:00:00 / 00:02:15 (0%) A-V: -0.000

and the video does not play at all. I can only scroll back and forth in it with the arrow keys.

Others report they cannot play YouTube videos.

Do you have any idea what is going on?

OK, after wasting several hours on this, the simplest solution turned out to be:

  • Reinstall debian-12-minimal template, thus getting rid of stuff which the upgrade installed in templates (including pipewire)

  • Clone the template to debian-12-player

  • In the clone:

apt-get install --no-install-recommends thunar mpv pulseaudio-qubes
  • Configure mpv in the AppVM based on debian-12-player:
$ cat ~/.config/mpv/mpv.conf 
vo=x11
profile=sw-fast
  • Enjoy again full screen 1080p flawless playback
1 Like

Can you really confirm that playing this video in 1080p (e.g. downloaded with yt-dlp), after 0m20s you see absolutely-NOT-jumpy panning?
Sounds hard to believe, can it be that you simply do not expect too high smoothness in the first place and consider “a bit jumpy” as “flawless”?

That’s kind of extreme test. The city panning part is jumpy in full screen (but still watchable). Almost flawless with window sized to 1/4 of the screen area. However, I don’t think one would watch such scenes on a regular basis, e.g. in a movie. If one does, the main issue will be visual hypnosis :slight_smile:

A recent observation (testing mpv in RAM-based qube, as usual, not with a special video):

vcpus=4 makes the video playback choppy at x1.33 speed
vcpus=2 - smooth playback even at higher speeds

During both tests there are no active CPU loads in other qubes.

The physical CPU cores are 4.

what do you have with 3? Assigning all cores to a single qube is a bad idea, the hypervisor requires some CPU to work

what do you have with 3?

Smooth playback.
However, I have no idea how to measure which is better. Have you?

Assigning all cores to a single qube is a bad idea, the hypervisor requires some CPU to work

I understand that, but, assuming the UI is correct, it is not assignment of cores (physical ones) but “vcpus”, i.e. some form of resource allocation scheduling rather than direct mapping of pCPU to vCPU. Or am I reading this incorrectly? Otherwise it would be impossible to have e.g. 20 VMs with 2 vcpus each.

You are right

What is the correct way to have a quantitative measure whether vcpus=X is more or less efficient than vcpus=Y?

By efficient I mean balanced usage of resources that doesn’t result in any qube suffering from impediments.

1 Like