floss.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
For people who care about, support, and build Free, Libre, and Open Source Software (FLOSS).

Administered by:

Server stats:

685
active users

Friends of energy efficiency - the Light Video 0.1.0 update is out, build with 4.14 and 1.24.1.

This should be the first app targeting the / FDO desktop enabling Wayland video offloading (think zero-copy playback) by default. In many cases (actually more than I expected) this can improve battery lifetime - and on low-end devices even playback performance - significantly.

flathub.org/apps/org.sigxcpu.L

This is kinda a technology preview in order to see if we can ship features like this enabled by default in a lot more apps in the ecosystem.

Thus I'd be very super happy if you'll try it on lots of hardware - be Intel/AMD laptops or ARM64 devices (with V4L2 stateless decoders, such as most devices).

Chances that you really hit a zero-copy path are highest with a recent compositor - i.e. if you are using , or a recent version of , , etc.

Robert Mader

Note that there are still a number of limitations to offloading to KMS/display controllers. In these cases Livi should fall back just fine and will just be less efficient.
I hope we can lift them step by step. A few of them being:
- only hardware decoded video, not sw decoded
- only VA-API or V4L2-stateless, no V4L2-stateful or Vulkan yet (but at least the later should fall in place naturally)
- depending on the compositor and hw: only if the display dimensions match the video, e.g. 16:9

As well as only working when nothing is rendered on top of the video, like overlays, subtitles etc. Note that this limitation comes purely from HW/compositors - from the app side it is supported and works quite well on e.g. , which already implements sophisticated hw plane management.

I guess I should have elaborated a bit more why and what for I'm asking for testing. So my main goal is to find remaining cases where the output looks like one of the attached images, which are complete deal breakers for users.

These are usually driver bugs - in Mesa or the kernel - and optimally should get reported accordingly. But if you see something like this are you are not sure where to report it - please feel free to DM me!

If you want to check whether Livi is actually using zero-copy, there's unfortunately not one single way, but different ones depending on the hardware and compositor you use.

One Intel or AMD a simple way is to use intel_gpu_top or radeontop via ssh and check whether the 3D parts of the GPU are reported being idle, such as in the first post.

If you run Gnome, you can enable the opaque region overlay, which draws green or purple overlays over the content whenever Mutter is compositing - and shows the content normally when doing direct-scanount / zero-copy.

You can enable it via alt+f2 -> "lg" -> "Flags" -> OPAQUE_REGION

When things work correctly, you should get a purple overlay when in windowed mode or player controls are visible - and a normal image when fullscreen without controls.

This means Livi/GTK offloads the video and draws controls etc. in an overlay (that's mostly transparent). Mutter doesn't support multiple hardware planes yet and has to fall back to compositing. But if only the video is visible, it can pass things through.

If the whole player is either greenish or there's no overlay at all, despite controls being visible, that means that GTK is not offloading but drawing the video via GL/VK. Mutter may or may not be able to use direct-scanout in this case.

@rmader Gnome really needs a video player since Totem is deprecated. Could this be its successor?

@user8e8f87c livi is very minimalistic in its approach and mainly targets mobile. There are a few others that are maybe more feature complete - or we find some hero to port Totem to GTK4 and do some modenizations.

@rmader @user8e8f87c I'm also using livi on TV, tablet and laptpop 😃

@rmader ah yeah I get the greenish tint unfortunately. I'm on a Lenovo Yoga 920 with Intel UHD 620 graphics and running Fedora 40 fwiw. :)

@rmader

Running Recently updated PmOS Edge with Plasma Mobile 6 on a PinePhonePro, it opens the video file, showing the first frame, but clicking play doesn't do anything. The video doesn't update and the seek bar stays at timecode 0:0. Very occasionally if I tap on the seek bar, the image will update one more time. No overlay visible, but the video just doesn't play. The rest of the UI is responsive. I tried with Big Buck Bunny in both .m4v and .ogg.

@simran If I understand you correctly your question is which live-CD with Gnome 46 allows you to install a flatpak from flathub? Can't say for sure, but I guess if Fedora doesn't work you could try os.gnome.org/ or Ubuntu 24.04.

os.gnome.orgGNOME OS NightlyTry the latest and greatest GNOME software in a VM or on real hardware

@rmader Yes, I'd like to test the video offloading on various devices (that have Windows or macOS installed) quickly, but installing Livi on a live Fedora looks like a major rabbit hole. I didn't find anything about running Gnome OS from a stick but I will try Ubuntu next. Thanks!

@simran Nice, looking forward to hear back about the results! Competing with or rather outperforming Win and MacOS is exactly the goal here :)

Note that there are further improvements in the pipe, notably lifting the restriction that the videos width/height ratio has to match the screen for zero-copy (gitlab.gnome.org/GNOME/gtk/-/m). I.e. testing devices with 16:10 screens or unusual video sizes is expected to not be optimal yet.

GitLabDraft: wayland: Add single-pixel-buffer offload optimization (!7057) · Merge requests · GNOME / gtk · GitLabThis is a simple PoC for replacing the buffer of the main surface with a black single-pixel-buffer when the window is fullscreen and a subsurface is on top,...

@rmader That's a good reminder, I need to check what the aspect ratios are of some of the devices and get matching test videos!

@rmader Live Ubuntu allows me to install Livi. Was able to run it after `sudo chmod u+s /usr/bin/bwrap`. Can't play AVC videos though under X11 (expected?). Commented out `WaylandEnable=false` in /etc/gdm3/custom.conf and ran `systemctl restart gdm3` - wayland is reported by `echo $XDG_SESSION_TYPE`. Livi does play the files but it's broken, 3x black and white. Terminal msgs might indicate use of iGPU instead of Nvidia card. Driver is nouveau, can't seem to install Nvidia drivers using live USB.

@simran Uff, interesting!
First of all: zero-copy playback is a only feature - in fact it's one of the things that originally motivated its creation in the first place as it's not feasible on desktops.

Secondly: If your driver is blocklisted for Wayland, then I wouldn't expect anything to work, especially no advanced features.

That being said, it would be interesting if the issue you are seeing is actually even related to zero-copy playback - or if this is regular gl.

@simran Could you check if other players actually do better? Such as the default player Totem, Clapper, Glide, MPV or Celluloid?

@rmader In my test, the Intel iGPU was apparently used (Clapper, MPV, and Glide show Video activity in intel_gpu_top), but with the display connected to the dGPU. With BIOS settings to use the dedicated Nvidia card only, Livi works okay but warns that it doesn't use HW accel and gives up as soon as it encounters a glitch in one of my test files whereas other players show artifacts but continue playback. I have yet to try iGPU-only with the cable plugged into the mainboard.

@rmader Under X11, Celluloid and QMPlay2 didn't show anything in intel_gpu_top. nvtop seems to require the proprietary drivers, unfortunately. Videos/Totem didn't play any of my test files (Intel iGPU and Nvidia dGPU), partially due to missing plugins (even after `sudo apt install ubuntu-restricted-extras`), but other times not even reporting an error and only showing a broken camera icon. Clapper crashes under Wayland, MPV Wayland as well with my own footage but not a Big Buck Bunny sample.

@simran Thank for that feedback - unfortunately I have to say that I don't think it makes sense to test much more on devices where things are so broken. It only makes sense on setups where the basics are in place - i.e. where most players can already properly play with hw decoding.

@rmader Yeah, the Intel driver seems kinda bad. GTK menus glitch out every now and then, for instance (not limited to Livi). With the BIOS set to the iGPU and one display connected to the mainboard, players behave differently, e.g. intel_gpu_top no longer reports Video activity for any of the apps that previously did. Now it's a lot of Render/3D. Livi rejected most files because of missing plugins suddenly. The green overlay disappeared in fullscreen mode with multiple players, though.