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

Looking for an alternative media player #16

Closed
6 of 7 tasks
KaneBetter opened this issue Oct 15, 2022 · 29 comments · Fixed by #19
Closed
6 of 7 tasks

Looking for an alternative media player #16

KaneBetter opened this issue Oct 15, 2022 · 29 comments · Fixed by #19
Assignees
Labels
HIGH high priority

Comments

@KaneBetter
Copy link
Collaborator

KaneBetter commented Oct 15, 2022

Since in order to solve the decode @SSSSam141 found that he needed to roll back the system version of Raspberry, I tried to solve the problem with another idea. At the same time, since this problem will involve the problem of unsynchronized, frame tearing afterward, so I set the level of this issue to high

  • OMXPlayer
  • Kodi
  • Plex Media Player
  • OSMC
  • XBian
  • LibreELEC
  • RasPlex
@KaneBetter KaneBetter added the HIGH high priority label Oct 15, 2022
@KaneBetter KaneBetter added this to the #2 MSWE first working beta milestone Oct 15, 2022
@KaneBetter KaneBetter self-assigned this Oct 15, 2022
@KaneBetter KaneBetter added Epic and removed Epic labels Oct 15, 2022
@omarcostahamido
Copy link
Owner

Thanks for starting this issue @KaneBetter .
It seems that this could be a parent issue for multiple issues (and branches) testing all those different options.
If you need a simpler pvm.maxpat for quick testing purposes, let me know. Else, as you've realized by now, you can also quickly draft an osc python script to send a single command.

Speaking of which, I don't want to close the door on the controller patch (pvm.maxpat) to use some other protocol other than OSC. For example, UDP (which OSC is based on), TCP, or even http requests, and websockets! I doubt we'll get significantly better speed with those but, again, I'm happy to do some max patching to help test that.

@KaneBetter
Copy link
Collaborator Author

Thanks for starting this issue @KaneBetter . It seems that this could be a parent issue for multiple issues (and branches) testing all those different options. If you need a simpler pvm.maxpat for quick testing purposes, let me know. Else, as you've realized by now, you can also quickly draft an osc python script to send a single command.

Speaking of which, I don't want to close the door on the controller patch (pvm.maxpat) to use some other protocol other than OSC. For example, UDP (which OSC is based on), TCP, or even http requests, and websockets! I doubt we'll get significantly better speed with those but, again, I'm happy to do some max patching to help test that.

Thanks for reminding me of this, we use Zenhub to manage our projects, it works as a plugin for Github, easy to create Epic, Sprint and manage the progress of issues, Roadmap etc.
I will send the invite link to you and Grant

@rustberry
Copy link
Collaborator

Also tried compiling VLC from the source but no luck. (https://thepi.io/how-to-compile-vlc-media-player-with-hardware-acceleration-for-the-raspberry-pi/ https://www.techybugz.com/raspberry-pi/raspberry-pi-vlc/)

Some needed libraries cannot be found on Rabian OS (at least bullseye 11). Trying to compile without them resulted in errors during make.

@KaneBetter
Copy link
Collaborator Author

After trying other players and play centers, I found that OMXPlayer runs smoothly in the buster(10) system environment and is a more suitable solution.
But this still has the bug that when you loop the video, you can only set the rate for one of the loops
The following are two solutions.

@omarcostahamido
Copy link
Owner

@rustberry have you tried compiling VLC on bullseye 10?

@KaneBetter thank you so much for trying all those players!
It doesn't surprise me that omxplayer runs smooth - it is done in c++ right?

But this still has the bug that when you loop the video, you can only set the rate for one of the loops

I'm not sure I understood it. Do you mean that if you set a playback rate other than normal speed, when it loops and starts from the beginning it changes the playback speed back to normal? That sounds like an omx bug...
From the 2 solutions you present, does the second on imply having the control patch sending a change playback speed command everytime the video clip loops? (that would means that it must keep track of playback position).

My question about omxplayer now would be more in the sense of: what are the remotely accessible commands, and which protocol is it compatible with. If no networking protocol is in place, can we start planning on how to implement it? 😃

@KaneBetter
Copy link
Collaborator Author

@rustberry have you tried compiling VLC on bullseye 10?

@KaneBetter thank you so much for trying all those players! It doesn't surprise me that omxplayer runs smooth - it is done in c++ right?

But this still has the bug that when you loop the video, you can only set the rate for one of the loops

I'm not sure I understood it. Do you mean that if you set a playback rate other than normal speed, when it loops and starts from the beginning it changes the playback speed back to normal? That sounds like an omx bug... From the 2 solutions you present, does the second on imply having the control patch sending a change playback speed command everytime the video clip loops? (that would means that it must keep track of playback position).

My question about omxplayer now would be more in the sense of: what are the remotely accessible commands, and which protocol is it compatible with. If no networking protocol is in place, can we start planning on how to implement it? 😃

Your understanding is correct, the python program controls the OMXPlayer by using the OMXPlayer Wrapper, and I have uploaded a branch at https://github.com/omarcostahamido/PVM/tree/UseOmxplayer.

@rustberry
Copy link
Collaborator

@omarcostahamido: @rustberry have you tried compiling VLC on bullseye 10?

Yep, after downgrading to bullseye 10 also tried to compile vlc on 10. Same issue: cannot install all the required packages for compiling 😞. Though the bootstrapping and configuring stages went okay without showing errors, the final compiling stage would fail.
image

Compared to 11 bullseye 10 has more packages satisfied, but still not enough.

Try to install manually some of the missing packages, but they all seemed to be removed for being outdated.
Some examples:
https://discourse.libsdl.org/t/raspberry-pi-4-support-gles-1-1/26350
https://forums.raspberrypi.com/viewtopic.php?t=244437#p1490886

@KaneBetter
Copy link
Collaborator Author

Find the same issue in OMXPlayer: popcornmix/omxplayer#799

@KaneBetter
Copy link
Collaborator Author

Find the solution for our case in a Pull request. popcornmix/omxplayer#678
However, the developers don't seem to want to merge.

@KaneBetter
Copy link
Collaborator Author

We successfully added the option for OMXPlayer to play videos at variable speed, and created the build shell script, see commit: c3c57b9

@KaneBetter
Copy link
Collaborator Author

Successfully called force-fps in pvm_omx.py to implement variable rate, see commit: d4b12b9
So far, all the basic functions have been implemented, continue to modify the code format

@SSSSam141
Copy link
Collaborator

I think we have successfully find an alternative to VLC that is OMXPlayer. While I have found that the current logic in pvm_omx.py still has some problem, when I try to press twice reset, it starts to play video. There is no similar instance variable in OMXPlayer. So I think we need to focus on making the logic work for the control pad without bugs. Therefore, this issue could be closed and turn to next issue for implementing pvm_omx.py.

@omarcostahamido
Copy link
Owner

omarcostahamido commented Oct 19, 2022

trying to build @KaneBetter 's version of omx, on a vbox with raspios buster 10:
Screen Shot 2022-10-19 at 7 17 48 PM
any ideas?

@SSSSam141
Copy link
Collaborator

@omarcostahamido I recommend you to input the command line by line since there might be some cases that the script does not cover.

@KaneBetter
Copy link
Collaborator Author

trying to build @KaneBetter 's version of omx, on a vbox with raspios buster 10: Screen Shot 2022-10-19 at 7 17 48 PM any ideas?

Can you try input ./build_omxplayer.sh

@rustberry
Copy link
Collaborator

Can you try input ./build_omxplayer.sh

@omarcostahamido This worked for me. Also if you try bash build_omxplayer.sh it would also work. Think we also need to add something to the script, like apt purge omxplayer to remove any possible existing installation.

To test the new binary, run omxplayer --force-fps 10 jellyfish720p.mp4 which would play the video at the forced rate.

@omarcostahamido
Copy link
Owner

well yeah
both ./build_omxplayer.sh and bash build_omxplayer.sh (bash, haha) do something.

I'm still not quite getting it to launch though:
Screen Shot 2022-10-19 at 8 19 54 PM

@omarcostahamido
Copy link
Owner

right, so, at the end of the building process it says that some packages are missing

Screen Shot 2022-10-19 at 8 23 14 PM

@rustberry
Copy link
Collaborator

rustberry commented Oct 19, 2022

How about running these before running the script again:
sudo apt purge omxplayer && sudo apt-get update --allow-releaseinfo-change
I didn't run into this, strange 🤔

Also when using the omxplayer command, it should be fine to be in whatever directory, since it's already been installed to the system.

ref:
https://www.linuxtutorials.org/This-must-be-accepted-explicitly-before-updates-for-this-repository-can-be-applied-See-apt-secure-8-manpage-for-details/

@omarcostahamido
Copy link
Owner

on my end at least omxplayer command is not recognized

following what you said:
Screen Shot 2022-10-20 at 12 12 16 PM
Screen Shot 2022-10-20 at 12 12 36 PM

I am running this version on my vbox: 2021-01-11-raspios-buster-i386 [1]
This is called raspberry pi for mac/windows desktop [2]
Maybe that is enough to drive the difference we are noticing here?
Could you please clarify which precise image version of the OS you're using?

This is related to issue #6 : we need very clear instructions on the readme about which version to use and how to get it.

@SSSSam141
Copy link
Collaborator

SSSSam141 commented Oct 20, 2022

on my end at least omxplayer command is not recognized

following what you said: Screen Shot 2022-10-20 at 12 12 16 PM Screen Shot 2022-10-20 at 12 12 36 PM

I am running this version on my vbox: 2021-01-11-raspios-buster-i386 [1] This is called raspberry pi for mac/windows desktop [2] Maybe that is enough to drive the difference we are noticing here? Could you please clarify which precise image version of the OS you're using?

This is related to issue #6 : we need very clear instructions on the readme about which version to use and how to get it.

@omarcostahamido I have updated the readme file regarding the installation of new Raspberry Pi version on my branch and the I remember that the bulleye 11 system does not support OMXPlayer so you need to roll back to the system version of buster 10 first. Please check. If you have any question, please let me know.

@KaneBetter
Copy link
Collaborator Author

on my end at least omxplayer command is not recognized

following what you said: Screen Shot 2022-10-20 at 12 12 16 PM Screen Shot 2022-10-20 at 12 12 36 PM

I am running this version on my vbox: 2021-01-11-raspios-buster-i386 [1] This is called raspberry pi for mac/windows desktop [2] Maybe that is enough to drive the difference we are noticing here? Could you please clarify which precise image version of the OS you're using?

This is related to issue #6 : we need very clear instructions on the readme about which version to use and how to get it.

The reason you are getting this error is that the statement you ran made you delete the OMXPlayer, the correct action is as follows.
sudo apt purge omxplayer && sudo apt-get update --allow-releaseinfo-change
cd to folder
./build_omxplayer.sh
omxplayer --force-fps jellyfish720p.mp4

@omarcostahamido
Copy link
Owner

thx @rustberry for the link [1] yesterday.
It is very strange but I need to change it several times before it takes effect. And it seems that after correcting the date/time, if I run the sudo hclock --hctosys command then it goes back to October 19 at an incorrect time.
Here what I was able to get at:
Screen Shot 2022-10-21 at 2 34 19 PM

next up for me: trying to setup the same version of raspios as the one listed on the readme now.

@KaneBetter
Copy link
Collaborator Author

Since we have found the OMXPlayer, I am going to make PR to merge UseOmxplayer branch into main.
So that other developer can create their own branch based on this.

@omarcostahamido
Copy link
Owner

@KaneBetter thank you for creating the PR with the proper message that will automatically close this issue.

@omarcostahamido
Copy link
Owner

next up for me: trying to setup the same version of raspios as the one listed on the readme now.

I can't actually create a virtual machine to install the same version of the OS that you're using because... rpi is an arm-based hardware. There might be a way to emulate it [1] but it'll be inefficient. I will try to install a newer version of the raspios just for the sake of it and report back.

@omarcostahamido
Copy link
Owner

I will try to install a newer version of the raspios just for the sake of it and report back.

after a little bit of fiddling around I was able to get a buster11 install running and apparently reaching a little further this time around but without complete success.
Screen Shot 2022-10-24 at 3 57 25 AM

(though less than desirable, It is not absolutely essential that I am able to run it on my virtualbox. We need it to run really well on those rpi and flatscreens!)

please soldier on.

@KaneBetter
Copy link
Collaborator Author

Yeah, it is definitely going further. I look up those packages, and I found this.
These packages are used for building the binary and these packages can't be found on every platform RPI support, see here.
So the reason why I didn't come across this is that we burn our image through RPI imager which automatically installs these packages.

@omarcostahamido
Copy link
Owner

omarcostahamido commented Oct 25, 2022

@KaneBetter do you reckon a new issue should be open right away to Improve the build omxplayer shell script then?
For example, one thing I remember is that it would be nice for the shell script to start by deleting the folder automatically before it attempts to build omxplayer again (and fails when it encounters the existing folder)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
HIGH high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants