flowblade icon indicating copy to clipboard operation
flowblade copied to clipboard

SDL2 support

Open lgbaldoni opened this issue 6 years ago • 10 comments

How are things wrt SDL2? Some distros don't support 1.2 anymore and it's getting complicate to package flowblade.

lgbaldoni avatar Feb 06 '19 12:02 lgbaldoni

So now that we have 2.0 out we can actually start doing something about this again. The plan is to get this done in 2019.

The problem was that SDL2 removed the API used earlier for video overlay and the new API didn't provide the functionality needed, mainly the embedded video display didn't resize with the xwindow it was paired with. I'll try that again first, but there could be a need to find alternative approach.

jliljebl avatar Feb 06 '19 16:02 jliljebl

Not to stop you from porting to SDL2, but this might be interesting:

https://www.youtube.com/watch?v=3uVmUCuJpF4

eszlari avatar Mar 14 '19 11:03 eszlari

@eszlari Thanks, this is interesting. Not sure if this will help because SDL2 removed the YUV overlay API, but I will try to see if this can be made to work.

jliljebl avatar Mar 14 '19 14:03 jliljebl

Shouldn't Flatpak be able to correct this? Or is SDL such a basic lib that it's assumed on any distro?

DroWnThePoor avatar Oct 14 '19 21:10 DroWnThePoor

@DroWnThePoor: We want to migrate to SDL 2 for other reasons, and aren't just being dragged along by the distros. As such, Flatpack probably won't help in this case. See the following issue links for the rationale behind wanting to use SDL 2 (basically gamma issues):

https://github.com/jliljebl/flowblade/issues/309 https://github.com/jliljebl/flowblade/issues/662

ratherlargerobot avatar Oct 26 '19 21:10 ratherlargerobot

@DroWnThePoor They changed the API for SDL2. You cannot do everything with SDL2 that you could do with SDL1.2.

We may even need to drop SDL for video display all together.

jliljebl avatar Oct 27 '19 10:10 jliljebl

Any news on this? MLT plans to remove SDL1 in v7.0:

https://github.com/mltframework/mlt_web/blob/master/changes/todo.md

eszlari avatar Feb 09 '21 07:02 eszlari

Ah, ok.

I got SDL2 video display working and have the branches still available https://github.com/jliljebl/mlt/tree/sdl2 and https://github.com/jliljebl/flowblade/tree/sdl2 but the performance was really bad because of some software function inside SDL2. I needed to call SDL_UpdateYUVTexture() per frame which might have been reason for bad performance.

I'll bring the branches up-to-date next week and start from there. Maybe there has been some performance improvements.

Plan B was to use SDL2 for its intended purpose of being a OpenGL helper library and display frames as OpenGL textures instead, there was some code in I think Shotcut that turs MLT frames in to OpenGL textures that could used as model to get this going.

Good thing is that I have solved the workflow, GUI configuration, look'n'feel issues I think needed to be addressed and the Python3 port done so this can be made a full priority.

I can post info on progress here every now and then.

jliljebl avatar Feb 09 '21 13:02 jliljebl

Any traction on this ?

luzpaz avatar Jul 30 '23 14:07 luzpaz

Currently looks like SDL2 does not support displaying video on top of individual widgets, only full window video display. I'll do additional tests before year's end to make sure that this the case.

jliljebl avatar Aug 08 '23 06:08 jliljebl