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
Crashes loading subtitles with playbin3 or pipewire enabled #258
Comments
ATM the borrowed GStreamer API that is used internally (part of the player), has a lot of racy issues some of them are subtitles loading related. I do plan to write my own one instead and make it public in near future. It will be easier then to pinpoint where the issues are happening and fix most of these along the way.
Currently the underlying stuff in Clapper is ongoing a major rewrite. I do plan to split this project into 3 independent things that are compiled and installed separately (GStreamer video sink, a playback API, GTK4 UI that uses the first two). Right now I finished the video sink recently. It works differently and doesn't renegotiate/unlink sinkpads, possibly avoiding this bug. Also worth mentioning here is that old VAAPI GStreamer plugins hit all sort of issues (including displaying of subtitles). Please make sure you have GStreamer VA plugins installed (new and improved VAAPI implementation). Arch linux ships them in a separate package: gst-plugin-va. |
So first crash you hit is playbin3 related. Might be worked around/fixed by using player with the new sink. Needs some testing. Second is a bug that seems easy enough to fix that it should be worth fixing still in the old API. |
Ah thank you. I enabled it due to the freezing issue with playbin2 when loading subtitles. I'll keep it disabled then.
Thanks for the explanation.
Thank you. I read the wiki entry and was wondering whether a separate package was needed for that. I will ask the AUR maintainer to add it as optdepends, it only has the gstreamer-vaapi package https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=clapper#n49 I'll try va and see if there are any improvements.
Thanks! |
On an unrelated note, looks like the newer plugins (vah264dec) are having issues for me. The video is tainted green but the older ones seem to work fine. But the issue is still present with playbn2/3. Could be this issue https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1513 but unlike the report it's the entire video for me. If I do a
Not sure if this is related, I'll see if I can report both issues. |
I updated the additional GStreamer elements. So this plugin is now mentioned in install commands.
Using the git Clapper version with CLAPPER_USE_LEGACY_SINK=1 clapper With this env, it should print a warning that old sink is being used. |
Please Test with command from above. If the problem appears with both old and new sink, then its most likely a |
Ok, checking with git now. That was with 0.4.1. |
Then its not new sink bug 😌 , as new sink is available (and used) only in git. |
New sink is fully usable without the player, so something like this might be easier for debugging: GST_PLUGIN_FEATURE_RANK=vah264dec:300 gst-play-1.0 --videosink=clappersink "/path/to/video.mp4" If this still happens even in new sink (probably), please open this as an VA issue on GStreamer gitlab - they now use a single repo. Worth mentioning that this works fine with older VAAPI. This is a different issue then subtitles, so this one issue here should stay open. |
Thanks. With that command, the issue occurs with clapper-git; 0.4.1 seems to work fine when launched through that. So I guess I should report it? |
When it does not exists |
Yep same issue with |
The first one is meant for hash tables comparisons and does not guard against NULL values (#259).
With 0.5.1, it doesn't crash anymore but the playback freezes in both cases (with playbin3/without) and doesn't resume. |
I am not closing this for a reason. I only fixed the cause of the crash with playbin3 for 0.5.0. Still have plans to redo the whole API for 0.6.0.
Any errors/warnings printed? Check with |
Do you need the entire log? It's quite big, these are the last few lines. I think enabling Pipewire has a part in the freeze; since below there cases freezes playback. It only works with Playbin 2 and no pipewire. Playbin3 & Pipwire
Playbin2 & Pipewire
Playbin 3 without Pipewire:
|
How do you open subtitle file? Right now I would go with opening a video then once video plays open subtitle file. Also experimental options like The logs indicate the racy problem of opening video + subtitles at once. I.e. should be avoidable to some extend by opening video first and then subtitles file. Otherwise what you are hitting here is a racy issue of opening both at once I have scheduled fixing for Clapper 0.6.0 as part of major API rewrite I mentioned earlier. 0.5.0 focused on introducing new |
I don't open them at once though. I let the video play, then open it. Maybe I need to wait a bit more? Screencast.mp4It sometime gets stuck at the time it last played like 00:00:03 as well. |
Currently I recommend using this combination anyway (no experimental options). Once the Clapper API rewrite happens, it will be easier to pinpoint the issue. Currently I get a feeling that its a mix of different issues combined causing this. |
The backtrace doesn't look very useful. I built clapper with debug symbols but gdb doesn't take
/usr/bin/clapper
, had to launch it through gjs under gdb...Here is another:
Steps to reproduce:
With playbin3 disabled it doesn't crash but the playback freezes and sometimes doesn't load.
I couldn't reproduce with current git master under gdb. So not sure if this is fixed already.
System:
Arch Linux
GNOME 42 Wayland
gjs 1.72.0
Clapper 0.4.1
The text was updated successfully, but these errors were encountered: