elementary / videos

Video player and library app designed for elementary OS
https://elementary.io
GNU General Public License v3.0
58 stars 17 forks source link

Video does not resume after unpausing #372

Open activey opened 1 year ago

activey commented 1 year ago

What Happened?

This is a very strange behavior... when I use the app shipped with Elementary all works perfectly fine, I can pause video, resume, everthing is well. But then I thought of downloading the git version of it and building by myself. I was able to do so and run the compiled app. But now, when I play the same video file and try to pause and then resume - the video stays still and audio continues :|

I have no idea what is the difference. I build the app with meson and ninja and then run ./src/io.elementary.videos Are there any specific flags I need to build the app with? Anything I'm doing wrong?

I really appreciate any answers as I got to this point while working on my other GTK4 app that uses GStreamer and observed the same problems with pausing and resuming :(

BR

Steps to Reproduce

  1. Download the git version,
  2. Build with meson and ninja,
  3. Run with ./io.elementary.videos
  4. Play video with sound

Expected Behavior

It should pause and resume both audio and video but the hand-compiled version is having problems with resuming the video (its stuck), please advise ;(

OS Version

7.x (Horus)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

No response

leolost2605 commented 1 year ago

Up until two days ago I had the same issue but ignored it because it happened with all gstreamer apps I tried (e.g. GNOME Videos too) and as googling didn't bring up any results I assumed I broke something on my install, seems I was wrong :( Anyways I think we can't do anything about it in elementary Videos because it's a gstreamer bug? And it might have already been fixed, maybe with a kernel and/or gstreamer and/or nvidia driver update because I don't have the issue anymore. Not sure though maybe you can check what kernel and, if you are using nvidia, what driver version you are running?

activey commented 1 year ago

Hi @leolost2605, no I dont use nvidia, just plain intel drivers, all my other video apps work fine, I mean, those shipped with flatpak ;P But when I build the app by myself with ninja everything goes crazy.

leolost2605 commented 1 year ago

Ah never mind I overlooked you installed it via ninja so maybe it's something different altogether 😅 Do you have the gst-plugin-gtk4 installed? Without it weird stuff will happen. Also the default branch recently changed from master to main maybe you still used master? And apart from that could you try running it via flatpak and see if that helps?

activey commented 1 year ago

Yes, I have gst-plugin-gtk4 as I pulled the gst-plugins git repo and built it by hand ;) Sooo I just copied the compiled libgstgtk4.so into proper folder. But, I'm also having problems with other gstreamer elements like decodebin together with autoaudiosink and autoaudiovideosink, basically its the same effect: video stays paused but audio continues when resuming playback :(

As far as I can see my gst-inspect-1.0 --version reports gstreamer 1.20.3... Does it mean I'm affected because I use some old Gstreamer and Videos is based on some git master/main instead?

And yeah, I use main branch of Videos app.

activey commented 1 year ago

Just... what is the difference between meson and flatpak build? I'm lost :(

activey commented 1 year ago

I did another test: I've replaced gtk4paintablesink with xvimagesink and the result is the same - video starts playing in new window, I hit pause - everything pauses as expected, then I hit resume and only audio continues plaing :(

I'm attaching two videos, first one with original code from git repo, second with my modification that uses xvimagesink instead of gtk4paintablesink. The effect is the same :/

https://github.com/elementary/videos/assets/1751891/ca6f19b4-5bbd-49fb-b73f-f25827833a37

https://github.com/elementary/videos/assets/1751891/bc01daaa-3e36-4b6e-9795-3b6709003720

activey commented 1 year ago

I've built my version with xvimagesink with flatpak, installed it and... it works!

image

what ... is ... going ... on?

activey commented 1 year ago

Oh dear me... I've just built my app with flatpak and it all works fine, even better when ninja compiled version... For me it does not make much sense :( How is the Videos app developed locally then? I can't imagine building the whole flatpak app each time I do a local change in order to test it, or maybe there is something I dont understand?

leolost2605 commented 1 year ago

what ... is ... going ... on?

Tbh I've got no idea AFAIK it should work local too 😅

Oh dear me... I've just built my app with flatpak and it all works fine

Glad to hear that :)

How is the Videos app developed locally then? I can't imagine building the whole flatpak app each time I do a local change in order to test it, or maybe there is something I dont understand?

Hmm building the flatpak should take only marginally longer than with ninja (except for the first time)... Or if that's not it can you specify what's wrong with building the flatpak?