Page 1 of 1

Cannot read YouTube videos with Channels plugin

Posted: Thu May 23, 2013 3:48 am
by TheRec
Hello,

The install of the Channels plugin from the GUI is not really working well. After digging around logs to try to find what goes wrong during the install I've found the following problems and potential solutions:
  1. After downloading "pepy.zip", the program does something that leads to a NullPointerException, most likely it is when it tries to unzip the archive as it is indeed never unpacked. So you need to unpack it manually. Leave the .zip where it is, do not delete it.
  2. If you click again to restart the Download/Install of Channels it skips the downloading/unpacking of "pepy.zip" and it downloads "youtube-dl.py" but it puts it in the wrong destination directory. It gets downloaded to "extras\scripts", when it should in fact go to "scripts\" (relative to the root of UMS directory), you can see this because "scripts\youtube-dl.bat" (which is a wrapper to run this Python script) points to this directory and not "extras\scripts". Copy this "youtube-dl.py" to "scripts\" but do not delete "extras\scripts\youtube-dl.py".
  3. The "channels" files are not downloaded automatically at the end, you have to go in the Channels GUI and click "Install/Update", after some time all the files will be downloaded in "channels\".
  4. The version of "youtube-dl.py" is outdated, it's from 2012.02.27 and if you try to use it manually you always get a "HTTP 403" error from YouTube servers for ANY video. I needed to update it manually from the official site (http://rg3.github.io/youtube-dl/download.html). Just replace "scripts\youtube-dl.py" by the script file you've downloaded from the official site.
Once everything I've mentioned is manually corrected/downloaded the videos from the YouTube channel directory will be able to be opened on a renderer (without those fixes it just says that the video cannot be opened), but unfortunately the playback stops after few seconds, around 10-30 seconds. It is as if only the first part that could be buffered/downloaded plays and it does not keep "streaming" the rest. The attached log corresponds to a clean install with the fixes I have suggested above and replicates the problem I've just described.

Also not that if I try to open these videos on a Playstation 3, I always get "This content cannot be played (800288E1)"... and on my Android device the only video player capable of playing those few seconds is VLC, the other players I have tired (default Android video player and BSPlayer) also say they cannot play these videos while they usually both play most of the video format I've tried with them.

EDIT: I've mentioned in another thread that I had tried "ZDF" folder and with this folder the videos are working straight after the Install/Download (and after clicking on Install/Upgrade button in the Channels GUI), but I have since then noticed that they suffer the same problem, only few seconds are played and the the playback stops (and the total time shown corresponds to those few seconds).

Re: Cannot read YouTube videos with Channels plugin

Posted: Thu May 23, 2013 6:51 pm
by SharkHunter
OK so the installer stopped working again weird. I'll have a look. That NPE would be nice to see.
The scripts should be in extras\scripts but your UMS.conf contains youtube-dl.path = C:\\Program Files (x86)\\Universal Media Server\\scripts which instructs Channels to look in a non standard place. I'll check again so it is set correctly by the installer. However if you have set it manually some how then it will not be changed.
I'm not the most frequent YT user so if we need to update the YT script I need info from you the users. So that should of course be updated.
I'll need to look deeper into the play time problem. But can you use some other render? I've had issues with Android players. The only one that really worked for me has been XBMC...

Re: Cannot read YouTube videos with Channels plugin

Posted: Thu May 23, 2013 10:11 pm
by TheRec
Thanks for looking into these issues :)

I have not changed the youtube-dl.path setting manually. It's really a clean install, just launched it and installed Channels as I've described. The only things I've changed are that I've forced the network interface as it's preferable on my network, set a network filter for the same reason but this should not interfer.

I have tried on another renderer, a Panasonic Viera TX-P42G15E, and everything is woking correctly with the setup I've described. The whole video is played so the problem might indeed come from VLC or maybe the Media Server browser I am using on my Android device (currently BubbleUPnP). It also tried again on the PS3 and it still gives me the following error: "This content cannot be played (800288E1)".

Do you think there is a way to use PMSEncoder (or another engine?) so that it produces something that can be read on the PS3? It was actually my main goal when I was testing your plugin but for convenience I started testing on Android (my PS3 is further from my computer and it was getting old to go back and forth while trying to solve the setup issues :)). Also it seems odd that other players on Android aren't able to play these "files", BSPlayer can open a wide range of formats but it seems that it has no luck with what it receives.

About the NPE after the download of "pepy.zip", I've attached the Trace logs to this message, but they do not give much details unfortunately. After the error (which only appears in the logs, no information is given to the user) I clicked again and as I've said it skips "pepy.zip" and downloads "youtube-dl.py" and then it stop there... I'm not sure if it's supposed to go fetch the channels files by itself normally but right now if I want them I have to go in Channels GUI and click on "Install/Update".

Re: Cannot read YouTube videos with Channels plugin

Posted: Thu May 23, 2013 11:31 pm
by SharkHunter
Pmsencoder is possible to use (it was used before). But I switched it out a long time ago to avoid an extra process running.
The PS3 should work just as well as other renders. It might be that UMS thinks this video can be streamed to the PS3 (and not transcoded) while it actually should be transcoded. What PMSencoder did was to ALWAYS transocde every stream to mpeg2. Which is a safe bet but it might be wasting resources.

Can you do a log where you try and play with the PS3 as well.

Android players relies on ffmpeg (same as UMS) BUT ffmpeg (on android) has issues with buffering. If it doesn't get the stream "fast enough" it becomes angry and gives up...

Re: Cannot read YouTube videos with Channels plugin

Posted: Fri May 24, 2013 11:49 am
by TheRec
Here's the Trace log when I tried to play a YouTube video with Channels from a PS3.