-
-
Notifications
You must be signed in to change notification settings - Fork 8k
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
CI: Create AppImage #1565
CI: Create AppImage #1565
Conversation
The resulting AppImage does not run properly yet, e.g., on Clear Linux OS:
It seems like it is trying to load its resources from You could use |
While always interesting, there have been numerous issues from the people who already attempted and distributed other containerized formats, with less issues then this current PR has. These containerized formats are designed to limit permissions of the containerized application. However due to the nature of OBS it often needs high privileged access, thus running into all the walls that containers are designed to put up. |
Which is why AppImage is a great match, as (unlike other solutions) it does not run in a sandbox or otherwise restrict the application. Inside an AppImage you can do what you want, as an AppImage is just a self-mounting filesystem image (think |
Suggests it is running in a pid namespace. Which does restrict access. |
Well, it means that unlike deb or rpm, which need root rights to get the application installed, the AppImage format does not need this (since there is no installation step). It does not mean that you can't run an AppImage with root rights, if you so desire/need. |
OBS issues are tracked on Mantis: https://obsproject.com/mantis/ |
I see, can you also explain the qt repository you are adding? And the rest of the workarounds in the new script? |
The Qt that comes with Ubuntu 14.04 has a bug in that it tries to load the platform plugins from the wrong location (relative to the user's current working directory, rather than from a location relative to the Qt being used). This has been resolved in more recent versions of Qt. The beineri ppa is a very reliable source for recent Qt versions compiled on older Ubuntu releases, and has been around for years.
Let me go through it:
|
On Discord, https://github.com/obsproject/obs-studio/wiki/Install-Instructions#linux-portable-mode-all-distros was pointed out. To be investigated. But note that it says
Which implies that it, too, will load stuff relative from the current working directory (cwd). |
If I extract the AppImage, But another one:
|
As was pointed out on Discord, And indeed it is looking in "strange" places:
As was pointed out on Discord, the relative path is meant for |
So, I guess that using But is it the cleanest way to go? |
As a workaround,
Seems like we are getting somewhere. Also seems like OBS Studio is making extensive use of At least we are getting somewhere. |
thanks for the work on getting it working, now we will need to test on some other common distributions as the documentation suggests and find someone to maintain the appimage. |
When trying a screen capture:
Argh, there seem architecture-dependent binaries to be hiding in
In any case, such errors seem to be pretty distribution-independent. |
Sure enough, recording works now. 👍 If you want to give it a try: |
Nice! I tested it on Ubuntu MATE 18.04 and one thing I noticed is that the Tools menu is missing these entries: Automatic Scene Switcher, Output Timer, Scripts. These are normally available in the .deb version from OBS PPA. I believe it has something to do with
Other than that all the basic stuff seemed to be working fine: Recording, Screen Capture, Window Capture, VLC Video Source, webcam, mic, etc. |
There is very limited number of cases where need to use OBS on linux. Because of the wrapper any new build cannot be considered as test-build. |
I wouldn't suggest including bazuka's version of the browser source at this point in time. I'd prefer to get our version working at some point -- it should be doable. |
Jim, that's what I meant; Bazukas suggested earlier to probono to include your browser version (can't find where it was) |
probono: check this discussion obsproject/obs-browser#141 |
I was able to run obs-linuxbrowser with no issues at all when using the OBS Studio AppImage, like this:
Once obs-browser runs on Linux, I think we will be able to do the same, or bundle it in the AppImage. |
On my 18.04 Ubuntu system the latest app image linked on this issue provides the ffmpeg VAAPI option. (the test used to check for VAAPI support is here However on my system actually initializing the VAAPI codec fails. libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so has no function __vaDriverInit_0_32
libva info: va_openDriver() returns -1
[AVHWDeviceContext @ 0x25a8d60] Failed to initialise VAAPI connection: -1 (unknown libva error). This is on intel hardware, and the device initilizes fine when run from 22.0.3 normally. |
Seems to be a known issue: intel/media-driver#235 (comment). My OBS Studio build is compiled against I don't know what is the best cause of action here. Can we disable it altogether? Libraries that break backward compatibility are not something I am keen on supporting. |
Funny fact is, nothing in the AppImage seems to be hardcoding What happens if, on the system that shows the problem, you run
On my Xubuntu 18.04 system, I get
but maybe a system with a complete Intel driver setup does have this locally. Maybe we need to not load this if a local version is present? |
This is implemented entirely in ffmpeg, so its not related to anything obs is compiled against. strictly the version of ffmpeg used.
You could compile without VAAPI, but to do so would make the AppImage unpalatable to most users considering how popular hardware encoders are for streamers. |
Let's decide how to best proceed once we have collected some feedback on #1565 (comment) from Intel users. I'd assume that people who know how to use hardware encoders might have the library installed locally, so that we should give preference to the local one if it exists. We sill need to ship something (a shim?) in the AppImage for those systems on which the Intel libraries are not installed, otherwise the application will not even launch. |
What you are seeing when it doesnt start is the failure of ffmpeg to find its required libva dependency (because you compiled against an ffmpeg with You dont see those symbols in any files because they are stored directly in the drivers. The drivers dynamically load the required symbols in some hellish mess. At least if amd drivers are anything to go by. --edit-- |
Looks like it ;-) So ideally we would not bundle anything that has to do with the Intel drivers and let the system figure that part out. However, if I delete |
Well if you delete the library from the appimage then the linkages are still screwed by the packaging process. So im not sure what was expected from just deleting it. Can you exclude it like libgl? |
Then the application will not even launch on systems that don't have this library, e.g., on systems that don't even have any Intel GPU. |
I think you are confused about what libva is. It is the library implementing the VA-API, which is platform agnostic. (libva the library is mostly maintained by intel, however it is the reference used by all other vendors). This issue may also affect AMD and Nvidia (or other implementers of the VA-API interface) if they take the same tact and perhaps only support certain versions. -- edit -- -- edit 2 -- |
While I may not be the typical user of OBS Studio, I am using it e.g., to record screencasts using a large collection of different Linux Live ISOs, some of which may or may not have libva preinstalled. It would be nice if OBS Studio at least continued to run everywhere, regardless of whether it is fully accelerated or not. Of course it would be best if we could make it use the acceleration on systems on which it is available while still continuing to work on systems where it is not. |
Well, you may have qualms about libva. But it ships on the debian live CD. I leave it up to you to see what of your many distros include it by default even on a live CD. This library going to be on almost any laptop or other low power device as without it you cannot watch hardware accelerated video on AMD or Intel hardware, and most nvidia hardware uses it as well. Requiring users of the appimage to have it on their system would help them if only because it finally allows their video players to use the hardware decoders they likely were not using before (including those provided by the Media Source and VLC Source which depend on libva). But i dont feel the need to impress this any further its not my decision to make what needs to be supported if contributors want to take on owning the appimage. |
Note to self, need to
Everyone's experience appreciated. |
This doesn't work with xenial, breaks our CI, and has conflicts. if someone wants to attempt to fix this, then I'm giving it a few more weeks. if no one's interested by then, I'm closing it, and if someone really wants it they can resubmit it. I don't know what to do with it otherwise. |
You know what, I'm just going to close this. If someone wants to take a crack at getting this working, resolving the conflicts, and making it so it doesn't break our CI, then please by all means resubmit. I really don't want this sitting on the PR list unresolved with no activity any longer. |
What do you mean by this? Binaries built on xenial should run on later distributions, and this AppImage certainly does (I had tested it above, see the screenshots of the AppImage running on various distributions). Do you think the AppImage does not work on xenial?
Forgive me if I don't remember whether this has been detailed somewhere, but can you concisely point me to what exactly it breaks?
The conflicts must have happened since I had sent the PR. I am happy to continue putting effort on this, but only if the project is genuinely interested in having an AppImage. |
The CI is using now Xenial. This should ideally work with all platforms or only affect one CI service. |
I think I can use that for making the AppImage too, but the AppImage will not be able to run on trusty anymore.
These are not needed for Linux, right? AppImage is only concerned with Linux. |
Considering that Trusty is EOL that doesn't seem too bad. |
Thanks for the explanation, I was not aware of this. Can you give me a hint as to why one would want to build for Linux on more than one CI service? Just asking out of curiosity. (For building the AppImage, Travis CI is certainly sufficient, so it would be OK to run the AppImage generation only there.) |
This PR, when merged, will compile this application on Travis CI upon each
git push
, and upload an AppImage.Providing an AppImage would have, among others, these advantages:
appimaged
--appimage-extract
parameterHere is an overview of projects that are already distributing upstream-provided, official AppImages.
If you have questions, AppImage developers are on #AppImage on irc.freenode.net.