[RELEASE] YouTube (Video) Plugin

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Closed
shassino Offline
Senior Member
Posts: 173
Joined: Mar 2009
Reputation: 0
Post: #136
In both my pc's with ubuntu karmic and lucid i must change permission of config folder to avoid cookies.tx to be written.

Without that file it works well..
find
BurningSky Offline
Senior Member
Posts: 197
Joined: Aug 2009
Reputation: 10
Location: Germany
Post: #137
How can I play videos in 1080p? Each video is played only in 720p, even if it is availiable in 1080p.
find
Wally25 Offline
Junior Member
Posts: 42
Joined: Jul 2010
Reputation: 2
Location: Ireland
Post: #138
It looks like it would be easy to add 1080p support even 4K support. The fmt codes are,
22 for 720p
37 for 1080p
38 for 4k
find
BurningSky Offline
Senior Member
Posts: 197
Joined: Aug 2009
Reputation: 10
Location: Germany
Post: #139
Wally25 Wrote:It looks like it would be easy to add 1080p support even 4K support. The fmt codes are,
22 for 720p
37 for 1080p
38 for 4k
Thank you! Now I have 1080p support too. Big Grin
find
grote002 Offline
Member
Posts: 94
Joined: Jan 2004
Reputation: 0
Post: #140
I would like to have a choice in Settings what max resolution to use and then let the script check the highest resolution of the video possible and play that.

Like:

Code:
Highest resolution: 360p / 480p / 720p / 1080p / Higher

Thanks

Intel Core2Quad 3,2Ghz, 2Gb RAM, Nvidia GTS450 on Ubuntu 10.10, Denon AVR-2311, Denon POA4400A
find
birbilakos Offline
Junior Member
Posts: 13
Joined: Jul 2010
Reputation: 0
Post: #141
andzei Wrote:Hello

I'm using XBCM 9.11 under Linux (Gentoo).

When I start anything in YouTube plugin I've got an error: "No module named YoutubeClient" - like below. What can be wrong?
Is the XBMC revision issue important?

Code:
22:16:11 T:3024844640 M:777932800   DEBUG: CGUIMediaWindow::GetDirectory (plugin://video/YouTube/)
22:16:11 T:3024844640 M:777932800   DEBUG:   ParentPath = [plugin://video/]
22:16:11 T:3024844640 M:777932800   DEBUG: StartScript - URL for plugin settings: YouTube/
22:16:11 T:3024844640 M:777932800   DEBUG: StartScript - calling plugin special://home/plugins/video/YouTube/default.py('plugin://video/YouTube/','0','')
22:16:11 T:3024844640 M:777932800    INFO: initializing python engine.
22:16:11 T:3024844640 M:777932800   DEBUG: Loading: /usr/share/xbmc/system/python/python26-i486-linux.so
22:16:11 T:3024844640 M:777932800   DEBUG: Python wrapper library linked with system Python library
22:16:11 T:3024844640 M:777932800   DEBUG: new python thread created. id=12
22:16:11 T:2857102192 M:777932800   DEBUG: thread start, auto delete: 0
22:16:11 T:2857102192 M:777932800   DEBUG: Python thread: start processing
22:16:11 T:3024844640 M:777932800   DEBUG: WaitOnScriptResult - waiting on the YouTube plugin...
22:16:11 T:2857102192 M:777932800  NOTICE: -->Python Interpreter Initialized<--
22:16:11 T:2857102192 M:777932800   DEBUG: Process - The source file to load is special://home/plugins/video/YouTube/default.py
22:16:11 T:2857102192 M:777932800   DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/plugins/video/YouTube:/usr/lib/python26.zip:/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload
22:16:11 T:2857102192 M:777932800   DEBUG: Process - Entering source directory /home/xbmc/.xbmc/plugins/video/YouTube
22:16:11 T:2857102192 M:777932800  NOTICE: [PLUGIN] 'YouTube: Version - 1.7.3-r' initialized!
22:16:11 T:2857102192 M:777932800  NOTICE:      ** Required XBMC Revision: r19457 **
22:16:11 T:2857102192 M:777932800  NOTICE:      ** Found XBMC Revision: r0 [Unknown] **
22:16:11 T:3024844640 M:778035200   DEBUG: WaitOnScriptResult- plugin returned successfully
22:16:11 T:2973379440 M:778035200   DEBUG: thread start, auto delete: 0
22:16:11 T:2973379440 M:778035200   DEBUG: Thread 2973379440 terminating
22:16:11 T:2857102192 M:778907648    INFO: Scriptresult: Success
22:16:12 T:2857102192 M:778887168    INFO: Python script stopped
22:16:12 T:2857102192 M:778887168   DEBUG: Thread 2857102192 terminating
22:16:12 T:3024844640 M:778887168   DEBUG: python thread 12 destructed
22:16:12 T:3024844640 M:778887168    INFO: Python, unloading python24.dll because no scripts are running anymore
22:16:12 T:3024844640 M:778887168   DEBUG: UnloadExtensionLibs, clearing python extension libraries
22:16:12 T:3024844640 M:778887168   DEBUG: Unloading: python26-i486-linux.so
22:16:16 T:2911894384 M:778895360   DEBUG: Thread 2911894384 terminating (autodelete)
22:16:16 T:2948201328 M:778895360   DEBUG: Thread 2948201328 terminating (autodelete)
22:16:20 T:3024844640 M:778919936   DEBUG: SDLKeyboard: scancode: 116, sym: 274, unicode: 0, modifier: 0
22:16:20 T:3024844640 M:778919936   DEBUG: OnKey: 61480 pressed, action is 4
22:16:20 T:2948201328 M:778919936   DEBUG: thread start, auto delete: 1
22:16:20 T:2948201328 M:778919936    INFO:   msg: PICTURE::LoadImage: Unable to open image: YouTube/recently_featured-fanart.png Error: (2)
22:16:20 T:2948201328 M:778919936   ERROR: Texture manager unable to load file: YouTube/recently_featured-fanart.png
22:16:35 T:3024844640 M:778919936   DEBUG: SDLKeyboard: scancode: 36, sym: 13, unicode: 13, modifier: 0
22:16:35 T:3024844640 M:778919936   DEBUG: OnKey: 61453 pressed, action is 7
22:16:35 T:3024844640 M:778919936   DEBUG: CGUIMediaWindow::GetDirectory (plugin://video/YouTube/?title=u%27Aktualnie+ogl%5Cu0105dane%27&category='recently_featured'&page=1&vq=%27%27&username=%27%27&cat=%27%27&orderby='updated'&related=""&issearch=0&update_listing=0)
22:16:35 T:3024844640 M:778919936   DEBUG:   ParentPath = [plugin://video/YouTube/]
22:16:35 T:3024844640 M:778919936   DEBUG: StartScript - URL for plugin settings: YouTube/
22:16:35 T:3024844640 M:778919936   DEBUG: StartScript - calling plugin special://home/plugins/video/YouTube/default.py('plugin://video/YouTube/','0','?title=u%27Aktualnie+ogl%5Cu0105dane%27&category='recently_featured'&page=1&vq=%27%27&username=%27%27&cat=%27%27&orderby='updated'&related=""&issearch=0&update_listing=0')
22:16:35 T:3024844640 M:778919936    INFO: initializing python engine.
22:16:35 T:3024844640 M:778919936   DEBUG: Loading: /usr/share/xbmc/system/python/python26-i486-linux.so
22:16:35 T:3024844640 M:778919936   DEBUG: Python wrapper library linked with system Python library
22:16:35 T:3024844640 M:778919936   DEBUG: new python thread created. id=13
22:16:35 T:2911894384 M:778919936   DEBUG: thread start, auto delete: 0
22:16:35 T:3024844640 M:778919936   DEBUG: WaitOnScriptResult - waiting on the YouTube plugin...
22:16:35 T:2911894384 M:778919936   DEBUG: Python thread: start processing
22:16:35 T:2911894384 M:778919936  NOTICE: -->Python Interpreter Initialized<--
22:16:35 T:2911894384 M:778919936   DEBUG: Process - The source file to load is special://home/plugins/video/YouTube/default.py
22:16:35 T:2911894384 M:778919936   DEBUG: Process - Setting the Python path to /home/xbmc/.xbmc/plugins/video/YouTube:/usr/lib/python26.zip:/usr/lib/python2.6/:/usr/lib/python2.6/plat-linux2:/usr/lib/python2.6/lib-tk:/usr/lib/python2.6/lib-old:/usr/lib/python2.6/lib-dynload
22:16:35 T:2911894384 M:778919936   DEBUG: Process - Entering source directory /home/xbmc/.xbmc/plugins/video/YouTube
22:16:35 T:2911894384 M:778919936  NOTICE: Traceback (most recent call last):
22:16:35 T:2911894384 M:778919936  NOTICE:   File "/home/xbmc/.xbmc/plugins/video/YouTube/default.py", line 64, in <module>
22:16:35 T:2911894384 M:778919936  NOTICE: from YoutubeAPI import xbmcplugin_videos as plugin
22:16:35 T:2911894384 M:778919936  NOTICE:   File "/home/xbmc/.xbmc/plugins/video/YouTube/YoutubeAPI/xbmcplugin_videos.py", line 14, in <module>
22:16:35 T:2911894384 M:778919936  NOTICE: from YoutubeAPI.YoutubeClient import YoutubeClient
22:16:35 T:2911894384 M:778919936  NOTICE: ImportError
22:16:35 T:2911894384 M:778919936  NOTICE: :
22:16:35 T:2911894384 M:778919936  NOTICE: No module named YoutubeClient
22:16:35 T:2911894384 M:778919936   ERROR: Scriptresult: Error
22:16:36 T:2911894384 M:778956800    INFO: Python script stopped

Thanks.

Same problem here with Gentoo and 9.11 release build.
Grabbed youtube plugin today using SVN_Repo_Installer_1.3.1.

ls ~/.xbmc/plugins/video/YouTube/YoutubeAPI/ has:

__init__.py xbmcplugin_categories.py xbmcplugin_download.py xbmcplugin_player.py xbmcplugin_videos.pyc
__init__.pyc xbmcplugin_categories.pyc xbmcplugin_player_by_id.py xbmcplugin_videos.py YoutubeClient.pyo

, no YoutubeClient.py file. Any thoughts?
find
Nektarios Offline
Junior Member
Posts: 47
Joined: Apr 2010
Reputation: 0
Post: #142
Nuka1195 Wrote:those who have video not playing at all issues. if you are logged in, try not entering a username in settings.

search results can be changed in xbmcplugin_categories.py.

change "updated" to "relevant". post back if the results are better, i may change it.
Code:
categories += ( ( query.split( " | " )[ 1 ].encode( "utf-8" ), "videos", vq, username, cat, True, "updated", 0, thumbnail, False, ), )

and maybe

Code:
if ( ptype == 2 ):
            categories += ( ( xbmc.getLocalizedString( 30970 ), "search_categories", "", "", "", True, "updated", 3, "", False, ), )
        elif ( ptype == 1 ):
            categories += ( ( xbmc.getLocalizedString( 30955 ), "search_users", "", "", "", True, "updated", 2, "", False, ), )
        else:
            categories += ( ( xbmc.getLocalizedString( 30956 ), "search_videos", "", "", "", True, "updated", 1, "", False, ), )




for those with playing issues, where the video plays, but badly. that's an xbmc issue, that may be fixed in newer versions, which the current plugin will not work with.


Yes it works beautifully! With "relevance" instead of "updated" the search results are perfect now. Can you please incorporate the changes in the next version?

Here are the changes:

xbmcplugin_categories.py
Line 122-127:
Code:
if ( ptype == 2 ):
            categories += ( ( __language__( 30970 ), "search_categories", "", "", "", True, "relevance", 3, "", False, ), )
        elif ( ptype == 1 ):
            categories += ( ( __language__( 30955 ), "search_users", "", "", "", True, "relevance", 2, "", False, ), )
        else:
            categories += ( ( __language__( 30956 ), "search_videos", "", "", "", True, "relevance", 1, "", False, ), )

and this needs to change too:

xbmcplugin_categories.py
Line 153:
Code:
categories += ( ( query.split( " | " )[ 1 ].encode( "utf-8" ), "videos", vq, username, cat, True, "[b]relevance[/b]", 0, thumbnail, False, ), )
find
aguilar955 Offline
Junior Member
Posts: 2
Joined: Aug 2010
Reputation: 0
Post: #143
birbilakos Wrote:no YoutubeClient.py file. Any thoughts?

This working perfectly in XBCM of Windows 7

YouTube_1.7.4_xbmc_1_08_2010

Code:
http://www.megaupload.com/?d=QDJDKC6Y

I file translation to Spanish.

..\YouTube\resources\language\Spanish\strings.xml

Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<strings>
    <!-- Plugin strings -->
    <string id="30900">Guardar por defecto</string>
    <string id="30901">¿Deseas guardar esta consulta por defecto?</string>
    <string id="30902">¿No se pudo guardar la busqueda!</string>
    <string id="30903">Error al guardar el fichero de la busqueda:</string>
    <string id="30904">Sin descripcion</string>
    <string id="30905">Nombre por defecto</string>
    <string id="30906">Buscar por palabra clave</string>
    <string id="30907">Buscar por usuario o ID</string>
    <string id="30908">Cargando video...</string>
    <string id="30909">Buscando video musical aleatorio...</string>
    <string id="30910">Reproducir video por ID</string>
    <string id="30911">Quisiste decir</string>
    <string id="30912">Elegir categoria</string>
    <string id="30913">Palabras clave - * para todos los videos</string>

    <!-- Category strings -->
    <string id="30950">Todos los videos</string>
    <string id="30951">Mas vistos</string>
    <string id="30952">Buscar  videos</string>
    <string id="30953">Buscar gente</string>
    <string id="30954">Destacados</string>
    <string id="30955">Buscar gente...</string>
    <string id="30956">Buscar videos...</string>
    <string id="30957">Mas valorados</string>
    <string id="30958">Para el movil</string>
    <string id="30959">Reproducir video musical aleatorio</string>
    <string id="30960">Reproducir video por ID</string>
    <string id="30961">Mis videos subidos</string>
    <string id="30962">Mis favoritos</string>
    <string id="30963">Favoritos</string>
    <string id="30964">Mas comentados</string>
    <string id="30965">Mas enlazados</string>
    <string id="30966">Mas respondidos</string>
    <string id="30967">Mas recientes</string>
    <string id="30968">Videos relacionados</string>
    <string id="30969">Buscar por categorias</string>
    <string id="30970">Buscar por categorias...</string>
    <string id="30971">Mi Suscripcion</string>
    
    <!-- Context menu strings -->
    <string id="30500">Videos relacionados</string>
    <string id="30501">Descargar video</string>
    <string id="30502">Informacion del video</string>
    <string id="30503">Añadir a mis favoritos</string>
    <string id="30504">Añadir video a la cola</string>
    <string id="30505">Reproduciendo...</string>
    <string id="30506">Borrar de mis favoritos</string>
    <string id="30507">Videos por %s</string>
    <string id="30508">Borrar busqueda guardada</string>
    <string id="30509">Anadir carpeta a la cola</string>

    <!-- messages -->
    <string id="30600">Descargando: %s</string>
    <string id="30601">Guardando %s</string>
    <string id="30602">A: %s</string>
    <string id="30603">Copiando: %s</string>

    <!-- compatible messages -->
    <string id="30700">Version</string>
    <string id="30701">Esta versionde %s requiere una</string>
    <string id="30702">actualizacion de XBMC a %s o superior para funcionar.</string>
    <string id="30703">Por favor, actualiza tu XBMC.</string>

    <!-- Plugin settings strings -->
    <string id="30000">Nombre de usuario</string>
    <string id="30005">Contraseña</string>
    <string id="30010">Ver contenidos de</string>
    <string id="30011">Siempre</string>
    <string id="30012">Hoy</string>
    <string id="30013">Esta semana</string>
    <string id="30014">Este mes</string>
    <string id="30020">Incluir contenido explicito</string>
    <string id="30030">Numero de videos por pagina</string>
    <string id="30040">Player core</string>
    <string id="30050">Reproducir video en HD si esta disponible</string>
    <string id="30060">Mostrar resultados de</string>
    <string id="30061">Todos los paises</string>
    <string id="30062">Australia</string>
    <string id="30063">Brasil</string>
    <string id="30064">Canada</string>
    <string id="30065">Francia</string>
    <string id="30066">Alemania</string>
    <string id="30067">Reino Unido</string>
    <string id="30068">Holanda</string>
    <string id="30069">Hong Kong</string>
    <string id="30070">Irlanda</string>
    <string id="30071">Italia</string>
    <string id="30072">Japon</string>
    <string id="30073">Méjico</string>
    <string id="30074">Nueva Zelanda</string>
    <string id="30075">Polonia</string>
    <string id="30076">Rusia</string>
    <string id="30077">Korea del Sur</string>
    <string id="30078">Espana</string>
    <string id="30079">Taiwan</string>
    <string id="30080">Estados Unidos</string>
    <string id="30090">Numero de busquedas a guardar</string>
    <string id="30100">Descargar mas</string>
    <string id="30101">Temporalmente</string>
    <string id="30102">Guardar</string>
    <string id="30110">Directorio de descarga</string>
    <string id="30120">- Usar titulo como nombre del archivo</string>
    <string id="30130">Anadir imagen</string>
</strings>

Regards
(This post was last modified: 2010-08-01 00:51 by aguilar955.)
find
exobuzz Offline
Fan
Posts: 595
Joined: Aug 2004
Reputation: 12
Post: #144
Is this plugin still maintained ? I see its available in the new xbmc addons repository also (with the non compiled YoutubeClient.py which isnt in the google addons repo). If it is no longer maintained, I would be happy to contribute some changes to the plugin version at the google code site.

I have modified the YoutubeClient.py (taken from the addons repo), and added support for rtmpe streams. This is used by the 4od channel for example - so allows playing back the channel 4 stuff which is there (plenty of shows).

If you are in the UK please give it a try. Go to Search People and add

4oD
4oDComedy
4oDDocumentaries
4oDDrama
4oDEntertainment
4oDFood
4oDHomes
4oDLifestyle

Get the plugin here: If you use the youtube addon on a recent linux/windows/osx xbmc, you can take the YoutubeClient.py from this archive and use it with the addon.

http://malus.exotica.org.uk/~buzz/xbmc/YouTube.zip
find
Nuka1195 Offline
Skilled Python Coder
Posts: 3,910
Joined: Dec 2004
Reputation: 18
Post: #145
i'll be releasing the youtube plugin, with the changes people have requested in a few days.

the youtubeclient.py is different from what's in xbmc repo, but i'll check out your changes.

For python coding questions first see http://mirrors.xbmc.org/docs/python-docs/
find
exobuzz Offline
Fan
Posts: 595
Joined: Aug 2004
Reputation: 12
Post: #146
I'm happy to apply my changes to another youtubeclient.py (or provide diffs), but there was no source for the one on the google xbmc repo.
find
Smiff Offline
Senior Member
Posts: 153
Joined: Dec 2008
Reputation: 0
Post: #147
haven't had chance to try, but can you skip 4oD's Ads?
find
exobuzz Offline
Fan
Posts: 595
Joined: Aug 2004
Reputation: 12
Post: #148
Dunno. Give it a try ;-)
find
procrastinator Offline
Fan
Posts: 443
Joined: Aug 2008
Reputation: 4
Location: UK
Post: #149
exobuzz Wrote:I have modified the YoutubeClient.py (taken from the addons repo), and added support for rtmpe streams. This is used by the 4od channel for example - so allows playing back the channel 4 stuff which is there (plenty of shows).

If you are in the UK please give it a try. Go to Search People and add

4oD
4oDComedy
4oDDocumentaries
4oDDrama
4oDEntertainment
4oDFood
4oDHomes
4oDLifestyle

Get the plugin here: If you use the youtube addon on a recent linux/windows/osx xbmc, you can take the YoutubeClient.py from this archive and use it with the addon.

http://malus.exotica.org.uk/~buzz/xbmc/YouTube.zip

I gave this a quick try earlier. Searching for "4oD" under people only came up with a handful of clips, but "4oDComedy" gave pages and pages of (full length episode) results. Haven't watched anything the whole way through yet but played a few things for a couple of minutes. It does jump straight into the program, no adverts. I tried the latest episode of the IT crowd which seemed to work absolutely fine, but also tried a few episodes of Black Books; the video for these was fine, but there was no audio at all.

I was running this on an exobuzz build of XBMC for XBox (not the most up-to-date: r30391-librtmp). I haven't tried this on my Windows 7 install of XBMC yet.

By the way, does anybody know if there is a way to search within your search results? As I mentioned above a search for "4oDComedy" comes up with loads of results, but flicking through page after page of search results isn't really a practical way to find what you're looking for.

Note to exobuzz: *HUGE* thanks for all the quality hard work you've been putting into XBMC over the past few months
find
exobuzz Offline
Fan
Posts: 595
Joined: Aug 2004
Reputation: 12
Post: #150
Thanks for the kind comments. Actually I thought about adding a function so you can bring up a context menu and "search against" a particular author (which could then appear as a subfolder in the listing). But it's not really my plugin and having so much else on my plate right now, I have limited free time Perhaps it's something the talented and much appreciated (certainly from me) original author might do ;-)

the 4od user doesnt have many videos. I think they just use that to advertise the others. Would help with more sorting if it was possible to get all items sorted by name rather than the current page, but this might be a limitation of whatever scraping etc is being done.

In terms of xbox builds, I wouldnt recommend my builds now as they are not the latest versions, and I think the other svn build site should do better. I occasionally may make a new build to test something new but the latest developments are in the svn dailies.

Cheers!

addition: not sure about the no audio. could be aac issue perhaps. might be worth posting a log if it seems a common issue, but perhaps not here but rather on the xbmc4xbox trac (or xmc.org trac if the same issue is on the linux/windows/osx builds - they have more devs than we do ;-) )
(This post was last modified: 2010-08-05 03:18 by exobuzz.)
find
Thread Closed