updating Youtubedl
George T. Greenfield (154) 748 posts |
About a month ago I stopped being able to run youtube videos from saved URLs, which was working fine up till then using FFmpeg, FFplay, Youtubedl and YTPlay. Python3 is ‘seen’ by the Filer as part of the boot sequence. Presumably Youtube have moved the goalposts, as indeed we were warned would happen: https://www.riscository.com/2020/watching-youtube-videos-on-risc-os/ |
Chris Gransden (337) 1207 posts |
Assuming you have the latest version of Python3 installed just type,
|
George T. Greenfield (154) 748 posts |
Thanks Chris.
!Packman offers: Python-38 Are all required, or if not, which? |
Chris Gransden (337) 1207 posts |
All 3 are needed. Depending on the version you have installed already you might need to uninstall first. |
Raik (463) 2061 posts |
If you have install the Python-38 stuff, please try this YTPlay Version. I have changed the ytsearch and youtube-dl install/update routines. @Chris Gransden |
Doug Webb (190) 1180 posts |
Hi Raik Updating youtube-search gives errors with version 1.4.0 installed. Successfully installed certifi-2020-12-5 h11-0-12-0 httpcore-0-12-3 httpx-0-16-1 idna-3-1 rfc3986-1-4-0 sniffio-1-2-0 youtube-search-python-1-4-0 If I then specifically install version 1.3.2 again then search works again. python3 -m pip install youtube-search-python==1.3.2 Hope this helps. |
Raik (463) 2061 posts |
Sorry, my mistake. |
Doug Webb (190) 1180 posts |
Hi Raik, Thanks downloaded 3.02 and tried to install/update youtube-search. So first pass get: Collecting setuptools Installing collected packages: setuptools So then tried it again and get: Collecting setuptools So reboot the ARMX6 and try again and get: Collecting setuptools Quit YTPlay 3.02 and then restart that and try again and get: Collecting setuptools So Reboot and try again and get: Collecting setuptools So we go round and round in circles. It looks like it finds an old version and says in installed the latest setuptools but perhaps not correctly? Update: Checked in the directory scsi::ssd.$.pythonsite.python38.site-packages.setuptools.command and there is a launcher manifest/xml file. It is not seeing it is this a case of the space in the name being a hard or soft space, if I have my terms right? |
Raik (463) 2061 posts |
Mmm, … After Reboot, have you try to use the search window? It is possible that the “uninstall error message” will disappears if a new setuptool is available e.g. 54-0-0. I mean it was the same with 52-0-0. |
Doug Webb (190) 1180 posts |
Hi Raik,
There does not appear to be an error message for youtube-search. Using python3 -m pip install youtube-search-python==1.3.2 gives the following: Collecting youtube-search-python==1.3.2 Using cached youtube_search_python-1.3.2-py3-none-any.whl (11 kB)Installing collected packages: youtube-search-python So it looks like 1-3-2 is installed and the upgrade has not taken place with YTPlay 3.0.2. |
Raik (463) 2061 posts |
Normally after installing setuptool, the next step is install/upgrade to the latest youtube-search. Is one obey. |
Doug Webb (190) 1180 posts |
So perhaps as it says: Found existing installation: setuptools 41.2.0.post20200303 This is causing it not to fully work in the same obey? Perhaps I have a set of site-packages that is corrupt or needs cleansing? If you need a copy of my !PythonSite repository then let me know where to send it and I will archive and email it if possible. |
Chris Gransden (337) 1207 posts |
There are some path handling issues in Python3. Upgrading setuptools needs to be done twice as a workaround, The first one uninstalls the old setuptools. The second then installs it successfully despite the error.
Also 1.4.0 of youtube-search-python errors when run due to path handling issues but 1.3.9 seems OK.
|
Doug Webb (190) 1180 posts |
Hi Chris, Thanks for the feedback and 1.3.9 now installed and working OK. I guess the path handling issues are there as I have lots of weird named directoiries in PythonSite then but good to know the reason why it would not upgrade. |
Chris Gransden (337) 1207 posts |
The latest version of ffmpeg is available here. It includes libmp3lame support. Should be a bit faster than previous versions. Can encode wav to mp3 at 22x real time on a RPi400 @ 2.4GHZ. |
Raik (463) 2061 posts |
I have found a “bug” in my obey. Now generally it works for me. Have perform pip38 uninstall setuptools Than “my” installer works. Tested on Ti and MX6.
For now, I have “hardcoded” 1.3.9. Will upload later this evening.
Wow. Use it on my Ti to convert the m4a youtube audio stream to mp3 “on the fly”. Is round about 10x faster than the old ffmpeg |
Raik (463) 2061 posts |
The latest YTPlay you find here. |
Doug Webb (190) 1180 posts |
Hi Raik, Thanks for the update to YTPlay 3.02a. I tried to update YouTube-Search and the first time it gave a lot of errors like previously. So I tried a second time and then it succeeded so as Chris pointed out the initial path handling issue Hope this helps. Update: Updating youtube-dl doesn’t see the same issues as youtube-search. |
George T. Greenfield (154) 748 posts |
Just installed Python-38, Python-38-pip and Python-Core. Attempting to launch a URL via YTPlay (V3.02a) gives the following error: Python path configuration: Current thread 0×00298e10 (most recent call first): EDIT: the final line is between <> but won’t display unless I remove them. Any idea what’s going wrong? TIA |
Raik (463) 2061 posts |
Have you try to install youtubedl and youtubesearch via Adjust-click to the Iconbar icon? If it is not sucessful please give a second try. Restart is necessary often after install. |
George T. Greenfield (154) 748 posts |
Hi Raik: I tried installing youtubedl and youtubesearch by Adjust-clicking the iconbar icon as suggested, The result was error messages as follows: (For youtubedl) Current thread 0×00298e10 (most recent call first): (For youtubesearch) Current thread 0×00298e10 (most recent call first): EDIT: I’d already removed Python27 to a backup directory and also removed it from the ‘Boot-Look at’ sequence. |
Raik (463) 2061 posts |
Can you try this version please? If you perform … |
George T. Greenfield (154) 748 posts |
I’m doing the same – in case there’s something in my setup that is conflicting with Python or associated components. But in order not to disturb my ‘working’ Pi4 I’m building a clean 5.28 card on my networked Pi1, so it may take a while to get back to you with results from the new version. But I appreciate the help! |
George T. Greenfield (154) 748 posts |
Update: using PackMan 0.9.5 beta I downloaded and installed Python-38, Python-38-pip, Python-Core and MPlayer on my clean install of 5.28, together with associated SharedLibs etc. I downloaded and installed YTPlay V3.1 RC1 from Raik’s link (above). Right-clicking the YTPlay icon and selecting ‘Install/update youtube-dl’ produced the following error message: Traceback (most recent call last): File “SDFS::HardDisc0.$.PythonSite.Scripts.pip38”, line 6, inImportError: File not found I then opened a task window and typed pip38 install —upgrade youtube-dl at the * prompt. That produced this: Traceback (most recent call last): ++++++++++++++++++++++++++= The only app installed before Python-38, YTPlay, MPlayer etc on this virgin installation of 5.28 was Netsurf, so I’m at a loss to explain the errors. EDIT: I have NO idea why the first listing runs on, while the second is correctly formatted: they appear identical in the text editor, and I have no idea how to correct it. Apologies to all…. |
Chris Gransden (337) 1207 posts |
Make sure the following are also installed using PackMan. LibSSL |