FFmpeg has some serious problems in my retroarch

Ffmpeg apparently does not cache the video and make retroarch crashed after doing some brief skips, also apparently hard coded subtitles doesn’t work at all, this happens on AMD 23.3.1 driver version RX 6600

3 Likes

You’re right, there is an issue with playing videos for me as well, and subtitles never work, unfortunately.

2 Likes

ffmpeg has a lot of issues, enough to make it unusable for me.

  • Some videos stutter every few seconds. I don’t know why, it’s completely random. The various codec options don’t do anything.

  • Most videos will freeze/crash RetroArch if i use the core’s fast forward/rewind functions. I have disabled the buttons and use the built in RetroArch fast forward function, which is slower but doesn’t crash.

  • Even so, there are no other controls or features. Its completely barebones.

ffmpeg could have been a nice way to watch videos using shaders but with it’s alpha status state and bugs, it’s not worth the hassle. It also looks abandoned as i don’t see it get updated in the buildbot for a while now.

4 Likes

yeah it crashes also after a time if you watch longer videos but this wasn´t allways the case so far i can remember that started a few months ago on my side i used to watched many stuff this way

i just was thinking i screwed it up somehow :sweat_smile:

3 Likes

There it seems to be a minimal work on ffmpeg during the last months it seems to be for the core itself to do something on latest retroarch versions to my guessing

2 Likes

I’ve been hoping for a bug fix update or maybe a different media player core in RetroArch since many years now, like when i first used RetroArch 7 or 8 years ago. The ffmpeg core is the same as it was back then, nothing changed. I guess there is no interest having a working media player in the platform. I really liked the idea of shaders in videos/movies but i’m no longer holding my breath.

2 Likes

PRs welcome.

It’s not that nobody cares, but that it’s a lot harder to fit a media player into the libretro API than it seems. Several people have attempted it (see also the mpv-libretro core) and ffmpeg-libretro is still the best one, which should be indicative of how hard/complex it really is. Even though it seems like they’re doing similar tasks, media playback and libretro go about things in ways that conflict pretty fundamentally.

The ffmpeg-libretro core has also undergone several major overhauls since its original implementation, both to add additional features and to keep up with ffmpeg’s ever-changing/ever-breaking ABI, so it’s definitely not “the same as it was” 7-8 yrs ago.

8 Likes

hello, i have the same problem: some videos are jerky and unwatchable. what is the latest version of ffmpeg core? i have 1.16.0, i would like to update it but there is no ffmpeg in the core list

$ retroarch
[INFO] RetroArch 1.16.0 (Git 6c2cc45628)
[INFO] === Build =======================================
[INFO] CPU Model Name: AMD Ryzen 5 5600G with Radeon Graphics         
[INFO] Funzionalità: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.16.0
[INFO] Git: 6c2cc45628
[INFO] Built: Oct  9 2023
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Core]: Versione delle API di libretro: 1, Compilato contro API: 1
[INFO] [Core]: Geometry: 320x240, Aspect: 1.333, FPS: 60.00, Sample rate: 48000.00 Hz.
[INFO] [Audio]: Set audio input rate to: 48000.00 Hz.
[INFO] [Video]: Set video size to: fullscreen.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[INFO] [Vulkan]: Vulkan dynamic library loaded.
[INFO] [Vulkan]: Found vulkan context: "vk_x".
[INFO] [Vulkan]: Detecting screen resolution: 1920x1080.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [X/Vulkan]: Using Xinerama on screen #0.
[INFO] [X/Vulkan]: X = 0, Y = 0, W = 1920, H = 1080.
[INFO] [X/Vulkan]: Using windowed fullscreen.
[INFO] [Vulkan]: Found GPU at index 0: "AMD Radeon Graphics (RADV RENOIR)".
[INFO] [Vulkan]: Using GPU index 0.
[INFO] [Vulkan]: Using semaphores for WSI acquire.
[INFO] [Vulkan]: Using GPU: "AMD Radeon Graphics (RADV RENOIR)".
[INFO] [Vulkan]: Queue family 0 supports 1 sub-queues.
[INFO] [Vulkan]: Got 3 swapchain images.
[INFO] [Vulkan]: Using resolution 1918x1033.
[INFO] [Vulkan]: Using RGB565 format.
[INFO] [Vulkan]: Loading stock shader.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports 16 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[ERROR] [DBus]: Failed to suspend screensaver via DBus.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "ENG"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[INFO] [Video]: Found display server: "x11".
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.10
[INFO] [Microphone]: Initialized microphone driver.
Can't locate Net/DBus.pm in @INC (you may need to install the Net::DBus module) (@INC entries checked: /usr/lib/perl5/5.38/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.38/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.38/core_perl /usr/share/perl5/core_perl) at -e line 6.
BEGIN failed--compilation aborted at -e line 6.
[INFO] [Display]: Found display driver: "vulkan".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Caricamento file preferiti: "/home/topo/.config/retroarch/content_favorites.lpl".
[INFO] [X/Vulkan]: Resized fullscreen resolution to 1918x1033.
[INFO] [X/Vulkan]: Resized fullscreen resolution to 1920x1080.
[INFO] [Core]: Using content: "/media/DATI/ANIME/Puella_Magi_Madoka_Magica_1x04_I_miracoli_e_le_magie_esistono.mp4".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
[INFO] RetroArch 1.16.0 (Git 6c2cc45628)
[INFO] === Build =======================================
[INFO] CPU Model Name: AMD Ryzen 5 5600G with Radeon Graphics         
[INFO] Funzionalità: MMX MMXEXT SSE SSE2 SSE3 SSSE3 SSE4 SSE42 AES AVX AVX2 
[INFO] Version: 1.16.0
[INFO] Git: 6c2cc45628
[INFO] Built: Oct  9 2023
[INFO] =================================================
[INFO] [Input]: Found input driver: "x".
[INFO] [Environ]: SET_VARIABLES.
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Overrides]: Reindirizzare il file di salvataggio su "/home/topo/.config/retroarch/saves/Puella_Magi_Madoka_Magica_1x04_I_miracoli_e_le_magie_esistono.srm".
[INFO] [Overrides]: Reindirizzare il salva stato su "/home/topo/.config/retroarch/states/Puella_Magi_Madoka_Magica_1x04_I_miracoli_e_le_magie_esistono.state".
[INFO] [Content]: Il caricamento del contenuto è stato saltato. Le Implemenzioni verranno caricati in proprio.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_PIXEL_FORMAT: XRGB8888.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5e746c685800] st: 1 edit list: 1 Missing key frame while searching for timestamp: 0
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5e746c685800] st: 1 edit list 1 Cannot find an index entry before timestamp: 0.
[libretro INFO] [FFMPEG] libavformat version:	60.16.100
[libretro INFO] [FFMPEG] libavcodec version:	60.31.102
[libretro INFO] [FFMPEG] libavutil version:	58.29.100
[libretro INFO] [FFMPEG] libswresample version:	4.12.100
[libretro INFO] [FFMPEG] libswscale version:	7.5.100
[libretro INFO] [FFMPEG] Media information:
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/media/DATI/ANIME/Puella_Magi_Madoka_Magica_1x04_I_miracoli_e_le_magie_esistono.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 0
    compatible_brands: mp41avc1
    creation_time   : 2023-09-29T10:01:53.000000Z
    encoder         : vlc 3.0.18 stream output
    encoder-eng     : vlc 3.0.18 stream output
  Duration: 00:24:12.15, start: 0.000000, bitrate: 4243 kb/s
  Stream #0:0[0x1](jpn): Audio: mp3 (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 191 kb/s (default)
    Metadata:
      creation_time   : 2023-09-29T10:01:53.000000Z
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:1[0x2](eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], 4042 kb/s, 23.98 fps, 23.98 tbr, 1000k tbn (default)
    Metadata:
      creation_time   : 2023-09-29T10:01:53.000000Z
      handler_name    : VideoHandler
      vendor_id       : [0][0][0][0]
[libretro INFO] [FFMPEG] Using SW decoding.
[libretro INFO] [FFMPEG] Configured software decoding threads: 12
[INFO] [Environ]: SET_HW_RENDER, context type: gl.
[INFO] Requesting OpenGL context.
[INFO] [Replay]: Trovato ultimo slot di replay: #0
[INFO] [SRAM]: La SRAM non verrà salvata.
[INFO] [SRAM]: Carico SRAM saltato.
[INFO] [Core]: Versione delle API di libretro: 1, Compilato contro API: 1
[INFO] [Core]: Geometry: 1920x1080, Aspect: 1.778, FPS: 60.00, Sample rate: 44100.00 Hz.
[INFO] [Audio]: Set audio input rate to: 44100.00 Hz.
[INFO] [Video]: Set video size to: fullscreen.
[INFO] [Video]: Using HW render, OpenGL driver forced.
[INFO] [Video]: "glcore" saved as cached driver.
[ERROR] [Wayland]: Failed to connect to Wayland server.
[libretro INFO] [FFMPEG] Configured worker threads: 4
[INFO] [GLX]: GLX_EXT_swap_control_tear supported.
[INFO] [GLCore]: Found GL context: "x".
[INFO] [GLCore]: Detecting screen resolution: 1920x1080.
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [GLX]: Using Xinerama on screen #0.
[INFO] [GLX]: X = 0, Y = 0, W = 1920, H = 1080.
[INFO] [GLX]: Using windowed fullscreen.
[INFO] [GLX]: Creating shared HW context.
[INFO] [GLX]: Found swap function: glXSwapIntervalEXT.
[INFO] [GLCore]: Initializing HW render (2048x2048).
[INFO] [GLCore]: Max texture size: 16384 px, renderbuffer size: 16384 px.
[INFO] [GLCore]: Vendor: AMD, Renderer: AMD Radeon Graphics (radeonsi, renoir, LLVM 16.0.6, DRM 3.56, 6.7.2-arch1-1).
[INFO] [GLCore]: Version: 4.6 (Compatibility Profile) Mesa 23.3.4-arch1.2.
[INFO] [GLCore]: Using resolution 1920x1080.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports force feedback.
[INFO] [udev]: Pad #0 (/dev/input/event4) supports 16 force feedback effects.
[INFO] [Joypad]: Found joypad driver: "udev".
[INFO] [GLCore]: Loading stock shader.
[INFO] [slang]: Building pass #0 (N. D)
[INFO] [GLCore]: Not using frame history.
[INFO] [GLCore]: Not using framebuffer feedback.
[ERROR] [DBus]: Failed to suspend screensaver via DBus.
[INFO] [X11]: Suspending screensaver (X11, xdg-screensaver).
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LANG = "ENG"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
[INFO] [Video]: Found display server: "x11".
Can't locate Net/DBus.pm in @INC (you may need to install the Net::DBus module) (@INC entries checked: /usr/lib/perl5/5.38/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.38/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.38/core_perl /usr/share/perl5/core_perl) at -e line 6.
BEGIN failed--compilation aborted at -e line 6.
[INFO] [PulseAudio]: Requested 24576 bytes buffer, got 18432.
[INFO] [Audio]: Started synchronous audio driver.
[INFO] [ALSA] Using ALSA version 1.2.10
[INFO] [Microphone]: Initialized microphone driver.
[INFO] [Display]: Found display driver: "glcore".
[INFO] [Playlist]: Written to playlist file: "/home/topo/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Written to playlist file: "/home/topo/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_music_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_video_history.lpl".
[INFO] [Playlist]: Caricamento dei file della cronologia: "/home/topo/.config/retroarch/content_image_history.lpl".
[INFO] [Playlist]: Caricamento file preferiti: "/home/topo/.config/retroarch/content_favorites.lpl".
[INFO] [Playlist]: Written to playlist file: "/home/topo/.config/retroarch/content_video_history.lpl".
[INFO] [GLX]: Resized fullscreen resolution to 1920x1080.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[h264 @ 0x5e746c4a8bc0] reference picture missing during reorder
[h264 @ 0x5e746c4a8bc0] reference picture missing during reorder
[h264 @ 0x5e746c4a8bc0] reference picture missing during reorder
[h264 @ 0x5e746c4a8bc0] Missing reference picture, default is 65582
[h264 @ 0x5e746c4a8bc0] Missing reference picture, default is 65582
[h264 @ 0x5e746c4a8bc0] Missing reference picture, default is 65582
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[h264 @ 0x5e746c3254c0] mmco: unref short failure
[h264 @ 0x5e746cfb5c00] reference picture missing during reorder
[h264 @ 0x5e746cfb5c00] reference picture missing during reorder
[h264 @ 0x5e746cfb5c00] Missing reference picture, default is 65602
[h264 @ 0x5e746cfb5c00] Missing reference picture, default is 65602
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[h264 @ 0x5e746c4659c0] reference picture missing during reorder
[h264 @ 0x5e746c4659c0] Missing reference picture, default is 65610
[h264 @ 0x5e746c6d3880] mmco: unref short failure
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[h264 @ 0x5e746cace540] reference picture missing during reorder
[h264 @ 0x5e746cace540] reference picture missing during reorder
[h264 @ 0x5e746cace540] Missing reference picture, default is 65646
[h264 @ 0x5e746cace540] Missing reference picture, default is 65646
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[h264 @ 0x5e746c326740] reference picture missing during reorder
[h264 @ 0x5e746c326740] Missing reference picture, default is 65660
[h264 @ 0x5e746c3254c0] mmco: unref short failure
[h264 @ 0x5e746c3254c0] number of reference frames (0+5) exceeds max (4; probably corrupt input), discarding one
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro ERROR] [FFMPEG] Thread: Video deadlock detected.
[libretro INFO] [FFMPEG] Resetting PTS (bias).
[INFO] [Video]: Restored video driver to "vulkan".
[INFO] [Config]: Salvata la nuova configurazione su "/home/topo/.config/retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 05 seconds.
[INFO] [Core]: Unloading game..
[INFO] [PulseAudio]: Pausing.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Core]: Saved core options file to "/home/topo/.config/retroarch/config/FFmpeg/FFmpeg.opt".
[INFO] [Playlist]: Written to playlist file: "/home/topo/.config/retroarch/content_history.lpl".
[INFO] [XINERAMA]: Xinerama version: 1.1.
[INFO] [XINERAMA]: Xinerama screens: 1.
[INFO] [XINERAMA]: Saved monitor #0.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
1 Like

The ffmpeg core is built into RetroArch these days. I would like to break it into its own thing at some point but that hasn’t happened yet.

3 Likes