brunoherbelin / vimix

Live Video Mixer
GNU General Public License v3.0
283 stars 27 forks source link

adding a startpoint to flatpak building #54

Closed felixgonsug closed 2 years ago

felixgonsug commented 2 years ago

Hi, i started writing the flatpak json file. It isn't trivial. Maybe you can use this startpoint to finish it. Its myfirst flatpak build, so its my first aproach. Its failing at the end and giving a lot of warnings. Hope this helps. Later i'll take another look.

brunoherbelin commented 2 years ago

Thanks for the initiative! I'll check this ASAP. Would hopefully solve limitations with snap..

felixgonsug commented 2 years ago

Im trying to build this, but it fails with this error: /usr/lib/gcc/x86_64-unknown-linux-gnu/12.1.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /app/lib/libglfw3.a(x11_window.c.o): undefined reference to symbol 'XConvertSelection' /usr/lib/gcc/x86_64-unknown-linux-gnu/12.1.0/../../../../x86_64-unknown-linux-gnu/bin/ld: /usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/vimix.dir/build.make:1344: vimix] Error 1 make[1]: *** [CMakeFiles/Makefile2:259: CMakeFiles/vimix.dir/all] Error 2 make: *** [Makefile:156: all] Error 2 Error: module vimix: Child process exited with code 2

To build, after installing flatpak and installing the gnom.platform and gnome.sdk flatpaks, run inside /vimix/flatpak the following command: flatpak-builder --force-clean ./build io.github.brunoherbelin.Vimix.json

brunoherbelin commented 2 years ago

Confirmed: same error here and I don't find the solution online... Did you make progress on your side?

brunoherbelin commented 2 years ago

aha! made some improvements (committed to a361762). flatpak-builder succeeds Will have to test

felixgonsug commented 2 years ago

Nice! Didn't have time to take a look. I'll test in the upcoming days and will report.

brunoherbelin commented 2 years ago

Thanks. Should work with tag 0.7.2 :)

I didn't dare creating the flathub repo : if you have experience with this, help is welcome !!

felixgonsug commented 2 years ago

Confirm that the build is working. Cant start SRT broadcasting, theres no option in the share menu.

Never published a flatpak, i'll take a look on how to do that.

brunoherbelin commented 2 years ago

SRT broadcast needs gstreamer bad plugins : this package does not seem to come with flatpak so now I am looking at how to compile it in the flatpak-build...

we'll see when it builds correctly to publish it! https://github.com/flathub/flathub/wiki/App-Submission

brunoherbelin commented 2 years ago

Done: now packaging flatpak with gstreamer (all plugins, base, good bad and ugly), and with SRT and frei0r lib dependencies. Seems to work fine ! :)

Will check how to publish on flathub if you can confirm it works !

felixgonsug commented 2 years ago

SRT reciever is working, but still cant stream. The option is not present on the output window.

brunoherbelin commented 2 years ago

Screenshot from 2022-11-22 22-37-26 humm.. strange... could you please check in the list of gstreamer plugins if 'srtsink' is available ? (about vimix / about gstreamer / details : cf screenshot) And to be sure, are you using latest commit ee79043536c0ff951104463075655e7f5d0d57a8 ?

felixgonsug commented 2 years ago

Screenshot from 2022-11-24 13-28-02

Im in the latest commit yes.

felixgonsug commented 2 years ago

Wrong search, str in placeof srt. Im recompilling now. Will report again soon.

felixgonsug commented 2 years ago
GStreamer 1.20.04
Plugins & features (runtime) :
> srt
 -   srtsrc
 -   srtsink
 -   srtclientsrc
 -   srtserversrc
 -   srtclientsink
 -   srtserversink
> subenc
 -   srtenc
> dtls
 -   dtlssrtpdec
 -   dtlssrtpenc
 -   dtlssrtpdemux
> srtp
 -   srtpenc
 -   srtpdec

Not visible. Any sugestion? I builded again using the --disable-cache option just in case but the result is the same.

felixgonsug commented 2 years ago

Screenshot from 2022-11-24 16-08-10

brunoherbelin commented 2 years ago

Aha ! First, thanks for your patience and perseverance ! Second, thanks for finding this issue ! : I now understood and we can fix it.

Reason: video broadcasting needs two things : an encoder to H264 video stream and a streamer into SRT protocol. You are still missing the encoder ! (on my computer, it found the nvidia HW accelerated nvh264enc, so this was not causing the issue). Sorry I didn't think about that earlier!!

Solution: We need to add x264enc to the package. Its anyway a necessary feature for video recording in H264 !

In practice: We should add a section for compiling x264 library as a "modules" in the json file (like for srt lib). Should be very similar to the srt bloc, but with the git from https://code.videolan.org/videolan/x264 I can have a look later today or tomorrow

brunoherbelin commented 2 years ago

Should be fixed in b10bf06

felixgonsug commented 2 years ago

Fixed! Thaks to you for implementing the flatpak package. If any help is needed just ping me. Im trying to set up an open source VJ + Mapping toolchain with Vimix and splash. They dont implement SRT, they use NDI, but with OBS studio i can convert the stream. Already asked them to implement SRT.

brunoherbelin commented 2 years ago

Aha ! Linking to splash is indeed something I considered, but didn't have time to investigate... And yes, adding NDI support was considered once ; but is not open source so I wanted to make it a plugin : this thus requires to create a new plugin mechanism for vimix !! Always more to do :P

brunoherbelin commented 2 years ago

FYI : checking features of splash, I found that we can directly pipe through shared memory. I created a feature request not to forget this ! #59

felixgonsug commented 2 years ago

Thank you very much for all the work. It will be really nice to be able to connect both softwares directly. I'll follow that FR so i can help in the future.

felixgonsug commented 1 year ago

FYI, splash developer isinterested in adding srt support.