Problem with streamlink
mabialakienda opened this issue · 15 comments
Dear Carlos
Im facing problem with streamlink v2.2
https://cgomesu.com/blog/Tvhlink/
/usr/bin/env: ‘streamlink’: No such file or directory
I have follow all steps to install streamlink 2.2,
root@ubuntu:~# streamlink --version
streamlink 2.2.0
Please I need help
hey, @mabialakienda . please post the output of which streamlink
, tvheadend --version
, and hostnamectl
. more likely than not, the log message you mentioned means that you did not install streamlink
globally (or system-wide) and therefore, your the TVHeadend user cannot find it in its $PATH
.
Hi @cgomesu
Thanks for your feedback
As a ROOT
root@ubuntu:/home/ubuntu# streamlink --version
Command 'streamlink' not found, but can be installed with:
apt install streamlink
root@ubuntu:/home/ubuntu# which streamlink
root@ubuntu:/home/ubuntu# echo "export "PATH=$HOME/.local/bin:$PATH"" | tee -a "$HOME/.profile" > /dev/null
root@ubuntu:/home/ubuntu# streamlink --version
Command 'streamlink' not found, but can be installed with:
apt install streamlink
root@ubuntu:/home/ubuntu# hostnamectl
Static hostname: ubuntu
Icon name: computer-vm
Chassis: vm
Machine ID: 16f36274ef3c421c98f1da619e2aacc9
Boot ID: f7a5c234f03c44bb8c2c4c090e564884
Virtualization: vmware
Operating System: Ubuntu 18.04.5 LTS
Kernel: Linux 4.15.0-147-generic
Architecture: x86-64
root@ubuntu:/home/ubuntu#
As a normal USER
ubuntu@ubuntu:$ streamlink --version$
streamlink 2.2.0
ubuntu@ubuntu:
Server logs
2021-07-12 07:02:49.248 mpegts: youtube.m3u - Record News in Youtube Auto - tuning on IPTV #1
2021-07-12 07:02:49.253 spawn: Executing "/usr/bin/env"
2021-07-12 07:02:49.253 subscription: 0034: "HTTP" subscribing on channel "Record News", weight: 100, adapter: "IPTV #1", network: "Youtube Auto", mux: "youtube.m3u - Record News", service: "Record News", profile="webtv-vp8-vorbis-webm", hostname="172.16.166.1", username="ubuntu", client="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
2021-07-12 07:02:49.255 spawn: /usr/bin/env: ‘streamlink’: No such file or directory
2021-07-12 07:02:49.255 iptv: stdin pipe 91 unexpectedly closed: No data
2021-07-12 07:03:05.250 subscription: 0034: service instance is bad, reason: No input detected
2021-07-12 07:03:05.250 mpegts: youtube.m3u - Record News in Youtube Auto - tuning on IPTV #2
2021-07-12 07:03:05.252 spawn: Executing "/usr/bin/env"
2021-07-12 07:03:05.252 subscription: 0034: "HTTP" subscribing on channel "Record News", weight: 100, adapter: "IPTV #2", network: "Youtube Auto", mux: "youtube.m3u - Record News", service: "Record News", profile="webtv-vp8-vorbis-webm", hostname="172.16.166.1", username="ubuntu", client="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
2021-07-12 07:03:05.255 spawn: /usr/bin/env: ‘streamlink’: No such file or directory
2021-07-12 07:03:05.255 iptv: stdin pipe 92 unexpectedly closed: No data
2021-07-12 07:03:09.888 webui: Stop streaming /stream/channel/418ae06309add141dd62ce64d42d1a7e?profile=webtv-vp8-vorbis-webm, timeout waiting for packets
2021-07-12 07:03:09.888 subscription: 0034: "HTTP" unsubscribing from "Record News", hostname="172.16.166.1", username="ubuntu", client="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
root@ubuntu:# .local/bin/streamlink --version#
streamlink 2.2.0+32.g1b517c7
root@ubuntu:
root@ubuntu:~# streamlink --version
Command 'streamlink' not found, but can be installed with:
apt install streamlink
root@ubuntu:~#
root@ubuntu:/.local/bin# tvheadend --versiongeb59284b8
tvheadend: version 4.3-1967
root@ubuntu:~/.local/bin#
How did you download streamlink?
If you downloaded it using pip, then you have to set the environment path.
If you're using apt, that should already be on the /usr/bin directory so you don't need to do that
I did it using pip3 with no path, how do I define the path?
@Yankees4life is right, @mabialakienda . there are multiple ways to fix that. first, login with your ubuntu
user and uninstall the local streamlink
package, as follows:
python3 -m pip uninstall streamlink
now, assuming your ubuntu
user has sudo
permission (otherwise, login as root
or append sudo
group to your ubuntu
user via usermod
), simply run the pip install command as follows:
sudo python3 -m pip install streamlink
this should make sure the streamlink
script is reachable system-wide because it will be installed in /usr/local/bin/
.
I make this
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu# streamlink --version
bash: /usr/bin/streamlink: No such file or directory
root@ubuntu:/home/ubuntu# python3 -m pip install streamlink
Collecting streamlink
Using cached https://files.pythonhosted.org/packages/4f/9e/b67b8193149c4f202deabd4aa8edf689cf77f895167cff3244b9bf4e3f06/streamlink-2.2.0-py3-none-any.whl
Requirement already satisfied: iso-639 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: pycryptodome<4,>=3.4.3 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: websocket-client>=0.58.0 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: iso3166 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: requests<3.0,>=2.21.0 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: PySocks!=1.5.7,>=1.5.6 in /root/.local/lib/python3.6/site-packages (from streamlink)
Requirement already satisfied: isodate in /usr/local/lib/python3.6/dist-packages (from streamlink)
Requirement already satisfied: certifi>=2017.4.17 in /root/.local/lib/python3.6/site-packages (from requests<3.0,>=2.21.0->streamlink)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /root/.local/lib/python3.6/site-packages (from requests<3.0,>=2.21.0->streamlink)
Requirement already satisfied: chardet<5,>=3.0.2 in /root/.local/lib/python3.6/site-packages (from requests<3.0,>=2.21.0->streamlink)
Requirement already satisfied: idna<3,>=2.5 in /root/.local/lib/python3.6/site-packages (from requests<3.0,>=2.21.0->streamlink)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from isodate->streamlink)
Installing collected packages: streamlink
Successfully installed streamlink-2.2.0
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu# streamlink --version
bash: /usr/bin/streamlink: No such file or directory
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu# streamlink --version
bash: /usr/bin/streamlink: No such file or directory
root@ubuntu:/home/ubuntu#
root@ubuntu:/home/ubuntu# ls /usr/local/bin/streamlink
/usr/local/bin/streamlink
This the result when trying to open a Channel
2021-07-13 04:13:30.372 webui: Stop streaming /stream/channel/418ae06309add141dd62ce64d42d1a7e?profile=webtv-vp8-vorbis-webm, timeout waiting for packets
2021-07-13 04:13:30.372 subscription: 00E0: "HTTP" unsubscribing from "Record News", hostname="172.16.166.1", username="ubuntu", client="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
2021-07-13 04:13:30.374 mpegts: youtube.m3u - Record News in Youtube Auto - tuning on IPTV #1
2021-07-13 04:13:30.378 subscription: 00E1: "HTTP" subscribing on channel "Record News", weight: 100, adapter: "IPTV #1", network: "Youtube Auto", mux: "youtube.m3u - Record News", service: "Record News", profile="webtv-vp8-vorbis-webm", hostname="172.16.166.1", username="ubuntu", client="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0"
2021-07-13 04:13:30.379 spawn: Executing "/usr/bin/env"
2021-07-13 04:13:30.712 spawn: Traceback (most recent call last):
2021-07-13 04:13:30.712 spawn: File "/usr/local/bin/streamlink", line 7, in
2021-07-13 04:13:30.712 spawn: from streamlink_cli.main import main
2021-07-13 04:13:30.712 spawn: File "/usr/local/lib/python3.6/dist-packages/streamlink_cli/main.py", line 28, in
2021-07-13 04:13:30.712 spawn: from streamlink.stream import StreamProcess
2021-07-13 04:13:30.712 spawn: File "/usr/local/lib/python3.6/dist-packages/streamlink/stream/init.py", line 5, in
2021-07-13 04:13:30.712 spawn: from streamlink.stream.hls import HLSStream
2021-07-13 04:13:30.712 spawn: File "/usr/local/lib/python3.6/dist-packages/streamlink/stream/hls.py", line 9, in
2021-07-13 04:13:30.712 spawn: from Crypto.Util.Padding import unpad
2021-07-13 04:13:30.712 spawn: ModuleNotFoundError: No module named 'Crypto.Util.Padding'
2021-07-13 04:13:30.761 iptv: stdin pipe 406 unexpectedly closed: No data
Lets try it in a news installation
1- I will follow the Carlos TVh installation process
2- In a Streamlink installation step can I install only the?
sudo python3 -m pip install streamlink
OR
apt install streamlink and then install - sudo python3 -m pip install streamlink
Lets assume than I installing a new one
I have started a new one, getting this
tvheadend[12720]: spawn: error: No plugin can handle URL: https://www.youtube.com/user/france24english
tvheadend[12720]: iptv: stdin pipe 79 unexpectedly closed: No data
HI @cgomesu
This is the URL - where do I add /live ?
pipe:///usr/bin/env streamlink --stdout --default-stream best --url https://www.youtube.com/user/france24english
I add your - https://raw.githubusercontent.com/cgomesu/tvhlink/master/m3u/youtube.m3u
And its working now, many thanks
So how do I extract m3u8 ?
for the second link - a direct.m3u, getting this
2021-07-13 13:51:02.185 spawn: [cli][info] Found matching plugin rtpplay for URL https://www.rtp.pt/play/direto/rtp1
2021-07-13 13:51:04.187 spawn: [cli][info] Available streams: 640k (worst), 1300k, 2500k (best)
2021-07-13 13:51:04.187 spawn: [cli][info] Opening stream: 2500k (hls)
2021-07-13 13:51:11.041 spawn: [stream.hls][error] Failed to create decryptor: ('Unable to decrypt cipher {0}', 'SAMPLE-AES')
2021-07-13 13:51:17.870 subscription: 003E: service instance is bad, reason: No input detected
This is the URL - where do I add /live ?
Append to the end of a Youtube channel URL. For example: https://www.youtube.com/user/france24english/live
I add your - https://raw.githubusercontent.com/cgomesu/tvhlink/master/m3u/youtube.m3u
And its working now, many thanks
Hooray! Take a look at the URLs for comparison. The Youtube streams in my repo's m3u
dir are the ones I personally use, so I try to keep that playlist up to date. Regarding the error you are getting with the direct.m3u
playlist, it seems to be a plugin issue. I have not used that playlist in quite a while. If you believe this is an issue, then open a new one at the Streamlink Github repo instead.
So how do I extract m3u8 ?
This is unrelated to the original issue.
It seems the issue has been fixed, so I'll go ahead and close it.