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

Play videos in the application using the gtk4 video widget. #21

Open
grantshandy opened this issue Jul 2, 2021 · 5 comments
Open

Play videos in the application using the gtk4 video widget. #21

grantshandy opened this issue Jul 2, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@grantshandy
Copy link

Tubefeeder is still using gtk3, when it (should) switch over to gtk4 in the near future it would be able to easily play videos within the application using the gtk::Video widget.

Once relm updates to gtk4 sometime in the future I'd love to do some work here and submit a pull request.

@Schmiddiii
Copy link
Collaborator

I would love some contributions to the project.
Sadly the project in its current form is barely maintainable (did not think the application would be popular in the beginning so I just threw something working together).

I currently do not have time for such a major refactor, but by the end of the month I will probably work on that.

Regarding the gtk::Video:
I think it is a good idea, but I see a few problems:

  • The PinePhone is slow, is gtk::Video as optimized as mpv for playing on the PinePhone.
  • Playback-Speed and other options on the (yes I am crazy and watching videos on 1.5-times speed). Are these available or could be implemented?
  • I don't know how easy it would be piping video from youtube-dl to gtk::Video. Some research might be needed.

Maybe we should implement the video in the application, for people where a simple media player is enought, but keep mpv as a secondary option for people who want a powerful and configurable media player.

relm4 probably still needs a while so we can think about that and refactor the application.

@Schmiddiii Schmiddiii added the enhancement New feature or request label Jul 2, 2021
@Schmiddiii Schmiddiii added this to Todo in Next Projects Jul 4, 2021
@Ferenc-
Copy link
Contributor

Ferenc- commented Jul 29, 2021

@Schmiddiii do you have perhaps a list of good first contribution candidates?
I think that would encourage contributions.

BTW, there is this new player on the block clapper, which can do hardware accelerated video decoding, from a youtube URI on an PP, it's just so much better playback experience, that I even went on, and swapped out
mpv with clapper as a quick fix. (Maybe we could have a temporary setting somewhere, where the user can change the player?)

BTW in my interpretation the documentation of gtk::Video clearly states, that this is not the intended use case of gtk::Video,
and for serious tasks, one should use a framework like gstreamer (that's what clapper uses as well).
So perhaps embedding gstreamer would be better than gtk::Video?

@Schmiddiii
Copy link
Collaborator

Schmiddiii commented Jul 29, 2021

I currently do not have many contribution candidates as I would like to refactor the application first. After that contributions should be easier.

A few things that should still be possible to contribute to:

  • Update UI (mainly from the view! macro of relm4) as I am not too familiar with creating good looking UI and just threw together something that was working
  • Update UI for desktop usage (from the flathub stats it seems that more people are using it on desktop than on the PinePhone)
  • Integrate other player like clapper for playback. I have already talked with Uniformbuffer about this on Matrix and he seemed willing to contribute. As his fork of this repository still has no new commits I believe he currently is not working on that so feel free to contribute.

From the Matrix conversation it seemed possible to support (almost) any video player using xdg-mime query default video/* and than spawning it using gtk-launch, falling back to mpv if something fails. This does not seem possible on flatpak, so we will have to make mpv the only video player for now on flatpak, e.g. by including a diff in the flathub repository.
It may also be easier to provide the application as a enviromental variable, e.g TUBEFEEDER_PLAYER or similar.

BTW in my interpretation the documentation of gtk::Video clearly states, that this is not the intended use case of gtk::Video,
and for serious tasks, one should use a framework like gstreamer (that's what clapper uses as well).
So perhaps embedding gstreamer would be better than gtk::Video?

I have already heared that somewhere but I did not look at the documentation this close.
Integrating gstreamer would definitly be possible, but as I do not currently have any experience with gstreamer, spawning a external application will be the default for the time.
Once I have refactored the application, contributions about this topic are of course welcome.

@bertob
Copy link

bertob commented May 8, 2023

Ping? I just tried the app for the first time in a while and the UI is quite nice now, but the lack of an in-app player makes for very unintuitive UX.

@Schmiddiii
Copy link
Collaborator

No there is still no update on this. While being unintuitive (something that has also been discussed in #95), I still stand by my opinion that I am not able to create a video player that is at least comparable to most video players out there. Furthermore, it would not be as easy as just using gstreamer as I would also need to download (while playing) the videos from the platforms.

The only way I currently see Tubefeeder having an integrated video player would be including Clapper (for which the creator has already announced plans to make it integratable, but I don't know how close he currently is to the goal).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

4 participants