aymane-mzily / xot-uzg

Automatically exported from code.google.com/p/xot-uzg
0 stars 0 forks source link

RTMPT vs RTMP on VRT channels (BE) #349

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using XOT-Uzg.v3 3.2.14 / XBMC 11.0 (Compiled Mar 24) on Ubuntu 11.10 - 
XBMCbuntu

It looks like I can't play the rtmpt:// streams (works fine in my browser).

When playing a rtmpt stream I get the following error in xbmc.log:

02:00:32 T:2915634032  NOTICE: -->Python Interpreter Initialized<--
02:00:34 T:15899296  NOTICE: DVDPlayer: Opening: 
rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL1205311486783
.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true
02:00:34 T:15899296 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
02:00:34 T:2986326896  NOTICE: Creating InputStream
02:00:34 T:2986326896   ERROR: RTMP_Connect1, handshake failed.
02:00:34 T:2986326896   ERROR: CDVDPlayer::OpenInputStream - error opening 
[rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL120531148678
3.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true]
02:00:34 T:2986326896  NOTICE: CDVDPlayer::OnExit()
02:00:34 T:2986326896  NOTICE: CDVDPlayer::OnExit() deleting input stream
02:00:34 T:15899296   ERROR: Playlist Player: skipping unplayable item: 0, path 
[rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL120531148678
3.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true]

But, it looks like the rtmp streams run fine - As a test I quickly hacked 
mediaitem.py (because that's probably a lot faster than fixing the librtmp 
handshake error - still have to look into that):

--- /tmp/xot/net.rieter.xot/resources/libs/mediaitem.py 2012-04-24 
20:54:38.000000000 +0200
+++ .xbmc/addons/net.rieter.xot/resources/libs/mediaitem.py     2012-06-03 
02:02:11.749899714 +0200
@@ -12,6 +12,7 @@
 import datetime
 import time
 import random
+import re

 import xbmc
 import xbmcgui
@@ -426,6 +427,7 @@
                 continue

             (stream, xbmcItem) = part.GetXBMCPlayListItem(self, bitrate=bitrate)
+           stream.Url = re.sub('^rtmpt','rtmp', stream.Url)
             logText = "%s\n + %s" % (logText, stream)
             if part.UserAgent is None:
                 playList.add(stream.Url, xbmcItem)

After this 'patch' the streams start fine; 

02:11:18 T:3017800560  NOTICE: -->Python Interpreter Initialized<--
02:11:19 T:15899296  NOTICE: DVDPlayer: Opening: 
rtmp://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL1205311486783.
urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true
02:11:19 T:15899296 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
02:11:19 T:2942303088  NOTICE: Creating InputStream
02:11:19 T:2942303088  NOTICE: Creating Demuxer
02:11:19 T:2942303088  NOTICE: Metadata:
02:11:19 T:2942303088  NOTICE:   audiocodecid          2.00
02:11:19 T:2942303088  NOTICE:   audiodatarate         96.23
02:11:19 T:2942303088  NOTICE:   canseektoend          FALSE
02:11:19 T:2942303088  NOTICE:   copyright             VRT
...

So I thought to just move this 'patch' to channel.be/een, channel.be/vrt and 
channel.be/canvas but somehow this does not get picked up for all channels?!

e.g. :

$ diff -u /tmp/xot/net.rieter.xot.channel.be/een/chn_een.py 
net.rieter.xot.channel.be/een/chn_een.py
--- /tmp/xot/net.rieter.xot.channel.be/een/chn_een.py   2012-04-10 
23:01:48.000000000 +0200
+++ net.rieter.xot.channel.be/een/chn_een.py    2012-06-03 02:14:27.361899713 
+0200
@@ -3,6 +3,7 @@
 # Import the default modules
 #===============================================================================
 import sys
+import re
 import urlparse
 #===============================================================================
 # Make global object available
@@ -198,4 +199,9 @@
         else:
             logFile.debug("Media url was not found.")

-        return item
+        for mediaPart in item.MediaItemParts:
+                for mediaStream in mediaPart.MediaStreams:
+                       logFile.debug("Translating rtmpt url to rtmp; URL = 
%s", mediaStream.Url)
+                        mediaStream.Url = re.sub('^rtmpt','rtmp', 
mediaStream.Url)
+                       logFile.debug("Translating done; URL = %s", 
mediaStream.Url)
+       return item

=> check how the additional output is added in chn_een.py:

20120603 02:27:18 - [2467MB] INFO     - chn_een.py           - 174  - starting 
UpdateVideoItem for Volt - Deze week (E�n)
20120603 02:27:18 - [2467MB] DEBUG    - chn_class.py         - 991  - Going to 
cache 
http://www.een.be/files/een.be/imagecache/video_image/files/een.be/images/progra
mmas/volt/2012/volt_120530_trailer_druggebruik.jpg
20120603 02:27:18 - [2467MB] DEBUG    - chn_class.py         - 994  - For 
plugin-mode we do not cache thumbs, that's XBMC's work.
20120603 02:27:18 - [2467MB] INFO     - uriopener.py         - 279  - Opening 
requested uri Async: http://www.een.be/mediatheek/ajax/video/563042 (already 1 
threads)
20120603 02:27:18 - [2467MB] INFO     - uriopener.py         - 525  - 
Determining which Progessbar to use....
20120603 02:27:18 - [2467MB] INFO     - uriopener.py         - 530  - FileSize 
is known (fileSize=2166)
20120603 02:27:18 - [2467MB] INFO     - uriopener.py         - 330  - Url 
http://www.een.be/mediatheek/ajax/video/563042 was opened successfully
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 621  - Creating 
MediaItemPart 'Volt - Deze week' for 
'rtmpt://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebrui
k_Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true'
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 849  - Creating 
MediaStream 
'rtmpt://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebrui
k_Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true' with bitrate '0'
20120603 02:27:18 - [2467MB] DEBUG    - chn_een.py           - 204  - 
Translating rtmpt url to rtmp; URL = 
rtmpt://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebruik
_Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true
20120603 02:27:18 - [2467MB] DEBUG    - chn_een.py           - 206  - 
Translating done; URL = 
rtmp://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebruik_
Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true
20120603 02:27:18 - [2467MB] DEBUG    - chn_class.py         - 843  - Checking 
for not streamable parts
20120603 02:27:18 - [2467MB] INFO     - chn_class.py         - 860  - Starting 
Video Playback using the defaultplayer
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 702  - Creating 
XBMC ListItem 'Volt - Deze week' [PluginMode=False]
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - Creating 
playlist for Bitrate: 1500 kbps
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - | 
MediaItem: Volt - Deze week [Type=video, Complete=True, Error=False, 
Date=2012-05-30, Downloadable=False]
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - | 
MediaPart: Volt - Deze week [CanStream=True, UserAgent=None]
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - +  + 
MediaStream: 
rtmp://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebruik_
Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true [bitrate=0, downloaded=False]
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - | 
Selected Streams:
20120603 02:27:18 - [2467MB] DEBUG    - mediaitem.py         - 444  - +  + 
MediaStream: 
rtmp://vrt.flash.streampower.be/een//2012/05/Volt_120530_trailer_uc_druggebruik_
Website_EEN.flv 
swfurl=http://www.een.be/sites/een.be/modules/custom/vrt_video/player/player_4.3
.swf swfvfy=true [bitrate=0, downloaded=False]
20120603 02:27:18 - [2467MB] INFO     - chn_class.py         - 873  - Playing 
using default player

This fixed playback just perfect for "chn_een.py", but applying the same patch 
to "chn_canvas.py" just gets ignored somehow?!

20120603 02:28:29 - [2468MB] INFO     - chn_canvas.py        - 132  - starting 
UpdateVideoItem for Panorama 31/05: Cyberwar (uitzending) [Type=video, 
Complete=False, unknown urls, Error=False, Date=, Downloadable=False]
20120603 02:28:29 - [2468MB] DEBUG    - chn_class.py         - 991  - Going to 
cache 
http://video.canvas.be/wp-content/themes/canvasvideo2/timthumb.php?src=http://vi
deo.canvas.be/wp-content/uploads/2012/06/pano.jpg&w=192&h=108
20120603 02:28:29 - [2468MB] DEBUG    - chn_class.py         - 994  - For 
plugin-mode we do not cache thumbs, that's XBMC's work.
20120603 02:28:29 - [2468MB] INFO     - uriopener.py         - 279  - Opening 
requested uri Async: http://video.canvas.be/panorama-3105-cyberwar (already 1 
threads)
20120603 02:28:29 - [2468MB] INFO     - uriopener.py         - 525  - 
Determining which Progessbar to use....
20120603 02:28:29 - [2468MB] INFO     - uriopener.py         - 533  - FileSize 
is unknown
20120603 02:28:30 - [2468MB] INFO     - uriopener.py         - 330  - Url 
http://video.canvas.be/panorama-3105-cyberwar was opened successfully
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 621  - Creating 
MediaItemPart 'Panorama 31/05: Cyberwar (uitzending)' for 
'rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL120531148678
3.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true'
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 849  - Creating 
MediaStream 
'rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL120531148678
3.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true' with bitrate '0'
20120603 02:28:30 - [2468MB] DEBUG    - chn_class.py         - 843  - Checking 
for not streamable parts
20120603 02:28:30 - [2468MB] INFO     - chn_class.py         - 860  - Starting 
Video Playback using the defaultplayer
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 702  - Creating 
XBMC ListItem 'Panorama 31/05: Cyberwar (uitzending)' [PluginMode=False]
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - Creating 
playlist for Bitrate: 1500 kbps
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - | 
MediaItem: Panorama 31/05: Cyberwar (uitzending) [Type=video, Complete=True, 
Error=False, Date=, Downloadable=False]
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - | 
MediaPart: Panorama 31/05: Cyberwar (uitzending) [CanStream=True, 
UserAgent=None]
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - +  + 
MediaStream: 
rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL1205311486783
.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true [bitrate=0, downloaded=False]
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - | 
Selected Streams:
20120603 02:28:30 - [2468MB] DEBUG    - mediaitem.py         - 444  - +  + 
MediaStream: 
rtmpt://vrt.flash.streampower.be:80/vrtnieuws//2012/05/223842439ONL1205311486783
.urlFLVLong.flv 
swfurl=http://video.canvas.be/common2/all/swf/jw-flv-player/4.3.patched/player.s
wf swfvfy=true [bitrate=0, downloaded=False]
20120603 02:28:30 - [2468MB] INFO     - chn_class.py         - 873  - Playing 
using default player

- Any idea why the RTMPT streams don't work and/or am I the only one?
- Any idea why my modifications in chn_canvas don't get picked up?

Original issue reported on code.google.com by rippe...@gmail.com on 3 Jun 2012 at 12:48

GoogleCodeExporter commented 9 years ago
Editing the mediaitem.py is not an option as it impacts all channels. Your fix 
in the Een channel is in the wrong place. I guess you need to update the 
UpdateVideoItem method and make sure the rtmp value is substituted there.
I will look into it.

Original comment by basrie...@gmail.com on 3 Jun 2012 at 5:40

GoogleCodeExporter commented 9 years ago
I checked : it can be fixed in the UpdateVideoItem method for both channels.

I do not have time to fix this during the week.  Next weekend. 

Original comment by basrie...@gmail.com on 3 Jun 2012 at 7:17

GoogleCodeExporter commented 9 years ago
Ok, EEN is working now. But it seems that CANVAS is not working at all? Is that 
correct?

Original comment by basrie...@gmail.com on 9 Jun 2012 at 8:12

GoogleCodeExporter commented 9 years ago

Original comment by basrie...@gmail.com on 9 Jun 2012 at 8:27

GoogleCodeExporter commented 9 years ago
That's what I tried to explain.

If you hack it in in mediaitem.py both "een" and "canvas" will work.

For some strange reason any update in canvas.py just gets ignored while they 
aren't in een.py. Write some random data via the logFile.debug() function in 
the UpdateVideoItem() of canvas.py - it will not be written in the log file.

Hope this helps.

Original comment by rippe...@gmail.com on 10 Jun 2012 at 7:10

GoogleCodeExporter commented 9 years ago
It never gets there because the channel is broken. The site just changed too 
much. 

Original comment by basrie...@gmail.com on 10 Jun 2012 at 7:31

GoogleCodeExporter commented 9 years ago
Fixing Canvas now.

Original comment by basrie...@gmail.com on 10 Jun 2012 at 8:58

GoogleCodeExporter commented 9 years ago
Official update for Canvas and Een was just released.

Original comment by basrie...@gmail.com on 11 Jun 2012 at 8:20

GoogleCodeExporter commented 9 years ago
Changed status to Done

Original comment by basrie...@gmail.com on 24 Jun 2012 at 11:43