youtube pyglet

Discussion about user contributed plugins

Moderator: Moderator

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Tue Feb 24, 2009 8:03 am

Pls, have a look here:
viewtopic.php?f=19&t=1694
Lg
Roman

stream100
Posts: 3
Joined: Sun Mar 22, 2009 4:05 pm

Re: youtube pyglet - proxy-auth for python

Postby stream100 » Mon Mar 23, 2009 5:33 pm

Hello,
i hope this is the correct place for my question.

My System:
Debian Lenny on a T-Online S100 with MMS installed from deb packages,
Version is 1.1.0-0prodeia2.
I've also installed the python-plugin and the pyglets to get internet access
to youtube.com.

Problem:
All Internet Traffic (http/ftp) has to go through a Squid-Proxy and the S100-User
has to do a NCSA-Proxy-Auth to get out of the LAN.

Is there any configuration option for python or the pyglet that let me do something like:

http_proxy=http://proxyuser:password@proxy-ip:port

If not, is there a chance to get this implemented?

Note:
When setting this as an environment variable, the S100 User is able to connect
to youtube.com with lynx or w3m, while all traffic is going through the Squid Proxy.

It seems that Python simply ignore this setting.

christophb
Posts: 25
Joined: Sat Jan 03, 2009 3:30 pm
Location: Lehrte, Germany
Contact:

Re: youtube pyglet

Postby christophb » Wed Apr 22, 2009 9:40 pm

I still can't get it running.

The navigation is fine, I open a video, can see a very few frames and that's all.
Sometimes there is a still image left on the screen and after some minutes I come back to the YouTube menu.

Excerpt of the mms.log:
running mplayer with following command:/usr/bin/mplayer -cache 8192 -vo xv -lircconf /etc/mms/lirc.conf -monitoraspect 16:9 -aspect 16:9 -fs -ao alsa:device=default -channels 2 "http://www.youtube.com/get_video?video_id=ayC3YiOY4FM&t=vjVQa1PpcFMdghmlx_hlSlju4jk97y_JHaho5ZylGNI="
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Mobile Intel(R) Celeron(TM) CPU 733MHz (Family: 6, Model: 11, Stepping: 4)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

Playing http://www.youtube.com/get_video?video_ ... ho5ZylGNI=.
Resolving http://www.youtube.com for AF_INET...
Connecting to server http://www.youtube.com[208.65.153.238]: 80...
Resolving v13.lscache8.googlevideo.com for AF_INET...
Connecting to server v13.lscache8.googlevideo.com[74.125.104.93]: 80...
Connecting to server 74.125.104.95[74.125.104.95]: 80...
Cache size set to 8192 KBytes
Cache fill: 14.53% (1218949 bytes)
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/codecs/avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll
libavformat file format detected.
VIDEO: [FLV1] 320x240 0bpp 25.000 fps 0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 22050 Hz, 2 ch, s16le, 8.0 kbit/1.13% (ratio: 1000->88200)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 320x240 => 426x240 Planar YV12 [fs]
[flv @ 0xb6323110]skipping flv packet: type 1, size 8456264, flags 04%
Stream not seekable!
Stream not seekable!V: 0.004 ct: 0.000 21/ 21 4% 7% 11.0% 0 0 0%
[flv @ 0xb67969a8]illegal ac vlc code at 11x2 25 3% 6% 9.2% 0 0 0%
[flv @ 0xb67969a8]Error at MB: 53
[flv @ 0xb67969a8]illegal dc 0 at 0 0
[flv @ 0xb67969a8]Error at MB: 0
[flv @ 0xb67969a8]illegal ac vlc code at 0x0
[flv @ 0xb67969a8]Error at MB: 0
[flv @ 0xb67969a8]illegal dc 0 at 1 0
[flv @ 0xb67969a8]Error at MB: 1
[flv @ 0xb67969a8]illegal dc 0 at 0 0
[flv @ 0xb67969a8]Error at MB: 0
[flv @ 0xb67969a8]illegal dc 0 at 0 0
[flv @ 0xb67969a8]Error at MB: 0
[flv @ 0xb67969a8]illegal ac vlc code at 0x0
[flv @ 0xb67969a8]Error at MB: 0
[flv @ 0xb67969a8]concealing 300 DC, 300 AC, 300 MV errors
A: 1.0 V: 1.0 A-V: -0.004 ct: 0.002 26/ 26 3% 6% 8.8% 0 0 0%

Exiting... (End of file)

I downloaded this video into my movie directory and it plays well with the MMS movie plugin.

Christoph
MMS 1.1.1 on T-Online Vision with zendeb 0.4.1-beta1
Controlling a remote kanotix based c't vdr.
Playing files from different CIFS and nfs mounts.

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Thu Apr 23, 2009 6:56 am

Could you pls post the log from when playing the video from within MoviePlugin?
Lg

Roman

christophb
Posts: 25
Joined: Sat Jan 03, 2009 3:30 pm
Location: Lehrte, Germany
Contact:

Re: youtube pyglet

Postby christophb » Sun Apr 26, 2009 9:26 pm

Here it is:

Code: Select all

running mplayer with following command:/usr/bin/mplayer -cache 8192 -vo xv -lircconf /etc/mms/lirc.conf -monitoraspect 16:9  -aspect 16:9  -fs   -ao alsa:device=default -channels 2  /video/nslu2/video.flv
MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
CPU: Mobile Intel(R) Celeron(TM) CPU          733MHz (Family: 6, Model: 11, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick

Playing /video/nslu2/video.flv.
Cache fill: 14.53% (1218949 bytes)
libavformat file format detected.
VIDEO:  [FLV1]  320x240  0bpp  25.000 fps    0.0 kbps ( 0.0 kbyte/s)
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 22050 Hz, 2 ch, s16le, 8.0 kbit/1.13% (ratio: 1000->88200)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 320 x 240 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 320x240 => 426x240 Planar YV12  [fs]
A:  18.1 V:  18.0 A-V:  0.016 ct:  0.169 452/452  3%  2%  3.0% 0 0 6%

Christoph
MMS 1.1.1 on T-Online Vision with zendeb 0.4.1-beta1
Controlling a remote kanotix based c't vdr.
Playing files from different CIFS and nfs mounts.

User avatar
arj
Site Admin
Posts: 2316
Joined: Thu Dec 01, 2005 8:51 pm
Location: Denmark
Contact:

Re: youtube pyglet

Postby arj » Tue Apr 28, 2009 9:39 am

Seems like an mplayer problem. You can try opening this in the console to check:

Code: Select all

/usr/bin/mplayer -cache 8192 -vo xv -lircconf /etc/mms/lirc.conf -monitoraspect 16:9 -aspect 16:9 -fs -ao alsa:device=default -channels 2 "http://www.youtube.com/get_video?video_id=ayC3YiOY4FM&t=vjVQa1PpcFMdghmlx_hlSlju4jk97y_JHaho5ZylGNI="

Hiwi
Posts: 7
Joined: Sat Jul 25, 2009 1:55 pm

Re: youtube pyglet

Postby Hiwi » Sun Aug 23, 2009 10:28 pm

Hi all,
i have a proble youtube does not play anymore!

I become Getting content 0-100% , so i can see top rated etc. videos.
but if i want to view a video shortly the getting content menue show 0% and than nothing happens.
i reinstalled mms-addons-phyton-pyglets
i tried to install it manually by downloading...

other pyglets for example zdf-mediathek are running

any hints?!?
where to look for logfiles (tmp/mms.log doesnt show anything?!?)

bye Hiwi

User avatar
naicheben
Overlord
Posts: 1332
Joined: Tue Apr 04, 2006 12:50 pm
Location: Germany/Leck
Contact:

Re: youtube pyglet

Postby naicheben » Sat Oct 10, 2009 11:58 pm

Same here on DebvisionCR2 with VLC as GenericPlayer (for DVD), but Mplayer for "normal" movies. I run out of ideas how to solve this. I tried to change the link from python2.5 to python2.4 and back again. I tried differen Paths for BASEDIR and DOWNLOADDIR ( put it to users home) but even the youtube.db creation fails. Is it supposed to work under Etch with Romans debs and VLC somehow active?
mit Hellseherschein ;.)

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Sun Oct 11, 2009 8:05 am

What about logs?
Lg

Roman

User avatar
naicheben
Overlord
Posts: 1332
Joined: Tue Apr 04, 2006 12:50 pm
Location: Germany/Leck
Contact:

Re: youtube pyglet

Postby naicheben » Sun Oct 11, 2009 9:33 am

debuglevel=3, nothing in /tmp/mms.log nor in the systemlogs or .xsession-errors .... not even the start of mplayer/vlc is logged! Strange if you ask me ... isn't it?!Shouldn't it say "buffering" or "begin playing video" or something like that?

How can I debug the pyglet?
mit Hellseherschein ;.)

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Mon Oct 12, 2009 8:51 am

Full ack!

Youtube-plugin isn't working atm!! I'll file a bug-report
Lg

Roman

christophb
Posts: 25
Joined: Sat Jan 03, 2009 3:30 pm
Location: Lehrte, Germany
Contact:

Re: youtube pyglet

Postby christophb » Wed Jan 20, 2010 5:14 pm

When I try to start a video from YouTube I get this error in mms.log:

Code: Select all

Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/codecs/avisynth.dll, /usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll


I'm running MMS 1.1.1 on zendeb 0.4.1-beta1.

Any ideas?
MMS 1.1.1 on T-Online Vision with zendeb 0.4.1-beta1
Controlling a remote kanotix based c't vdr.
Playing files from different CIFS and nfs mounts.

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Thu Jan 21, 2010 8:30 pm

ask google! it helps about it ;)
Lg

Roman

User avatar
naicheben
Overlord
Posts: 1332
Joined: Tue Apr 04, 2006 12:50 pm
Location: Germany/Leck
Contact:

Re: youtube pyglet

Postby naicheben » Mon Jan 25, 2010 11:54 pm

I read about googles data client library and I managed it to get a list from youtube with URLs for rstp streams:

Code: Select all

etchbox:/usr/share/mms/scripts/natube# cat main.py
import gdata.youtube
import gdata.youtube.service

#import mmsv2gui, mmsv2
import os, sys
import urllib

yt_service = gdata.youtube.service.YouTubeService()

etchbox:/usr/share/mms/scripts/natube# python main.py
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    import mmsv2gui, mmsv2
ImportError: /usr/lib/python2.5/site-packages/mmsv2gui.so: undefined symbol: _ZTV13TiXmlDocument
etchbox:/usr/share/mms/scripts/natube# nano main.py
etchbox:/usr/share/mms/scripts/natube# python main.py
etchbox:/usr/share/mms/scripts/natube# nano main.py
etchbox:/usr/share/mms/scripts/natube# python main.py
<gdata.youtube.service.YouTubeService object at 0xb7bd0bcc>
etchbox:/usr/share/mms/scripts/natube# nano main.py
etchbox:/usr/share/mms/scripts/natube# cat main.py
import gdata.youtube
import gdata.youtube.service

# import mmsv2gui, mmsv2
import os, sys
import urllib

# yt_service = gdata.youtube.service.YouTubeService()

def PrintEntryDetails(entry):
  print 'Video title: %s' % entry.media.title.text
#  print 'Video published on: %s ' % entry.published.text
#  print 'Video description: %s' % entry.media.description.text
#  print 'Video category: %s' % entry.media.category[0].text
#  print 'Video tags: %s' % entry.media.keywords.text
#  print 'Video watch page: %s' % entry.media.player.url
#  print 'Video flash player URL: %s' % entry.GetSwfUrl()
#  print 'Video duration: %s' % entry.media.duration.seconds

  # non entry.media attributes
#  print 'Video geo location: %s' % entry.geo.location()
#  print 'Video view count: %s' % entry.statistics.view_count
#  print 'Video rating: %s' % entry.rating.average

  # show alternate formats
  for alternate_format in entry.media.content:
    if 'isDefault' not in alternate_format.extension_attributes:
      print 'Alternate format: %s | url: %s ' % (alternate_format.type,
                                                 alternate_format.url)



def GetAndPrintVideoFeed(uri):
#    uri = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
    yt_service = gdata.youtube.service.YouTubeService()
    feed = yt_service.GetYouTubeVideoFeed(uri)
    for entry in feed.entry:
       PrintEntryDetails(entry)

uri = 'http://gdata.youtube.com/feeds/api/standardfeeds/top_rated'
GetAndPrintVideoFeed(uri)

unfortunately this is not displayed within mms, bacause I'm not a programmer and I do not believe I ever get...but maybe someone can give me a hint for a basic tutorial on how to display something in mms-pyglet like these PrintEntryDetails(entry) does on the commandline. Or even better: catch the code and rewrite the pyglet! :lol:

To develope a youtube-plugin you need http://code.google.com/p/gdata-python-client/ the gdata-client witch needs python2.5-dev in my case to install.
mit Hellseherschein ;.)

User avatar
Uatschitchun
Overlord
Posts: 3189
Joined: Tue Dec 06, 2005 6:55 pm
Location: Germany
Contact:

Re: youtube pyglet

Postby Uatschitchun » Mon Feb 08, 2010 12:39 pm

Hi ..

I updated the youtube-pyglet to version 0.2.4 by adding this patch:
viewtopic.php?p=18616#p18616
which makes plugin work again ;)

Thx to sbox!!

New plugin is available from my site or by pulling upstream (revno 2250).
Lg

Roman


Return to “user plugins”

Who is online

Users browsing this forum: No registered users and 2 guests