USDX icon indicating copy to clipboard operation
USDX copied to clipboard

UltraStar-Deluxe as Flatpak

Open Tiger862000 opened this issue 5 years ago • 23 comments

Hey guys, thank you for still keeping the project alive! I just love playing karaoke with my friends.

Actual behavior

My user-story: I changed my mediacenter setup to something called GAMER-OS. It mimics SteamOS on Arch, is much faster and up-to-date. Yet they allow only flathub installations.

Global user perception: Compiling and maintaining software for every (Linux) platform out there is time-consuming. Finding new software and installation might be error prone for users. New concepts of software package management and distribution, like Flatpak, Snap or Appimage, can change that.

Expected behavior

Please make Ultrastar Deluxe available on Flatpak/Flathub.

Cheers from Salzburg, Austria Tiger

Tiger862000 avatar Dec 02 '19 22:12 Tiger862000

Might look into this around Christmas. Releasing to Flathub doesn't make sense until we tag a new release, though. They only host stable versions.

s09bQ5 avatar Dec 03 '19 00:12 s09bQ5

@Tiger862000, please try https://transfer.sh/BtKas/UltraStarDeluxe-432e00b-x86_64.flatpak Songs must be added to ~/.var/app/eu.usdx.UltraStarDeluxe/.ultrastardx/songs Note that I haven't tested it at all.

If possible, test the following things:

  • Audio output (should already play in the Main Menu)
  • Audio input from a microphone (Tools -> Options -> Record)
  • Webcam (Tools -> Options -> Webcam -> Enable Preview)
  • Visualization (Enable in Tools -> Options -> Graphics)

s09bQ5 avatar Dec 21 '19 18:12 s09bQ5

Hi @s09bQ5 , thank you for being patient. Was traveling and wasn't pending on this. Corona made me come back home. Now I got time looking into this. Would you mind uploading it again? Thank you!

Tiger862000 avatar Mar 14 '20 22:03 Tiger862000

https://transfer.sh/KmWnP/UltraStarDeluxe-97fa5f2-x86_64.flatpak

s09bQ5 avatar Mar 15 '20 18:03 s09bQ5

Hey thank for uploading again, but it says "File not found"... Screenshot from 2020-03-18 19-34-45

Tiger862000 avatar Mar 18 '20 18:03 Tiger862000

Let's try WeTransfer then: https://we.tl/t-yY9S8YWfvX

s09bQ5 avatar Mar 22 '20 00:03 s09bQ5

The FFmpeg contained in the Flatpak base is pretty limited. It has just the following codecs:

  • Audio decoders for AAC, AC-3, FLAC, MP2/3, Vorbis, uncompressed audio
  • Video decoders for AV1, H.264, Theora, VP3/8/9, WebP, PNG, GIF, uncompressed images

It also lacks support for AVI, ASF/WMV and MPEG PS/TS containers.

So if this uses the AAC codec crippled by Fedora, they only support codecs that don't violate any patents.

Should we stick to these codecs or should we include a custom build of FFmpeg? I guess most countries have a patent exception for non-commercial use and this game is usually played at home. But if we do that, we should place a big fat warning somewhere.

I also tested projectM. The new versions don't play nice with the fixed function OpenGL pipeline used by USDX. glUseProgram(0) in RestoreOpenGLState helps on my NVidia ION system, but only fixes the stuff drawn on top of the visualizations, not the visualizations themself, on my Intel Sandy Bridge system. I guess we will have to stick to projectM < 3.0.0 then.

s09bQ5 avatar May 02 '20 10:05 s09bQ5

https://we.tl/t-vx11WNpEsH

  • [x] Graphics on Wayland
  • [x] Audio output through PulseAudio via SDL2
  • [x] Audio input through PulseAudio via SDL2
  • [x] Webcam via OpenCV 4
  • [x] Visualizations with projectM 2.2.1
  • [x] Custom FFmpeg 4.2.2 build with all codecs enabled
  • [x] A note in the AppData description warning about the patented algorithms in FFmpeg
  • [ ] Midi output via PortMidi

s09bQ5 avatar May 04 '20 06:05 s09bQ5

Can you please store the flatpak snapshots somewhere more "stable"? Another repository, this repo releases, ...?

Your work would be much more appreciated if people could use it :smiley:

claudioap avatar Dec 02 '20 14:12 claudioap

Are there any plans to continue and finish the flatpak package support? Based on this repo-branch I could build a flatpak and install it from a local flat-repo. It works for my requirements. Only mkv container aren't working. Like many others I would prefer an offical flatpak. My knowledge is unfortunately way too small to finish this flatpak support. But I could help with testing.

daddeltrotter avatar Feb 13 '21 19:02 daddeltrotter

I have updated the branch and the x86_64 flatpak will now also be built on AppVeyor, where the build result is stored for 6 months: https://ci.appveyor.com/api/buildjobs/0r11o03ijhkis83a/artifacts/UltraStarDeluxe-v2020.4.0-43-gd2bc462.x86_64.flatpak

During testing I've had serious issues while switching between windowed and full screen mode. I don't know if this is caused by the new flatpak runtime with its new libSDL. I did only a brief test on X11, not Wayland. It would be nice if someone could test this on their machine.

The Appveyor build will always build all dependencies. I didn't try to cache flatpak modules like on Travis because AppVeyor fails builds if the caches of all projects of a non-paying user exceed 1GB. The .flatpak-builder directory contains about 800MB when we are done building.

s09bQ5 avatar Feb 14 '21 18:02 s09bQ5

And mkv works for me.

s09bQ5 avatar Feb 14 '21 18:02 s09bQ5

Cool...that was fast. Thanks a lot! I did some testing.

Set-Up 1:

  • Laptop with AMD Ryzen 7 4700U with Radeon RX Vega 7.
  • Ubuntu 20.04 LTS with Gnome, Gnome Wayland, and KDE Plasma installed.

I installed your Flatpak build. In parallel, I have USDX installed from tomtom ppa (https://wiki.ubuntuusers.de/Spiele/UltraStar_Deluxe/) to check if issues occur there as well. Version is 2017.8.0-r996.eee7abcd-1~ppa~focal (looks quite old...).

Game works very well. Played all songs and videos. My "mkv-issue" is not because of the container but the codecs inside:

  • Doesn't work in flatpak version: AV1 Video (av01) / OPus Audio (opus) It does work in repo version.
  • Works in flatpak and repo version: H264 - MPEG-4 AVC (part 10) (avc1) / Vorbis Audio (vorb)

I tested several microphones. All worked fine:

  • Built in microphhone (HD Audio)
  • Headset via input jack via imernal audio
  • Logitech USB Microphone (2x) - sold as Lioncast
  • Jabra Speak 410 USB conference speakerphone
  • Jabra Evolve Link Wired USB Headset
  • Jabra Evolve 75 Bluetooth Headset Remark: I don't recommend the Jabra devices due to their optimization on speech and IP calls). I simply had them at hand to test such variants as well.

The built in WebCam was recognized. Another WebCam plugged in via USB was not recognized (but neither from flatpak nor repo build).

Switching issue: Yes I can confirm it happens as well in my test. I found two issues:

  1. switching from "borderless" to "Windowed": KDE Plasma: Flickering areas above and right game screen spanning from the set window size to the screen size. It disapears on pressing resizre button of the window. It occurs only once after start of game. Gnome: No issue Gnome Wayland: No issue
  2. Switching from "Windowed" to "Full Screen" - this issue is reoccuring every time. KDE Plasma: Flickering areas above and right of game screen spanning from the set window size to the screen size. It disapears on pressing resizre button of the window. It occurs only once after start of game. YOu can get it seolved by Alt-tabbing away and back to game screen. Gnome: Flickering area above and black bar right of game screen spanning from the set window size to the screen size. It disapears on pressing resizre button of the window. It occurs only once after start of game. YOu can get it seolved by Alt-tabbing away and back to game screen. Gnome Wayland: Bblack bars right of game screen spanning from the set window size to the screen size. Alt-tabbing doesn't resolve this.

Gnome Wayland works as good as Gnome. Except for "Windowed Mode", it offers only two weird window sizes.

Set-Up 2: GamerOS on a AMD Ryzen 7 3800X 8-Core with NVIDIA GeForce GTX 1660 SUPER. It uses an adopted SteamOS Compositor forcing all programs into full screen, so I don't have the switching issue. I tested it only with the two Logitech USB microphones. Game works fine. No issues.

That's what I can tell you. If I can be of urther help, please let me know.

daddeltrotter avatar Feb 16 '21 21:02 daddeltrotter

Here with support for AV1: https://ci.appveyor.com/project/basisbit/usdx/builds/37807393/job/qc6e0cj5dnuepqmy/artifacts

@daddeltrotter, maybe I am too tired to read it correctly, but did you mention if the problems with switching to and from fullscreen mode also exist in 2017.8.0?

s09bQ5 avatar Feb 17 '21 01:02 s09bQ5

Here with support for AV1:

Does this mean USDX can/does support AV1 in general (on Windows/Mac as well)? I've been waiting for that ☺️

bohning avatar Feb 17 '21 06:02 bohning

No, all I did was to enable the AV1 decoder when compiling the FFmpeg inside the Flatpak. I didn't even check if it works with USDX since I don't have an AV1 video at hand, but none of the other codecs needs special support in USDX.

s09bQ5 avatar Feb 17 '21 08:02 s09bQ5

in general, USDX should support whatever formats the ffmpeg version can handle.

basisbit avatar Feb 17 '21 08:02 basisbit

I didn't even check if it works with USDX since I don't have an AV1 video at hand, but none of the other codecs needs special support in USDX.

I see. From my tests, USDX currently can't handle AV1 properly. I can provide an AV1 file if that helps.

Does that mean that we need a custom compiled version of ffmpeg that supports AV1 for Windows/Mac?

bohning avatar Feb 17 '21 08:02 bohning

@bohning please create a new issue for AV1 support testing. this is a bit off-topic.

basisbit avatar Feb 17 '21 08:02 basisbit

@daddeltrotter, maybe I am too tired to read it correctly, but did you mention if the problems with switching to and from fullscreen mode also exist in 2017.8.0?

No. Switching between modes works correct 2017.7.0.

daddeltrotter avatar Feb 17 '21 13:02 daddeltrotter

Here with support for AV1: https://ci.appveyor.com/project/basisbit/usdx/builds/37807393/job/qc6e0cj5dnuepqmy/artifacts

My AV1 videos in mkv container works with this build. Thanks a lot!

daddeltrotter avatar Feb 17 '21 13:02 daddeltrotter

@daddeltrotter, maybe I am too tired to read it correctly, but did you mention if the problems with switching to and from fullscreen mode also exist in 2017.8.0?

No. Switching between modes works correct 2017.7.0.

I'm very sorry, but I have to correct myself:

  1. switching from "borderless" to "Windowed": no issues with 2017 version
  2. switching from "Windowed" to "Full Screen" - this issue exists as well but occurs only after I switch the second time from windowed to full-screen. Then it reoccurs in all following switches.

Additionally I made also a fresh build ffrom github sources V 2020.4.1. And this shows the same issue as in 2017.7.0.

Just an idea: could this issue be related to the display drive? My Ryzen 4700U with its integrated GPU is quite new from Q3/Q4 2020. Can anyone check this on a different GPU, e.g. Nvidia?

daddeltrotter avatar Feb 17 '21 20:02 daddeltrotter

I had dthe chance at the week-end to test thest the Flatpak on a Lenovo ThinkPad T510 (embedded nvidia graphics) on a up to date Manjaro. switching from "Windowed" to "Full Screen" shows the same issue (flickering bars at top and right of screen. (So it doesn't look like adriver issue but rather a resize issue of the application. (?))

daddeltrotter avatar Feb 21 '21 20:02 daddeltrotter

Available on Flathub now: https://flathub.org/apps/details/eu.usdx.UltraStarDeluxe

s09bQ5 avatar Mar 08 '23 14:03 s09bQ5