Wayland not supported yet
I'm trying to run flowblade on Fedora 25, which uses Wayland instead of X11.
I'm getting this traceback:
Selected color detected
BG color detected
Traceback (most recent call last):
File "flowblade-trunk/flowblade", line 78, in <module>
app.main(modules_path)
File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/app.py", line 287, in main
launch_player()
File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/app.py", line 439, in launch_player
editorstate.player.set_sdl_xwindow(gui.tline_display)
File "/media/storage/dev/flowblade/flowblade-trunk/Flowblade/mltplayer.py", line 91, in set_sdl_xwindow
os.putenv('SDL_WINDOWID', str(widget.get_window().get_xid()))
AttributeError: 'GdkWaylandWindow' object has no attribute 'get_xid'
Yes, Flowblade uses MLT SDL consumer to display video and this does not work on Wayland.
Wayland support will be added in summer/autumn 2017, it will require quite a bit of work to get done and cannot be added to 1.12.
The WORKAROUND is to use X11 session when running Flowblade. X11 session is available in Fedora 25.
It IS currently summer 2017. For me, at least. :-P
Any news of correction?
Timetable for Wayland support is still autumn 2017 or later unless we receive contributions.
Hey, new user here.. I've just hit this on Fedora 26. I look forward to Wayland support, but I'll use X11 in the meanwhile.
It seems that you might be able work around this by forcing flowblade to use x11 gdk backdend. That way the application will be run under Xwayland.
By starting flowblade with GDK_BACKEND=x11 flowblade I can get trough the error on first post. However I got struck by issue #445, so I still couldn't get flowblade to start, and test this properly.
@kppmsd thanks for the pointer. I don't have Wayland capable system yet, neither my laptop or desktop run Wayland, but as soon as I have one I will test. If someone else has Wayland system, I would be interested in observed results for trying "GDK_BACKEND=x11 flowblade" to start Flowblade.
I have Wayland and above command launches Flowblade correctly. I see only a warning in the terminal (don't know if it's releated to Wayland):
[swscaler @ 0x7fb268240ce0] Warning: data is not aligned! This can lead to a speedloss
@fedelibre Thanks, I updated FAQ too.
Now we have two workarounds:
-
Start Flowblade from terminal with command:
GDK_BACKEND=x11 flowblade
-
Use X11 session when running Flowblade.
You could also add the environment variable to the Exec= line in flowblade.desktop file with:
Exec=env GDK_BACKEND=x11 flowblade %f
That works on wayland, and should also work just fine on Xorg.
@kppmsd When I add Exec=env GDK_BACKEND=x11 flowblade %f to the desktop file and run it, it starts fine. However, when you wanted to save a project, it says "permission denied".
Looks like a file permission issue to me. @gurumark are you sure it is related to Wayland vs. X11?
Yes, it is a permission issue. Flowblade is installed under /usr/share/menu/ and owned by root.
When I run flowblade as sudo flowblade... I am not getting any errors.
Should be owned by some other user. Is it the reason producing "permission"? What should I do to be able to save the project?
Yes, it is a permission issue. Flowblade is installed under /usr/share/menu/ and owned by root.
I don't think this has anything to do with Flowblade source code so I can't do patch to fix this, this is an issue with particular installation in particular distro. If you are using the setup.py script to install Flowblade the results are unknown to me, it may work, it my not, setup.py is present for .deb packaking.
/usr/share/menu/ is not a lauchscript supported installation location, see here: https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/flowblade
You're right. It turns out that because I was using "sudo flowblade" to run it in the first place, it was saving the file as root. Then I changed it my local user and tried to save the same file. That's why I got the permission error. thanks for help me out.
FWIW this workaround is working on Fedora 29 just fine: Using today's 'git clone' version:
cd ~/flowblade/flowblade-trunk GDK_BACKEND=x11 ./flowblade
Note: Don't use flowblade's setup.py on Fedora.
Check https://github.com/libsdl-org/SDL/issues/3739
As of today, on NixOS 21.11, you need the following environment setup in order to run Flowblade under Wayland. It will start with just GDK_BACKEND, but you won't be able to see or do much of anything without SDL_VIDEODRIVER as well.
GDK_BACKEND=x11 SDL_VIDEODRIVER=x11 flowblade
While I'm documenting this here, on this thread, to help the next person, my personal opinion is that it's more of an ask on NixOS packaging team, which I say here
The SDL_WINDOWID method will probably never work in Wayland since there is no concept of window id in that API.
However, the ability to import external wayland surfaces into SDL windows was added in SDL a few days ago. That works quite differently than SDL_WINDOWID.
https://github.com/libsdl-org/SDL/blob/main/docs/README-wayland.md contains a full example using Qt but doing the same with Gtk should not be a major issue. However, it may not be possible to implement it manually in Flowblade since SDL is entirely managed by the MLT Consumer. Simply speaking, MLT probably needs to be updated to support that new SDL feature.