pi-apps
pi-apps copied to clipboard
rpi-play app request
Hi, this is my first real commit for your project other than changing txt! I may have a few errors you can iron out! I haven't tested my work as I couldn't get pi-apps settings to work very well on LM x86, sorry in advance!
I have only followed the template, so you may need to add some edits to separate files to make it appear in the menu
Also I didn't understand how the "${DIRECTORY}/pkg-install" bit works so I have installed the dependencies just through apt.
Sorry/You're welcome
zips are prefered for apps, read the readme part about creating apps and use pi-apps's app creation tool.
Does this mean I have to rewrite?
to write a app that is eligible script-wise for pi-apps you have to use the pi-apps app creator.
for example RPi-play only works on 32bit, that means that the install script has to be named install-32
and pi-apps will hide the app on 64bit systems.
and you have to use pkg-install
to install any dependencies and purge-installed
to remove them.
a side note: cmake isn't a run-time dependency, meaning its not needed to run the app.
@CleanMachine1 if you want I will copy and slightly modify your script into a zip (you will be in the credits of course), but I suggest you do it so you learn for the next time.
I highly recommend you read the official pi-apps documentaion on how to create apps: https://github.com/Botspot/pi-apps#to-do scroll down and click on creating an app
to expand them.
Ah I fixed the issue with using the settings, give me 10 mins
PS: I would have really liked the contribution but the credits is good enough i guess :)
In the progress of making it right now
The feeling of a PR getting accepted is a nice feeling!
to write a app that is eligible script-wise for pi-apps you have to use the pi-apps app creator.
Well not necessarily, but this is how it works in practice. You will have a harder time getting the scripts working without the App Creator Wizard Tool Utility Widget Application thing.
Is it possible to live without it? Sure. But why would you?
PS. @CleanMachine1 if you are confused by anything on the documentation for creating an app, let me know. (I had a hard time balancing informational content, with readability.
OK I have finished copying files to the zip! RPi-Play.zip
I will learn, and may work on this project in the future Remember I haven't tested this at all because I don't know where to begin but they seemed to go through the script checking thing with only warnings
This is actually really good for a first try.
Comments on your install script:
wget https://github.com/chunky-milk/raspbian_repository/blob/master/debian/pool/rpiplay_20210320-1_armhf.deb -O /tmp/rpiplay.deb|| error 'Failed to download .deb file'
I think it'll be necessary to put a space between the deb
and the ||
.
sudo apt install libavahi-compat-libdnssd-dev libplist-dev libssl-dev -y || error 'Failed to install dependencies'
Here's the pkg-install equivalent:
"${DIRECTORY}/pkg-install" "libavahi-compat-libdnssd-dev libplist-dev libssl-dev" "$(dirname "$0")" || exit 1
sudo apt install /tmp/rpiplay.deb --fix-missing -y > || error 'Failed to install rpiplay.deb'
I'm not sure why there's a >
there, but I'll remove it as it does nothing.
sudo rm /tmp/rpiplay.deb || error 'Failed to remove rpiplay.deb due to it not being required'
Let's think objectively: what permissions does the rpiplay.deb
file have? We downloaded it with wget
. No sudo
was used to run wget
, so it shouldn't be necessary to remove the file with sudo
either.
That's it for the install script! Great job.
Uninstall script:
Again I'm implementing the Pi-Apps pkg-install standard.
Original uninstall script:
sudo apt purge rpiplay libavahi-compat-libdnssd-dev libplist-dev libssl-dev -y || error 'Failed to remove dependencies'
sudo apt autoremove -y && sudo apt clean || error 'Failed to clean system'
New uninstall script:
sudo apt purge rpiplay || error "apt failed to remove rpiplay"
"${DIRECTORY}/purge-installed" "$(dirname "$0")" || exit 1
First error:
Installing RPi-Play with install script
--2021-03-20 19:11:10-- https://github.com/chunky-milk/raspbian_repository/blob/master/debian/pool/rpiplay_20210320-1_armhf.deb
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-03-20 19:11:10 ERROR 404: Not Found.
Failed to download .deb file
@Botspot new link: https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb
Anyway to keep the file updated from @chunky-milk?
@Botspot new link: https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb
Didn't work.
Installing RPi-Play with install-32 script
--2021-03-20 19:13:54-- https://github.com/chunky-milk/raspbian_repository/blob/master/debian/pool/rpiplay_20210320-1_armhf.deb
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-03-20 19:13:54 ERROR 404: Not Found.
Failed to download .deb file
Give me a min, and I'll get teh raw.github....
here is the raw link: https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb?raw=true
here is the raw link: https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb?raw=true
Still!
Installing RPi-Play with install-32 script
--2021-03-20 19:18:51-- https://github.com/chunky-milk/raspbian_repository/blob/master/debian/pool/rpiplay_20210320-1_armhf.deb
Resolving github.com (github.com)... 140.82.112.4
Connecting to github.com (github.com)|140.82.112.4|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2021-03-20 19:18:51 ERROR 404: Not Found.
Failed to download .deb file
Oh. I figured out what happened.
- Open the
install
file with a text editor. - Rename the file to
install-32
. - Proceed to continue making edits to the
install
file and wonder why nothing's working.
@Botspot that's a different link, use https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb?raw=true
https://raw.githubusercontent.com/chunky-milk/raspbian-addons/master/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb
@Botspot that's a different link, use https://github.com/chunky-milk/raspbian-addons/raw/master/raspbian-addons/pool/main/r/rpiplay/rpiplay_20210320-1_armhf.deb?raw=true
Yes, I know. The problem was on my end, as I was editing the wrong file. After opening install-32
and changing the url there, it downloaded fine.
Oh. I figured out what happened.
- Open the
install
file with a text editor.- Rename the file to
install-32
.- Proceed to continue making edits to the
install
file and wonder why nothing's working.
Ohhh, I thought I was doing something wrong because it was creating a install32 file, so I changed it to just install as it made more sense to me, but now thinking about it, having a 32bit only file makes sense for it to say
It installed successfully.
How do I run/test this now?
you need an iOS device...
However, running it should change your entire screen to a black screen, waiting for an input from an iOS device (I think its esc or alt+f4 to escape)
you need an iOS device...
Well I don't have any of those.
But is there supposed to be a menu button somewhere? How would I test that it installed successfully and is usable?
We could have the script create a desktop shortcut.
However, running it should change your entire screen to a black screen, waiting for an input from an iOS device (I think its esc or alt+f4 to escape)
That's what I'm trying to ask. How can I run it?
try running rpi-play or rpiplay in the terminal
Been 5 mins, must be stuck on a black screen :laughing:
You could probably check its working by switch to tty1 and running sudo apt install nmap nmap localhost and checking for 443 and 554 in the ports because they are the open ports required for airplay/rpiplay
Been 5 mins, must be stuck on a black screen 😆
It worked. rpiplay
caused a black screen like you said it would.
But I was not able to find a way to exit.
Alt+F4 did nothing. I managed to close all my windows (text editors, virtual machines, Libreoffice, Discord...) and still nothing happened.
I tried doing the keyboard shortcut that runs xkill
to terminate the process. Nothing.
I tried going to the console, but even that was covered in black.
Finally, I went back to the desktop framebuffer and by slowly moving my mouse, I located the terminal that had launched rpiplay
and pressed Ctrl+C.
Aftermath: I'm never going to run rpiplay again! (just kidding, but before I run it again, I want to know it'll be easier to close next time)
@Botspot did you try pressing Ctrl+C while at the black screen? That always worked for me.
@Botspot did you try pressing Ctrl+C while at the black screen? That always worked for me.
That's what I finally ended up doing, but it was the last thing I tried.
Maybe we should add something inbetween the .desktop file pointing to rpiplay eg: parameters.desktop < rpiplayerlauncher.desktop -- rpiplay
I feel this is required as there are a lot of useful parameters inside of rpiplay
-n name: Specify the network name of the AirPlay server.
-b (on|auto|off): Show black background always, only during active connection, or never.
-r (90|180|270): Specify image rotation in multiples of 90 degrees.
-f (horiz|vert|both): Specify image flipping.
-l: Enables low-latency mode. Low-latency mode reduces latency by effectively rendering audio and video frames as soon as they are received, ignoring the associated timestamps. As a side effect, playback will be choppy and audio-video sync will be noticably off.
-a (hdmi|analog|off): Set audio output device
-vr renderer: Select a video renderer to use (rpi, gstreamer, or dummy)
-ar renderer: Select an audio renderer to use (rpi, gstreamer, or dummy)
-d: Enables debug logging. Will lead to choppy playback due to heavy console output.
-v/-h: Displays short help and version information.
```
For a basic start, I think we should just default it to use -a hdmi as most probably use hdmi sound, right?
For a basic start, I think we should just default it to use -a hdmi as most probably use hdmi sound, right?
Who made this software? It ought to automatically select the global default audio output device. (ALSA or Pulseaudio settings)
For a basic start, I think we should just default it to use -a hdmi as most probably use hdmi sound, right?
Who made this software? It ought to automatically select the global default audio output device. (ALSA or Pulseaudio settings)
FD- was the creator, maybe check the gh for all the answers
zenity.sh.zip Here contains a zenity GUI which should be the part executed in the desktop file
Its a small zenity GUI which asks for the input from radiobuttons and depending on the output will run rpiplay
Sorry for being a little obnoxious with message spam but, how long does it take for an app to be approved
Sorry for being a little obnoxious with message spam but, how long does it take for an app to be approved
It really depends on how much time I have, and what needs to be done.
Its a small zenity GUI which asks for the input from radiobuttons and depending on the output will run rpiplay
Oh fascinating. But I think more importantly, if rpiplay was being run from the menu, there would be no terminal to send a Ctrl+C to.
How would it be possible to exit rpiplay?
I believe its just Ctrl+C, regardless of the terminal
However I put an issue in RPi-Play a few days back Issue but haven't received any replies, just like most issues
I believe its just Ctrl+C, regardless of the terminal
However I put an issue in RPi-Play a few days back Issue but haven't received any replies, just like most issues
No, Ctrl+C only works if you ran it from a terminal.
If you ran rpi-play from Start menu -> Run
, there would literally be no possible way to exit rpiplay.
Same with a menu launcher: there would be no possible way to exit rpiplay.
I think that if this app was added now, users would find it very frustrating to have to unplug their Pies in order to exit rpiplay.
This app needs to be improved before it can be added to pi-apps. I'd like to see a feature where pressing any key or wiggling the mouse will exit rpiplay.
Wait, that's it! Maybe it would work to run rpiplay as a screensaver. Then the screensaver daemon would kill rpiplay when the user pressed a key or wiggled the mouse. IDK how to do that though.
I have a different idea, we can run RPi-Play from a script that traps ctrl+c and kills rpi-play. though I'm not sure if it will work without the terminal window open.
Or just run it with a terminal..
Use the terminal run config thing to use a terminal
I have a different idea, we can run RPi-Play from a script that traps ctrl+c and kills rpi-play. though I'm not sure if it will work without the terminal window open.
Think about it this way: how many beginner users would ever think to use Ctrl+C? Few.
I think it would be a lot safer for it to exit when pressing any key or moving the mouse.
Oh I just realized: we could use xprintidle
and a simple bash script.
I have a different idea, we can run RPi-Play from a script that traps ctrl+c and kills rpi-play. though I'm not sure if it will work without the terminal window open.
Think about it this way: how many beginner users would ever think to use Ctrl+C? Few. I think it would be a lot safer for it to exit when pressing any key or moving the mouse.
Oh I just realized: we could use
xprintidle
and a simple bash script.
Sorry to say but have you thought about the consequences of that
Anyone with a trackpad: ruined with a nudge
Anyone with a broken mouse: ruined
Anyone near a keyboard: ruined with a nudge
Later I will test on one of my pis to see what exits the program
I have found a great solution after reading the documentation again
-b (on|auto|off): Show black background always, only during active connection, or never.
don't know whether auto or off is better, have to test in an hour
OK, I am back with great results how ever they come at a cost
Opening through run (without terminal): Nothing happens, the server doesn't show up onto airplay
Opening through terminal with command rpiplay -l -b auto
:
(the L stands for low latency as it tends to work cleaner)
CTRL+C allows for exit (because of terminal)
the black screen only appears during active connections from the ios device
as soon as the connection is ended, the black border goes away
Opening through terminal with command rpiplay -l -b off
(Same L applies from prev command)
Ctrl+C still works if needed
Without black border, it makes the output on the pi very ugly as it overlaps what ever is beneath
Personally I think we have struck gold here with -b auto The auto command seems the most sensible and I will add an update to the zenity.sh.zip folder to add a note regarding exiting
Is there anything missing from this app going live?
Is there anything missing from this app going live?
My time. And the fact that this app seems incomplete still.
Your latest zip only contained a single bash script for zenity. How does that integrate with the existing app? Where is the menu button that runs it in a terminal?
Well I suppose I require your help with this part, I have made the bash zenity script which be run (still needs to be updated which a terminal bit but that can be done in the desktop file)
The menu button will have to be done by you as I wouldn't even know how to begin
Hi, I have been working for another hour and have packaged a new version for the actual .deb file
I don't know whether you trust where ever chunky-milk got his .deb from but I packaged it from a RPi-4B 2GB from source
Also I have made a .desktop file and here is its contents to add to the install32 file
[Desktop Entry] Type=Application Name=RPi-Play Comment=Share your iOS device to your screen! Exec=/bin/bash -c '$HOME/Desktop/zenity.sh' (THIS WORKS BUT NEEDS CHANGING TO WHERE ZENITY.sh WILL BE) Icon= ? FILL ME Terminal=true X-KeepTerminal=true
#Unaware whether the icon will appear as to get #Unaware what the directory to the zenity script will be (Please fill in)
Finally I have also edited the zenity script to launch rpiplay into a terminal for people to use to escape, thats in the zip as well
PS the way the chunky-milk executable was compiled was with checkinstall while I used dpkg-deb --build rpiplay/
Unaware which is better but you can see my method of learning by visiting my RPi-Stuff repo and looking in makingdebs for a link
Also if wanted I have put the .deb file inside of one of my repos
heres the command you can use in the install script
wget https://raw.githubusercontent.com/CleanMachine1/RPi-Stuff/main/debfiles/rpiplay.deb
I'll keep it updated whenever I see it getting an update
@Botspot I think my part is done, you can find here A desktop entry with some fill the gaps, WHICH WILL RUN THE ZENITY SCRIPT.sh A final version of rpiplay.deb if needed A zenity script which now works and opens a terminal containing the chosen command
(The caps are just to make sure its remembered, not trying to be rude)
We'll see what this issue turns up: https://github.com/FD-/RPiPlay/issues/237
@Botspot Whats wrong with the official airplay logo?
I wasn't happy with how it was both blurry and unnecessarily small.
For the time being, I've re-done the icons and made them pixel-perfect.
But if someone on RPi-Play wants to make their own custom icon, we'll switch to that then.
@Botspot
The deb is being worked on. https://github.com/CleanMachine1/RPi-Stuff/issues/1
The deb is being worked on. CleanMachine1/RPi-Stuff#1
Nope, sorry can't get checkinstall to work nicely with cmake...
@Botspot Could you provide what files you currenly have since I have lost the updated files for the install
Heres a guide to everything
I have the zenity script - we need to setup so that it uses terminal run The desktop entry needs run zenity.sh, since this is the config menu for the user to pick audio output The deb file can be fetched from chunky-milks repo
I have currently lost the installation files (the app install files and deletion files :( )
If no one has the install files it should be pretty easy to setup since we have everything now,
I can make the install files make a desktop entry then install the deb from chunky's repo
@Botspot Could you provide what files you currenly have since I have lost the updated files for the install
My zip: RPi-Play.zip Other files you attached in the past can still be downloaded from your links above.
Ok, I don't need the 24 hours I asked for
Instead you can help me a little
All is untested however should work The zenity.sh need to be setup with the terminal run thing
This PR has been open for 3 months.
Does any one intend to work on it or should I close it
Just wait until someone that wants and/or has time to work on this works on this in my opinion
Half a year :partying_face:
I made a icon
Wow, this PR's been open for 10 months lol!
Here's an easy way to generate debs for rpiplay. You'll need the debian devscripts installed sudo apt install devscripts
mkdir rpiplay-build && cd rpiplay-build
git clone https://github.com/FD-/RPiPlay && cd RPiPlay
# download debuild files
wget https://transfer.sh/get/dNOlzG/rpiplay-debuild.zip && unzip rpiplay-debuild.zip && mv rpiplay-debian debian
rm rpiplay-debuild.zip
# install build deps
sudo mk-build-deps -i debian/control
sudo rm rpiplay-build-deps_*
# build package (will be in the parent directory
dpkg-buildpackage -us -uc -nc
Here are the debs I compiled. They both work on Debian Buster but I haven't tried Bullseye.
https://apt.raspbian-addons.org/debian/pool/main/r/rpiplay/rpiplay_0.1.0_arm64.deb
https://apt.raspbian-addons.org/debian/pool/main/r/rpiplay/rpiplay_0.1.0_armhf.deb
armhf deb on bullseye:
rpiplay: error while loading shared libraries: libopenmaxil.so: cannot open shared object file: No such file or directory
armhf deb on bullseye:
rpiplay: error while loading shared libraries: libopenmaxil.so: cannot open shared object file: No such file or directory
@Botspot are there any files present in /opt/vc
? if not, does installing libraspberrypi-dev
change anything?
armhf deb on bullseye:
rpiplay: error while loading shared libraries: libopenmaxil.so: cannot open shared object file: No such file or directory
@Botspot are there any files present in
/opt/vc
? if not, does installinglibraspberrypi-dev
change anything?
Bullseye doesn't use /opt/vc anymore.
@Botspot i think bullseye uses usr/bin now
I realize this is a very old PR and it doesn't work anyway (the repo hosting the deb is long gone)
but just wanted to post the link to the github with the project itself: https://github.com/FD-/RPiPlay
according to the documentation in the github its just using gstreamer, so as long as the defaults are properly hardware accelerated on the pi, then this should still work fine. just make sure the dependencies are installed.
I will do some work on this PR later today if I get time.
Best thing to do is restart this. Close this PR and make a new issue or PR, since his one has way too much history
actually looks like this project has an all around better alternative. I'm not sure if its related to the original one, but here it is: https://github.com/FDH2/UxPlay it supports both screen mirroring (with audio) and the audio only airplay
I was able to get this working on my switch (with non-standard settings to specify the correct video sink -vd nvv4l2decoder -vs nv3dsink
) using NVDEC even. I'd still prefer a ffmpeg based option though instead of gstreamer
actually looks like this project has an all around better alternative. I'm not sure if its related to the original one, but here it is: https://github.com/FDH2/UxPlay it supports both screen mirroring (with audio) and the audio only airplay
I was able to get this working on my switch (with non-standard settings to specify the correct video sink
-vd nvv4l2decoder -vs nv3dsink
) using NVDEC even. I'd still prefer a ffmpeg based option though instead of gstreamer
yeah that looks a lot better than RPiPlay