Dirty hack to run Pikaraoke on your Android phone #421
Replies: 6 comments 14 replies
-
Fascinating. So that means ffmpeg is installed by default on Android? How did you install pikaraoke? Via pip? The proper way to do this is modify |
Beta Was this translation helpful? Give feedback.
-
created PR: #423 |
Beta Was this translation helpful? Give feedback.
-
Merged! Will release it today and have added your guide to wiki https://github.com/vicwomg/pikaraoke/wiki/Running-on-Android-using-termux |
Beta Was this translation helpful? Give feedback.
-
@jepes1981 I just tried this myself on my 8-year old Oneplus 3 . Works great! I'm shocked. A couple of things I noticed though:
|
Beta Was this translation helpful? Give feedback.
-
If I mentioned 3 commands, my apologies since I forgot (again) that I have some packages already installed. Below is the steps to re-compile ffmpeg inside Termux, feel free to make any changes as you see fit: Key Change / Pitch Shifting not working solutionlib-rubberband is not compiled with ffmpeg resulting to the issue. The solution is to re-compile ffmpeg with --enable-librubberband parameter. It can be done inside Termux with a few commands and a little bit of patience. *Optional but highly recommended if you will use your on-screen keyboard to edit files is to use "Unexpected Keyboard" as your keyboard app (https://play.google.com/store/apps/details?id=juloo.keyboard2&hl=en) Download git if it is not yet installed:
You will also need a text editor (e.g. vim or nano, or what ever your choice is):
or
*please don't get stuck in vim limbo Install rubberband package:
Clone the termux-packages repository:
cd into
Prepare Termux for building packages (this can take a few minutes to run):
edit the file If you have ffmpeg already installed, you may uninstall it by:
In the file build.sh, under
If there were no errors, ffmpeg should be installed with lib-rubberband support and Key Change / Pitch Shifting should now work.
References: |
Beta Was this translation helpful? Give feedback.
-
My PR was approved and merged regarding enabling ligrubberbamd on ffmpeg. |
Beta Was this translation helpful? Give feedback.
-
Dirty hack to make pikaraoke work on Android phone using Termux
(Termux is an Android terminal emulator and Linux environment app that works directly with no rooting or setup required. A minimal base system is installed automatically - additional packages are available using the APT package manager.)
download Termux from F-Droid:
https://f-droid.org/en/packages/com.termux/
*The google play version is no longer the original termux. See https://github.com/termux-play-store
open the termux app.
Install python:
pkg install python
Follow the standard installation process of PiKaraoke.
I recommend the development way of installing it which is using
poetry
so that you can edit the code more easily.If you installed it via pip (and you have created an environment) via
python -m venv venv
) you can find the code under:venv/lib/python3.12/site-packages/pikaraoke/
You will need to modify some codes.
modify lib/get_platform.py
modify karaoke.py [line 151]
Modify
app.py [around line 553]
so that it will not crash when we go to the settings/try to login.We now need to install some packages in termux. This is because pikaraoke expects
iwconfig
to be available sinceget_platform
assumed unknown/raspberry_pi.istall first:
pkg install root-repo
then:
pkg install wireless-tools
*might fail if done in the same command
if you forgot to install ffmpeg:
pkg install ffmpeg
The hostname command in karaoke.py only returns the loopback address regardless if you are connected to the internet.
We will need to supply the actual ip of your phone else video will not play.
Use the command
ifconfig
in termux, your ip will be under wlan0, inetAs previously mentioned, we need to supply the actual ip, IT IS NECESSARY to use the
--url
argumant/parameter when launching indicating the ip and port of your phonethe
--headless
argument/parameter is also NECESSARY since termux will not launch the chome app.sample command:
pikaraoke --url 192.168.0.123:5555 --headless
Open the headless url on a chrome based browser (on the same phone, another phone, or computer, or smart tv)
my setup:
phone connected to a bluetook speaker with microphone. I can now sing with all my heart without booting up my computer.
Also, since I always carry my phone, and bluetooth speakers with mic are popular in our area, karaoke is almost instant.
Beta Was this translation helpful? Give feedback.
All reactions