endrl / segment-editor

Segment Editor for Jellyfin Segment API
MIT License
52 stars 4 forks source link

Bug: AppImage unable to play any video #7

Closed mihawk90 closed 2 months ago

mihawk90 commented 2 months ago

Just tried this for the first time, and for simplicity I chose the AppImage first. After connecting to the server and selecting an episode, the player shows the Thumbnail just fine, but clicking on Play, no video starts playing. Unfortunately I can't open the DevTools (i.e. Ctrl+Shift+I) to check for errors, but my assumption is that the AppImage doesn't ship any decoder. I tried both H264 and H265 files. It should be noted the timer stays at 00:00.000 and there is also no visible buffering.

I tried the Docker version afterwards and it works perfectly fine, so this is specific to the AppImage.

Unfortunately I was unable to find where the AppImage is even built...

edit: Seems the AppImages are built with Tauri. I have heard about it but don't know much about it, however the documentation says:

[!CAUTION] If your app plays audio/video you need to enable tauri.conf.json > tauri > bundle > appimage > bundleMediaFramework. This will increase the size of the AppImage bundle to include additional gstreamer files needed for media playback. This flag is currently only supported on Ubuntu build systems.

edit 2: OK so... I actually tried that: https://github.com/mihawk90/segment-editor/commit/8ecf948e8142ae500a563dcf81d90b73b2ca8ed8

But unfortunately that didn't work :/ In the action's log I can see it installed the gstreamer dependency it's supposed to: https://github.com/mihawk90/segment-editor/actions/runs/10895770666/job/30234539455

But downloading the AppImage from my test release shows the same issue :( https://github.com/mihawk90/segment-editor/releases/tag/appimage-codecs-test

edit 3: OK so after extracting the AppImage, I don't see any gstreamer library for H264 or H265... Gstreamer provides both via x264 and x265 respectively, but:

 ls | grep libgstx
libgstximagesink.so
libgstximagesrc.so
libgstxvimagesink.so

So... yeah.

From what I can tell x264 is part of gstreamer-plugins-ugly: https://packages.ubuntu.com/jammy/amd64/gstreamer1.0-plugins-ugly/filelist And x265 is part of gstreamer-plugins-bad: https://packages.ubuntu.com/jammy-updates/amd64/gstreamer1.0-plugins-bad/filelist Not sure where AAC is which we'd need for audio (although video is arguably more important)... I can only find aacenc in -bad... On fedora fdkaac is part of -bad:

 dnf repoquery -l gstreamer1-plugins-bad-free.x86_64 | grep aac.so
Last metadata expiration check: 0:01:07 ago on Tue 17 Sep 2024 07:03:16 CEST.
/usr/lib64/gstreamer-1.0/libgstfdkaac.so

... but not on Ubuntu apparently.

It's actually kinda funny because WebKit complains about missing AAC when starting the application:

(WebKitWebProcess:43286): WARNING : 05:11:38.127: The GStreamer FDK AAC plugin is missing, AAC playback is unlikely to work.

But Tauri doesn't appear to have any config on what parts of Gstreamer to install soooo uuuhhhh IDK from here :shrug: