Rafostar / clapper

Level up your video experience with a modern and user-friendly media player.
https://rafostar.github.io/clapper/
GNU General Public License v3.0
756 stars 35 forks source link

Unreliable playback of h264 video. #57

Closed pedrofleck closed 2 years ago

pedrofleck commented 3 years ago

I'm having a weird issue that I didn't have when I last tested Clapper (an older version of it and Fedora), some (1 out of 3 more or less) h264 videos just won't play (I get only a black screen and no audio) and a few of the ones that work have an issue that they freeze when I hit play/pause multiple times. It doesn't seem to be related to the audio codec, bitrate, container or resolution. I initially thought that it was an issue with Gstreamer (considering that I'm running Fedora 34 Beta), but all the videos work normally with Totem (and Celluloid - former Gnome MPV).

I tested multiple older MPEG-1 video files and some 4K VP9 ones and it doesn't happen with them.

sp1ritCS commented 3 years ago
  1. Do you have the flatpak or native version?

  2. Mind sharing these files?

Rafostar commented 3 years ago
  1. What GPU?
  2. Wayland or X11?
  3. Did you edited GStreamer plugin ranking in any way (enabled vah264dec or something else)?
pedrofleck commented 3 years ago

@sp1ritCS @Rafostar

  1. Flatpak version
  2. Sure, I'll upload here a file that isn't too heavy or personal.
  3. Intel HD 5500, I tried with both Intel Media Driver and the older Intel libva driver
  4. Wayland
  5. No, unless it is done by RPM Fusion.
Rafostar commented 3 years ago

@pedrofleck

Wayland No, unless it is done by RPM Fusion.

Try with different h264 decoder. For example check if enabling vah264dec with rank 300 in Clapper preferences->advanced->gstreamer makes any difference (you need to close the player for the changes done there to take effect). It should reduce your CPU and GPU usage by half if you are on Wayland if it works correctly for you (experimental plugin).

Sure, I'll upload here a file that isn't too heavy or personal.

Just upload it to some free file sharing service and send a link to the download here, please.

alosarjos commented 3 years ago

Hi there, just tried Clapper today (Nice job, looks amazing). But the HW acceleration is failing for me.

Arch Linux AMD 5700XT Installed stable version from AUR

With the vah264dec enabled, it crashes trying to open a mp4 video file. Disabling it, it works.

Rafostar commented 3 years ago

@alosarjos

With the vah264dec enabled, it crashes trying to open a mp4 video file. Disabling it, it works.

vah264dec is an experimental GStreamer plugin in early development (that is why it is disabled by default). Even with that said I never had any problems with it personally (with gstreamer 1.18). If you have problems with GStreamer, then they should be reported on GStreamer gitlab.

But the HW acceleration is failing for me.

No vah264dec does not means no acceleration. GStreamer is using a plugin ranking. It will try to use next h264 decoder plugin available with highest rank - that is usually gstreamer older vaapi plugins if you have them installed and working.

If you are getting some crashes then it would be nice if you could provide some logged output of them or do a little debugging. I can't just guess what is wrong.

alosarjos commented 3 years ago

Is this good enough? dump.log

Rafostar commented 3 years ago

Yeah. This log only assures me that it is either gstreamer or radeonsi driver issue. Playback is handled by GStreamer here you see.

The vah264dec plugin is in constant development (and disabled by default for a reason). If I were you, I would start by compiling latest gstreamer with vah264dec from git and if problem persisits, reporting it on gst-plugins-bad gitlab - thats where this plugin comes from. In the mean time you still can use older vaapi plugins if va are failing for you.

Rafostar commented 2 years ago

Since GStreamer 1.20 we use a different decoder by default (vah264dec) which is now more reliable then in its early days. This problem was reported back when we used old vaapidecodebin with GStreamer 1.18.

I am closing this one as it was reported against old h264 decoder that we do not use anymore by default. If this is still/also a problem with vah264dec feel free to open a different issue.