Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Frequent crashes when playing high-res videos #924

Open
rmader opened this issue Apr 23, 2024 · 8 comments · May be fixed by #925
Open

[Bug]: Frequent crashes when playing high-res videos #924

rmader opened this issue Apr 23, 2024 · 8 comments · May be fixed by #925
Labels
bug Something isn't working

Comments

@rmader
Copy link
Contributor

rmader commented Apr 23, 2024

Describe the bug

I made a post with 4k@60fps test videos here: https://floss.social/@rmader/112320017496066938

Right now playing these does not work well. If it works it takes long to start - and in many cases it doesn't start at all or crashes for me. This seems to mainly have to do with the download process: once the videos where downloaded successfully, things seem to work reliably.

These are likely Gstreamer etc. issues, but I wanted to have a tracker bug here as well to refer to.

Steps To Reproduce

  1. find and open the post at https://floss.social/@rmader/112320017496066938
  2. try to play the videos

Logs and/or Screenshots

No response

Instance Backend

I'm not sure / Other

Operating System

Linux

Package

Flatpak

Troubleshooting information

Tested with Flatpak and manually compiled from main.

Additional Context

No response

@rmader rmader added the bug Something isn't working label Apr 23, 2024
@GeopJr
Copy link
Owner

GeopJr commented Apr 23, 2024

I haven't looked into this yet but for completion:

Ideally, I'd rather we streamed these rather than downloading them and then playing them but it's blocked by https://gitlab.gnome.org/GNOME/gtk/-/issues/4062 which is blocked by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/724

@rmader
Copy link
Contributor Author

rmader commented Apr 23, 2024

Ideally, I'd rather we streamed these rather than downloading them and then playing them but it's blocked by https://gitlab.gnome.org/GNOME/gtk/-/issues/4062 which is blocked by https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/724

Ah, that's great to know, will put that on my list to look into.

@Rafostar
Copy link

Rafostar commented Apr 25, 2024

Ideally, I'd rather we streamed these rather than downloading them

Hi, I dunno how Tuba would feel about using 3-rd party stuff, but it could technically use/integrate Clapper in its UI for playback, which:

a) Can actually stream video like this without the need to download (which seems inefficient for social media client - and video from this issue doesn't seem to crash caused by download since there is no download)
b) Can stream with working seeking Peertube videos (both HLS and MP4 - your issue #662) - you just have to replace https:// URI scheme with peertube:// to let it understand that this website hosts peertube
c) Has VALA bindings support (working example/test app here)
d) Has overall more features (more expanded APIs then GtkVideo which is very simple/minimalistic)
e) Lets you customize/build your own overlay playback controls panel with buttons/features that best suit your app if needed

Someone asked me to let you know about possibility. Please just ignore this comment if uninterested.

Cheers!

@rmader
Copy link
Contributor Author

rmader commented Apr 25, 2024

Hey, thanks for dropping this here. I didn't have a deep look at the Clapper lib yet, but I think it's worth thinking about. In order to make the tech stack not too complicated, I further wonder if parts of the clapper libs could be upstreamed to Gstreamer or GTK instead - or if existing components could be improved to take over the job.

@Rafostar
Copy link

Rafostar commented Apr 25, 2024

upstreamed to Gstreamer or GTK instead

This issue is probably not gonna be best place to discuss this. I cannot find the link anymore, but I were told by one of GTK Devs (I think it was few years ago already) that GTK gives GtkVideo as something simple and more of a example then fully featured video player, and they are not interested to make and maintain something bigger then that as part of their Toolkit (comment which I fully understand and actually agree with).

GStreamer on the other hand already gives a playback API (GstPlay) which is more universal for other GUI toolkits and works differently (its a whole different API, without any sort of GTK integration/shared widget functionality - lots of stuff needs to be redone in app) then the one I did to optimize/target GTK specifically. They cannot be "merged" without breaking API/ABI compatibility and they won't want to maintain multiple APIs that do something similar but differently.

So yeah, I do not think this is gonna belong anywhere but inside its own repo, similarly like libadwaita. That is also why I am not gonna force anyone to use it 😄

Edit: Also, isn't this too early to even start a discussion on this topic? 🙃

@GeopJr
Copy link
Owner

GeopJr commented Apr 25, 2024

From Tuba's side, I'm very interested in using clapper, especially if it solves issues with streaming and #749 (@rmader that might interest you too, I can't reproduce it on qemu or desktop 🤷)

@rmader
Copy link
Contributor Author

rmader commented Apr 25, 2024

Turns out that https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/724 has long been fixed (in Gst 1.22.1, i.e. old stable), so maybe we can already enable it with just a few lines changed.

@rmader rmader linked a pull request Apr 25, 2024 that will close this issue
@rmader
Copy link
Contributor Author

rmader commented Apr 25, 2024

Hm, just opened #925 which (IIUC) enables streaming - and seems to solve the issue here 🤷

Unfortunately we're loosing the cache then, I wonder if we can improve on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants