Skip to content
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

Flatpak Anki doesn't display video #164

Open
quaepoena opened this issue Sep 24, 2024 · 7 comments
Open

Flatpak Anki doesn't display video #164

quaepoena opened this issue Sep 24, 2024 · 7 comments
Labels
question Further information is requested

Comments

@quaepoena
Copy link

Hello,

The latest flatpak version of Anki doesn't play video whilst the latest official version does.

The debug information is nearly identical between the two versions: the flatpak one uses glibc 2.38 while the official one uses 2.35. I'm using Linux Mint 21.3.

Flatpak debug info

Anki 24.06.3 (d678e393)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Linux-5.15.0-121-generic-x86_64-with-glibc2.38

Official debug info

Anki 24.06.3 (d678e393)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: Linux-5.15.0-121-generic-x86_64-with-glibc2.35

To test this I previewed various cards with video on the reverse side (both .mp4 and .mkv files) from the browser. The second triplet of JS errors appears when I click Preview, though the cards don't have any Tex code, and, regardless, it's common to both versions.

The stdout from the flatpak differs, as far as I can see, in only one significant way, namely by failing to load xapp-gtk3-module.

Gtk-Message: 10:22:31.105: Failed to load module "xapp-gtk3-module"

Here is the the full stdout out from the flatpak version.

user@host:~/Downloads/tmp/anki-24.06.3-linux-qt6$ anki
Anki starting...
Initial setup...
Preparing to run...
Gtk-Message: 10:22:31.105: Failed to load module "xapp-gtk3-module"
2024-09-24 10:22:31,355:INFO:aqt.mediasrv: Serving on http://127.0.0.1:36765
todo: windows paths in import screen
Starting main loop...
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/noerrors
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mathtools
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mhchem
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/noerrors
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/mathtools
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/mhchem
2024-09-24 10:23:02,239:WARNING:waitress: unhandled close event
blocked main thread for 274ms:
File "", line 1, in
File "aqt", line 556, in run
File "aqt", line 770, in _run
File "aqt.taskman", line 142, in _on_closures_pending
File "aqt.taskman", line 86, in
File "aqt.taskman", line 106, in wrapped_done
File "aqt.sync", line 123, in on_future_done
File "aqt.main", line 1061, in on_collection_sync_finished
File "aqt.main", line 1069, in
File "aqt.main", line 660, in after_sync
File "aqt.mediasync", line 116, in show_diag_until_finished
File "aqt.main", line 657, in after_media_sync
File "aqt.main", line 535, in callback
File "aqt.main", line 572, in cleanupAndExit
File "anki._backend_generated", line 185, in await_backup_completion
File "anki._backend", line 167, in _run_command

Here is the full stdout out from the official version.

user@host:~/Downloads/tmp/anki-24.06.3-linux-qt6$ ./anki
Anki starting...
Initial setup...
Preparing to run...
2024-09-24 10:23:11,890:INFO:aqt.mediasrv: Serving on http://127.0.0.1:33721
todo: windows paths in import screen
Starting main loop...
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/noerrors
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mathtools
JS warning /_anki/js/editor.js:439 No version information available for component [tex]/mhchem
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/noerrors
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/mathtools
JS warning /_anki/js/vendor/mathjax/tex-chtml-full.js:1 No version information available for component [tex]/mhchem
2024-09-24 10:23:21,564:WARNING:waitress: unhandled close event
blocked main thread for 251ms:
File "", line 1, in
File "aqt", line 556, in run
File "aqt", line 770, in _run
File "aqt.progress", line 119, in handler
File "aqt.mediasync", line 126, in check_finished
File "aqt.main", line 657, in after_media_sync
File "aqt.main", line 535, in callback
File "aqt.main", line 572, in cleanupAndExit
File "anki._backend_generated", line 185, in await_backup_completion
File "anki._backend", line 167, in _run_command

Let me know if I can provide more information.

@rayes0
Copy link
Collaborator

rayes0 commented Nov 23, 2024

I cannot reproduce this, could you try with the latest version of the app, and see if there is any issues?

@rayes0 rayes0 added the question Further information is requested label Nov 23, 2024
@quaepoena
Copy link
Author

Hi,

I still have this issue with the latest Anki from Flatpak.

Anki 24.11 (87ccd24e) (src) 
Python 3.11.10 Qt 6.7.3 PyQt 6.7.1
Platform: Linux-5.15.0-126-generic-x86_64-with-glibc2.38

@rayes0
Copy link
Collaborator

rayes0 commented Dec 2, 2024

Please try the following:

  1. Move the videos you are testing into a folder together, with nothing else in it (we are going to expose that folder temporarily into the sandbox).
  2. Run the following, replacing the path with the one you created: flatpak run --filesystem="/PATH/TO/VIDEO/FOLDER:ro" --command=bash net.ankiweb.Anki. This will run a shell in the sandbox.
  3. Once inside the sandbox, play the video with mpv directly like this: mpv -v "/PATH/TO/VIDEO/FOLDER/video.mp4"

Note whether it plays or not, and include the full console output of mpv.

@quaepoena
Copy link
Author

The video didn't play.

user@host:/tmp$ mkdir flatpak-testing
user@host:/tmp$ cp ~/.local/share/Anki2/neu/collection.media/020\ -\ paucī.mp4 flatpak-testing/
user@host:/tmp$ flatpak run --filesystem="/tmp/flatpak-testing:ro" --command=bash net.ankiweb.Anki

Note that the directories 

'/var/lib/flatpak/exports/share'
'/home/user/.local/share/flatpak/exports/share'

are not in the search path set by the XDG_DATA_DIRS environment variable, so
applications installed by Flatpak may not appear on your desktop until the
session is restarted.

[📦 net.ankiweb.Anki tmp]$ mpv -v flatpak-testing/020\ -\ paucī.mp4 
[cplayer] Command line options: '-v' 'flatpak-testing/020 - paucī.mp4'
[cplayer] mpv 0.38.0 Copyright © 2000-2024 mpv/MPlayer/mplayer2 projects
[cplayer] libplacebo version: v7.349.0
[cplayer] FFmpeg version: 6.0.1
[cplayer] FFmpeg library versions:
[cplayer]    libavutil       58.2.100
[cplayer]    libavcodec      60.3.100
[cplayer]    libavformat     60.3.100
[cplayer]    libswscale      7.1.100
[cplayer]    libavfilter     9.3.100
[cplayer]    libswresample   4.10.100
[cplayer] 
[cplayer] Configuration: -Dbuild-date=false -Dlibmpv=false -Dmanpage-build=disabled -Dprefix=/app -Dlibdir=/app/lib
[cplayer] List of enabled features: alsa av-channel-layout avif-muxer cplugins debug dmabuf-interop-gl dmabuf-wayland drm dvbin egl egl-drm egl-wayland ffmpeg gbm gl glibc-thread-name glob glob-posix gpl iconv jack jpeg jpegxl lavu-uuid lcms2 libarchive libass libavdevice libdl libplacebo linux-fstatfs memfd-create pipewire posix posix-shm ppoll pthread-condattr-setclock pulse vaapi vaapi-drm vaapi-wayland vector vk-khr-display vt.h vulkan wayland wayland-protocols-1-27 wayland-protocols-1-31 wayland-protocols-1-32 zlib
[cplayer] Setting option 'v' = '' (flags = 8)
[file] Opening flatpak-testing/020 - paucī.mp4
[demux] Trying demuxers for level=normal.
[lavf] Found 'mov,mp4,m4a,3gp,3g2,mj2' at score=100 size=2048.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [2:3] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [3:4] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
[demux] Detected file format: mov,mp4,m4a,3gp,3g2,mj2 (libavformat)
[cplayer] Opening done: flatpak-testing/020 - paucī.mp4
[find_files] Loading external files in flatpak-testing/
[lavf] select track 0
[cplayer]  (+) Video --vid=1 (*) (h264 640x480 25.000fps)
[vo/gpu] Probing for best GPU context.
[vo/gpu/opengl] Initializing GPU context 'wayland'
[vo/gpu/opengl] Initializing GPU context 'drm'
[vo/gpu/drm] VT_GETMODE failed: Inappropriate ioctl for device
[vo/gpu/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu/drm] Picked DRM card 0, primary node /dev/dri/card0 as the default.
[vo/gpu/drm] Driver: i915 1.6.0 (20201103)
[vo/gpu/drm] Connector 95 currently connected to encoder 94
[vo/gpu/drm] Selected Encoder 94 with CRTC 51
[vo/gpu/drm] Selected mode: 1920x1080 ([email protected])
[vo/gpu/drm] DRM Atomic support found
[vo/gpu/drm] Using primary plane 31 as draw plane
[vo/gpu/drm] Using overlay plane 39 as drmprime plane
[vo/gpu] GBM_FORMAT_ARGB8888 supported by draw plane.
[vo/gpu] Supported modifier: 0x100000000000005
[vo/gpu] Supported modifier: 0x100000000000004
[vo/gpu] Supported modifier: 0x100000000000003
[vo/gpu] Supported modifier: 0x100000000000002
[vo/gpu] Supported modifier: 0x100000000000001
[vo/gpu] Supported modifier: 0x0
[vo/gpu] Creating GBM device
[vo/gpu] Initializing GBM surface (1920 x 1080)
[vo/gpu/opengl] Initializing EGL
[vo/gpu/opengl] EGL_VERSION=1.5
[vo/gpu/opengl] EGL_VENDOR=Mesa Project
[vo/gpu/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu/opengl] Trying to create Desktop OpenGL context.
[vo/gpu/opengl] Attempting to find EGLConfig matching GBM_FORMAT_ARGB8888
[vo/gpu/opengl] Found matching EGLConfig for GBM_FORMAT_ARGB8888
[vo/gpu/opengl] Initializing EGL surface
[vo/gpu] GL_VERSION='4.6 (Core Profile) Mesa 24.2.5 (git-3b9fcb7e4d)'
[vo/gpu] Detected desktop OpenGL 4.6.
[vo/gpu] GL_VENDOR='Intel'
[vo/gpu] GL_RENDERER='Mesa Intel(R) HD Graphics 520 (SKL GT2)'
[vo/gpu] GL_SHADING_LANGUAGE_VERSION='4.60'
[vo/gpu] Loaded extension GL_KHR_debug.
[vo/gpu/opengl] Preparing framebuffer
[vo/gpu/opengl] GBM surface using modifier 0x100000000000004
[vo/gpu/drm] Failed to acquire DRM master: Permission denied
[vo/gpu/drm] crtc is not VRR capable
[vo/gpu/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu/opengl] Failed to set CRTC for connector 95: Permission denied
[vo/gpu] Failed to commit atomic request: Permission denied
[vo/gpu/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu/drm] Failed to restore previous mode
[vo/gpu/drm] Failed to drop DRM master: Permission denied
[vo/gpu/vulkan] Initializing GPU context 'waylandvk'
[vo/gpu/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu/libplacebo] Spent 10.109 ms enumerating instance extensions
[vo/gpu/libplacebo] Creating vulkan instance with extensions:
[vo/gpu/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu/libplacebo]     VK_KHR_surface
[vo/gpu/libplacebo]     VK_EXT_swapchain_colorspace
[vo/gpu/libplacebo]     VK_KHR_external_memory_capabilities
[vo/gpu/libplacebo]     VK_KHR_external_semaphore_capabilities
[vo/gpu/libplacebo]     VK_KHR_get_surface_capabilities2
[vo/gpu/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu/libplacebo]     VK_KHR_surface
[vo/gpu/libplacebo]     VK_KHR_wayland_surface
[vo/gpu/vulkan] Initializing GPU context 'displayvk'
[vo/gpu/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu/libplacebo] Spent 11.641 ms enumerating instance extensions
[vo/gpu/libplacebo] Creating vulkan instance with extensions:
[vo/gpu/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu/libplacebo]     VK_KHR_surface
[vo/gpu/libplacebo]     VK_EXT_swapchain_colorspace
[vo/gpu/libplacebo]     VK_KHR_external_memory_capabilities
[vo/gpu/libplacebo]     VK_KHR_external_semaphore_capabilities
[vo/gpu/libplacebo]     VK_KHR_get_surface_capabilities2
[vo/gpu/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu/libplacebo]     VK_KHR_surface
[vo/gpu/libplacebo]     VK_KHR_display
[vo/gpu/libplacebo] Probing for vulkan devices:
[vo/gpu/libplacebo]     GPU 0: Intel(R) HD Graphics 520 (SKL GT2) v1.3.289 (integrated)
[vo/gpu/libplacebo]            uuid: 86:80:16:19:07:00:00:00:00:02:00:00:00:00:00:00
[vo/gpu/libplacebo]     GPU 1: llvmpipe (LLVM 17.0.6, 256 bits) v1.3.289 (software)
[vo/gpu/libplacebo]            uuid: 6D:65:73:61:32:34:2E:32:2E:35:00:00:00:00:00:00
[vo/gpu-next] Probing for best GPU context.
[vo/gpu-next/opengl] Initializing GPU context 'wayland'
[vo/gpu-next/opengl] Initializing GPU context 'drm'
[vo/gpu-next/drm] Can't handle VT release - signal already used
[vo/gpu-next/drm] Failed to set up VT switcher. Terminal switching will be unavailable.
[vo/gpu-next/drm] Picked DRM card 0, primary node /dev/dri/card0 as the default.
[vo/gpu-next/drm] Driver: i915 1.6.0 (20201103)
[vo/gpu-next/drm] Connector 95 currently connected to encoder 94
[vo/gpu-next/drm] Selected Encoder 94 with CRTC 51
[vo/gpu-next/drm] Selected mode: 1920x1080 ([email protected])
[vo/gpu-next/drm] DRM Atomic support found
[vo/gpu-next/drm] Using primary plane 31 as draw plane
[vo/gpu-next/drm] Using overlay plane 39 as drmprime plane
[vo/gpu-next] GBM_FORMAT_ARGB8888 supported by draw plane.
[vo/gpu-next] Supported modifier: 0x100000000000005
[vo/gpu-next] Supported modifier: 0x100000000000004
[vo/gpu-next] Supported modifier: 0x100000000000003
[vo/gpu-next] Supported modifier: 0x100000000000002
[vo/gpu-next] Supported modifier: 0x100000000000001
[vo/gpu-next] Supported modifier: 0x0
[vo/gpu-next] Creating GBM device
[vo/gpu-next] Initializing GBM surface (1920 x 1080)
[vo/gpu-next/opengl] Initializing EGL
[vo/gpu-next/opengl] EGL_VERSION=1.5
[vo/gpu-next/opengl] EGL_VENDOR=Mesa Project
[vo/gpu-next/opengl] EGL_CLIENT_APIS=OpenGL OpenGL_ES 
[vo/gpu-next/opengl] Trying to create Desktop OpenGL context.
[vo/gpu-next/opengl] Attempting to find EGLConfig matching GBM_FORMAT_ARGB8888
[vo/gpu-next/opengl] Found matching EGLConfig for GBM_FORMAT_ARGB8888
[vo/gpu-next/opengl] Initializing EGL surface
[vo/gpu-next] GL_VERSION='4.6 (Core Profile) Mesa 24.2.5 (git-3b9fcb7e4d)'
[vo/gpu-next] Detected desktop OpenGL 4.6.
[vo/gpu-next] GL_VENDOR='Intel'
[vo/gpu-next] GL_RENDERER='Mesa Intel(R) HD Graphics 520 (SKL GT2)'
[vo/gpu-next] GL_SHADING_LANGUAGE_VERSION='4.60'
[vo/gpu-next] Loaded extension GL_KHR_debug.
[vo/gpu-next/opengl] Preparing framebuffer
[vo/gpu-next/opengl] GBM surface using modifier 0x100000000000004
[vo/gpu-next/drm] Failed to acquire DRM master: Permission denied
[vo/gpu-next/drm] crtc is not VRR capable
[vo/gpu-next/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu-next/opengl] Failed to set CRTC for connector 95: Permission denied
[vo/gpu-next] Failed to commit atomic request: Permission denied
[vo/gpu-next/drm] Failed to commit ModeSetting atomic request: Permission denied
[vo/gpu-next/drm] Failed to restore previous mode
[vo/gpu-next/drm] Failed to drop DRM master: Permission denied
[vo/gpu-next/vulkan] Initializing GPU context 'waylandvk'
[vo/gpu-next/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu-next/libplacebo] Spent 12.515 ms enumerating instance extensions
[vo/gpu-next/libplacebo] Creating vulkan instance with extensions:
[vo/gpu-next/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_EXT_swapchain_colorspace
[vo/gpu-next/libplacebo]     VK_KHR_external_memory_capabilities
[vo/gpu-next/libplacebo]     VK_KHR_external_semaphore_capabilities
[vo/gpu-next/libplacebo]     VK_KHR_get_surface_capabilities2
[vo/gpu-next/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_KHR_wayland_surface
[vo/gpu-next/libplacebo] Spent 10.044 ms creating vulkan instance
[vo/gpu-next/vulkan] Initializing GPU context 'displayvk'
[vo/gpu-next/libplacebo] Initialized libplacebo v7.349.0 (API v349)
[vo/gpu-next/libplacebo] Spent 11.029 ms enumerating instance extensions
[vo/gpu-next/libplacebo] Creating vulkan instance with extensions:
[vo/gpu-next/libplacebo]     VK_KHR_get_physical_device_properties2
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_EXT_swapchain_colorspace
[vo/gpu-next/libplacebo]     VK_KHR_external_memory_capabilities
[vo/gpu-next/libplacebo]     VK_KHR_external_semaphore_capabilities
[vo/gpu-next/libplacebo]     VK_KHR_get_surface_capabilities2
[vo/gpu-next/libplacebo]     VK_KHR_portability_enumeration
[vo/gpu-next/libplacebo]     VK_KHR_surface
[vo/gpu-next/libplacebo]     VK_KHR_display
[vo/gpu-next/libplacebo] Probing for vulkan devices:
[vo/gpu-next/libplacebo]     GPU 0: Intel(R) HD Graphics 520 (SKL GT2) v1.3.289 (integrated)
[vo/gpu-next/libplacebo]            uuid: 86:80:16:19:07:00:00:00:00:02:00:00:00:00:00:00
[vo/gpu-next/libplacebo]     GPU 1: llvmpipe (LLVM 17.0.6, 256 bits) v1.3.289 (software)
[vo/gpu-next/libplacebo]            uuid: 6D:65:73:61:32:34:2E:32:2E:35:00:00:00:00:00:00
[vo/dmabuf-wayland/none] Initializing GPU context 'wldmabuf'
[cplayer] Error opening/initializing the selected video_out (--vo) device.
[lavf] deselect track 0
[cplayer] Video: no video
[cplayer] No video or audio streams selected.
[cplayer] finished playback, no audio or video data played (reason 4)
[cplayer] Exiting... (Errors when loading file)
[📦 net.ankiweb.Anki tmp]$ 
exit
user@host:/tmp$

@rayes0
Copy link
Collaborator

rayes0 commented Dec 5, 2024

Looks like it is trying to use the drm gpu context instead of wayland for some reason. I have some detailed troubleshooting for you below:

Do you have mpv installed outside the flatpak? Does it work on your system with the default configuration (check with mpv --no-config /PATH/TO/VIDEO? If not, please open an issue with the mpv repo, I will not be able to help much with mpv debugging.

Have you denied the flatpak permission to use your gpu? Check by providing the output of flatpak override --show net.ankiweb.Anki and flatpak override --show net.ankiweb.Anki --user, whichever one returns something, or both. Also please provide the graphics card and video driver you are using.

Next, please try explicitly specifiying --gpu-context=wayland or --gpu-context=waylandvk with WAYLAND_DEBUG=1, you can run it in one command with the video in the previous folder as follows: flatpak run --env=WAYLAND_DEBUG=1 --filesystem="/PATH/TO/VIDEO/FOLDER:ro" --command=mpv net.ankiweb.Anki --gpu-context=wayland /PATH/TO/VIDEO/FOLDER/VIDEO.mp4. Ensure to not mess up the order of the arguments.

Sorry for the detailed steps involved, just that the default configuration of mpv should work on your system provided that it does outside the flatpak and the flatpak has access to your video card.

@quaepoena
Copy link
Author

mpv is installed outside of flatpak and works fine. I haven't adjusted anything concerning flatpak and the GPU. No video was displayed when running the debug commands you gave.

user@host:~/tmp/flatpak-testing$ which mpv
/usr/bin/mpv

user@host:~/tmp/flatpak-testing$ mpv --no-config video/020\ -\ paucī.mp4
�= (+) Video --vid=1 (*) (h264 640x480 25.000fps)
VO: [gpu] 640x480 yuv420p
Exiting... (End of file)

user@host:~/tmp/flatpak-testing$ flatpak override --show net.ankiweb.Anki --user
flatpak override --show net.ankiweb.Anki --user

user@host:~/tmp/flatpak-testing$ sudo lshw -C display
sudo lshw -C display
[sudo] Passwort für user:
*-display
Beschreibung: VGA compatible controller
Produkt: Skylake GT2 [HD Graphics 520]
Hersteller: Intel Corporation
Physische ID: 2
Bus-Informationen: pci@0000:00:02.0
Logischer Name: /dev/fb0
Version: 07
Breite: 64 bits
Takt: 33MHz
Fähigkeiten: pciexpress msi pm vga_controller bus_master cap_list rom fb
Konfiguration: depth=32 driver=i915 latency=0 resolution=1920,1080
Ressourcen: irq:125 memory:eb000000-ebffffff memory:a0000000-afffffff ioport:e000(Größe=64) memory:c0000-dffff

user@host:~/tmp/flatpak-testing$ lspci -vk -s 00:02.0
lspci -vk -s 00:02.0
00:02.0 VGA compatible controller: Intel Corporation Skylake GT2 [HD Graphics 520] (rev 07) (prog-if 00 [VGA controller])
Subsystem: Lenovo Skylake GT2 [HD Graphics 520]
Flags: bus master, fast devsel, latency 0, IRQ 125
Memory at eb000000 (64-bit, non-prefetchable) [size=16M]
Memory at a0000000 (64-bit, prefetchable) [size=256M]
I/O ports at e000 [size=64]
Expansion ROM at 000c0000 [virtual] [disabled] [size=128K]
Capabilities:
Kernel driver in use: i915
Kernel modules: i915

user@host:~/tmp/flatpak-testing$ flatpak run --env=WAYLAND_DEBUG=1 --filesystem="~/tmp/flatpak-testing/video/:ro" --command=mpv net.ankiweb.Anki --gpu-context=wayland video/020\ -\ paucī.mp4
�=[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [2:3] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [3:4] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
(+) Video --vid=1 () (h264 640x480 25.000fps)
Error opening/initializing the selected video_out (--vo) device.
Video: no video
No video or audio streams selected.
Exiting... (Errors when loading file)
�>user@host:~/tmp/flatpak-testing$ flatpak run --env=WAYLAND_DEBUG=1 --filesystem="~/tmp/flatpak-testing/video/:ro" --command=mpv net.ankiweb.Anki --gpu-context=waylandvk video/020\ -\ paucī.mp4
�=[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list: 1 Missing key frame while searching for timestamp: 0
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: st: 0 edit list 1 Cannot find an index entry before timestamp: 0.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [2:3] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
[ffmpeg/demuxer] mov,mp4,m4a,3gp,3g2,mj2: All samples in data stream index:id [3:4] have zero duration, stream set to be discarded by default. Override using AVStream->discard or -discard for ffmpeg command.
(+) Video --vid=1 (
) (h264 640x480 25.000fps)
Error opening/initializing the selected video_out (--vo) device.
Video: no video
No video or audio streams selected.
Exiting... (Errors when loading file)
�>user@host:~/tmp/flatpak-testing$

@rayes0
Copy link
Collaborator

rayes0 commented Dec 10, 2024

It cannot find the file because you placed quotes around ~, and you did not provide it the full path to the video, you will need to provide it the full path in both arguments.

If your video is in ~/tmp/flatpak-testing, the command should be flatpak run --env=WAYLAND_DEBUG=1 --filesystem="/home/YOUR_USERNAME/tmp/flatpak-testing/video/:ro" --command=mpv net.ankiweb.Anki --gpu-context=waylandvk "/home/YOUR_USERNAME/tmp/flatpak-testing/video/020 - paucī.mp4"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants