flathub / io.github.jliljebl.Flowblade

https://flathub.org/apps/details/io.github.jliljebl.Flowblade
2 stars 4 forks source link

GNOME runtime 45 #31

Closed AsciiWolf closed 7 months ago

AsciiWolf commented 7 months ago

Closes #29.

flathubbot commented 7 months ago

Started test build 85457

flathubbot commented 7 months ago

Build 85457 failed

AsciiWolf commented 7 months ago

Build failed on:

/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp: In function ‘std::string MFX::printCodecId(mfxU32)’:
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:3: error: ‘uint8_t’ was not declared in this scope
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |   ^~~~~~~
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:29:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
   28 | #include "mfxloader.h"
  +++ |+#include <cstdint>
   29 | 
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:12: error: ‘data’ was not declared in this scope
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |            ^~~~
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:36: error: ‘uint8_t’ does not name a type
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |                                    ^~~~~~~
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:36: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:43: error: expected ‘>’ before ‘*’ token
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |                                           ^
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:43: error: expected ‘(’ before ‘*’ token
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |                                           ^
      |                                           (
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:44: error: expected primary-expression before ‘>’ token
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |                                            ^
/run/build/mediasdk/api/mfx_dispatch/linux/mfxparser.cpp:60:50: error: expected ‘)’ before ‘;’ token
   60 |   uint8_t* data = reinterpret_cast<uint8_t*>(&id);
      |                                                  ^
      |                                                  )
hfiguiere commented 7 months ago

it's just the usually transitive include issues, ie some headers need be explicitely included with newer GCC. The error message even tells you what to do.

AsciiWolf commented 7 months ago

You're right. :-) I am probably too overworked (or too dumb) lately...

AsciiWolf commented 7 months ago

By the way, it looks like that the MediaSDK project has been discontinued and its repo archived.

flathubbot commented 7 months ago

Started test build 85539

flathubbot commented 7 months ago

Build 85539 failed

jliljebl commented 7 months ago

I was unable to get this build locally. If anyone can get this build with GNOME runtime 45 I'll merge. December probably going to be quite low activity on my part but I'll try January again if we don't this working by then.

AsciiWolf commented 7 months ago

@jliljebl Maybe the --enable-gpl switch for ffmpeg module is the problem? See this page.

We can try using the fd.o platform ffmpeg-full extension instead:

cleanup-commands:
  - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg
add-extensions:
  org.freedesktop.Platform.ffmpeg-full:
    directory: lib/ffmpeg
    add-ld-path: .
    version: '23.08'
    autodownload: true
    autodelete: false
flathubbot commented 7 months ago

Started test build 85717

flathubbot commented 7 months ago

Build 85717 failed

flathubbot commented 7 months ago

Started test build 85731

flathubbot commented 7 months ago

Build 85731 failed

flathubbot commented 7 months ago

Started test build 85769

flathubbot commented 7 months ago

Build 85769 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/68429/io.github.jliljebl.Flowblade.flatpakref
AsciiWolf commented 7 months ago

@jliljebl Could you test the new build? I am currently on a low-end laptop and cannot test it properly. Thanks!

jliljebl commented 7 months ago

@AsciiWolf I got something on trying to run the test flatpak after the install was successful:

janne@bash~$ flatpak run io.github.jliljebl.Flowblade --user
bwrap: Can't mkdir /app/lib/ffmpeg: Read-only file system
error: ldconfig failed, exit status 256

you added:

cleanup-commands:
  - mkdir -p ${FLATPAK_DEST}/lib/ffmpeg

so that is running at the time of first launch. I thought stuff in /app/lib/* would need to be immutable after install.

hfiguiere commented 7 months ago

that's not when cleanup command runs.

But usually for an extension point the best is to do install -d in the post-install usually the main module.

The directory NEED to exist.

flathubbot commented 7 months ago

Started test build 86626

hfiguiere commented 7 months ago

so that is running at the time of first launch. I thought stuff in /app/lib/* would need to be immutable after install.

no it runs in the cleanup phase. The error message is definitely the one when the extension mount point directory doesn't exist.

flathubbot commented 7 months ago

Build 86626 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/69287/io.github.jliljebl.Flowblade.flatpakref
flathubbot commented 7 months ago

Started test build 86639

flathubbot commented 7 months ago

Build 86639 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/69300/io.github.jliljebl.Flowblade.flatpakref
AsciiWolf commented 7 months ago

It runs now and seems to work, however trying to render the project results in some tracebacks being printed on stdout:

Traceback (most recent call last):
  File "/app/share/flowblade/Flowblade/editorwindow.py", line 882, in <lambda>
    ('AddToQueue', None, _('Add To Batch Render Queue...'), None, None, lambda a:projectaction.add_to_render_queue()),
                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/projectaction.py", line 829, in add_to_render_queue
    _write_out_render_item(False)
  File "/app/share/flowblade/Flowblade/projectaction.py", line 837, in _write_out_render_item
    args_vals_list = render.get_args_vals_list_for_current_selections()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/render.py", line 75, in get_args_vals_list_for_current_selections
    encoding_option_index = widgets.encoding_panel.encoding_selector.get_selected_encoding_index()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/rendergui.py", line 532, in get_selected_encoding_index
    name, encoding = self.categorised_combo.get_selected()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/guicomponents.py", line 3702, in get_selected
    indices = self.model.get_path(self.widget.get_active_iter()).get_indices()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 1 does not allow None as a value
Saving project...
Saving project...
Traceback (most recent call last):
  File "/app/share/flowblade/Flowblade/editorwindow.py", line 885, in <lambda>
    ('Render', None, _('Render Timeline'), None, None, lambda a:projectaction.do_rendering()),
                                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/projectaction.py", line 802, in do_rendering
    success = _write_out_render_item(True)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/projectaction.py", line 837, in _write_out_render_item
    args_vals_list = render.get_args_vals_list_for_current_selections()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/render.py", line 75, in get_args_vals_list_for_current_selections
    encoding_option_index = widgets.encoding_panel.encoding_selector.get_selected_encoding_index()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/rendergui.py", line 532, in get_selected_encoding_index
    name, encoding = self.categorised_combo.get_selected()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/guicomponents.py", line 3702, in get_selected
    indices = self.model.get_path(self.widget.get_active_iter()).get_indices()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 1 does not allow None as a value
Saving project...
Saving project...
FileRenderPlayer started, start frame: 66, stop frame: 67
FileRenderPlayer stopped, producer frame: 68
Saving project...
Traceback (most recent call last):
  File "/app/share/flowblade/Flowblade/editorwindow.py", line 882, in <lambda>
    ('AddToQueue', None, _('Add To Batch Render Queue...'), None, None, lambda a:projectaction.add_to_render_queue()),
                                                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/projectaction.py", line 829, in add_to_render_queue
    _write_out_render_item(False)
  File "/app/share/flowblade/Flowblade/projectaction.py", line 837, in _write_out_render_item
    args_vals_list = render.get_args_vals_list_for_current_selections()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/render.py", line 75, in get_args_vals_list_for_current_selections
    encoding_option_index = widgets.encoding_panel.encoding_selector.get_selected_encoding_index()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/rendergui.py", line 532, in get_selected_encoding_index
    name, encoding = self.categorised_combo.get_selected()
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/share/flowblade/Flowblade/guicomponents.py", line 3702, in get_selected
    indices = self.model.get_path(self.widget.get_active_iter()).get_indices()
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Argument 1 does not allow None as a value
Exception in thread Thread-7:
Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/app/share/flowblade/Flowblade/singletracktransition.py", line 709, in run
    self.rerender_window.render_next()
  File "/app/share/flowblade/Flowblade/singletracktransition.py", line 600, in render_next
    clip, track = self.rerender_list[self.current_item]
                  ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

And the actual rendering process seems to do nothing. But it may be some problem related to my low-end laptop GPU.

@jliljebl Could you retest the new build? Thanks!

jliljebl commented 7 months ago

@AsciiWolf thanks for the update. Now application launches, and I was able to do a render. I think the:

Traceback (most recent call last):
  File "/usr/lib/python3.11/threading.py", line 1038, in _bootstrap_inner
    self.run()
  File "/app/share/flowblade/Flowblade/singletracktransition.py", line 709, in run
    self.rerender_window.render_next()
  File "/app/share/flowblade/Flowblade/singletracktransition.py", line 600, in render_next
    clip, track = self.rerender_list[self.current_item]
                  ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

is because we lost the H.264 / mp4 encoding option with the update.

So there are some issues.

1) LADSPA filters missing

MLT service ladspa.1213 not found.
MLT service ladspa.1904 not found.
MLT service ladspa.1903 not found.
...

2) A lot of encoding options are missing now like h264, HEVC an NVENC that was present in my system. I think this is related to ffmpeg being updated from 5.x -> 6.0 which in my system also resulted in losing NVENC stuff.

I believe the situation is now that the flatpak update to GNOME runtime 45 and ffmpeg 6.0 works fine but Flowblade encoding parameters and maybe MLT need to be updated to not lose functionality when doing this update.

Unfortunately I have an annoying flu going on right now and will get back to bed after writing this comment. I'll post next update on on Tuesday, hopefully flu has cleared up by then.

jliljebl commented 7 months ago

I pulled this PR to test stuff locally and tried to get only the Gnome 45 + Python 3.11 + Intel Media SDK include update build as Flatpak, but that failed with something when compiling ffmpeg.

Flatpak build as-is from this PR loses quite a lot of functionality. This is first time for Flowblade that this happens, MLT has always been very good at updating for ffmpeg versions, but now for ffmpeg 6.0 we are losing all GPU encoding and the default H.264 / mp4 encoding we had.

The problem is not limited to this Flatpak build, on my Ubuntu 23.10 with MLT 7.18.0 + ffmpeg 6.0 I lose the all GPU encoding, but H.264 / mp4 still works there.

I'll need to figure out what's going on before attempting any updates. I'll work towards a fix for Flowblade 2.14 coming in about 4 months, so I'll close this PR.

@AsciiWolf thanks for the work and the Intel Media SDK fix. I can use this as a starting point as I work through the development cycle, I may need to do some Flowblade code updates to actually get all the functionality back.

AsciiWolf commented 7 months ago

No problem. I am glad I could help. :-)

Regarding Intel Media SDK (that was discontinued this year), it looks like that Kdenlive is switching to using Intel oneVPL instead:

https://github.com/flathub/org.kde.kdenlive/pull/292/files#diff-42a5057622e628a20adb9f2d8f5123a5b0144d93f06818a8e86fa64ab81d1fd5L575

Maybe it could also be used with Flowblade?

jliljebl commented 7 months ago

https://github.com/flathub/org.kde.kdenlive/pull/292/files#diff-42a5057622e628a20adb9f2d8f5123a5b0144d93f06818a8e86fa64ab81d1fd5L575

Maybe it could also be used with Flowblade?

Thanks, this is very likely the way to go.