New PMS Transcoder fixes for RTMP - can't get RTMP To transcode for iOS

I have a live stream that I want to be able to view on my iOS device, I have built a channel around it but everytime I view the channel on iOS it tells me to connect to a PMS so that the video can be transcoded so that my iOS device and read it, any idea what the fixes for RTMP transcoding were and if there is anything else I need to do to get this video to transcode?





channel code


<br />
<br />
VIDEO_PREFIX = "/video/msnbclivestream"<br />
<br />
NAME = L('Title')<br />
<br />
# make sure to replace artwork with what you want<br />
# these filenames reference the example files in<br />
# the Contents/Resources/ folder in the bundle<br />
ART  = 'art-default.jpg'<br />
ICON = 'icon-default.png'<br />
<br />
# -*- coding: utf-8 -*-<br />
<br />
####################################################################################################<br />
<br />
def Start():<br />
  Plugin.AddPrefixHandler('/video/LiveTV', MainMenu, 'LiveTV', 'icon-default.png', 'art-default.jpg')<br />
  Plugin.AddViewGroup('InfoList', viewMode='InfoList', mediaType='items')<br />
  MediaContainer.art = R('art-default.jpg')<br />
  HTTP.Headers['User-agent'] = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12'<br />
<br />
####################################################################################################<br />
<br />
def MainMenu():<br />
  #dir = MediaContainer(viewGroup='InfoList', title1='MSNBC Channel List')<br />
  #dir.Append(WebVideoItem('http://blog.livenewschat.tv/rockinroosters/', title='Pingwin'))<br />
  #ir = MediaContainer(title1="MSNBC - Live TV", title2="MSNBC TV") <br />
  oc = ObjectContainer(view_group='InfoList',title1='Live TV', title2="")<br />
<br />
  vco = VideoClipObject(title = "MSNBC", summary = "Live MSNBC", thumb ='http://members.fortunecity.com/tvnetworks/nbc/msnbc.jpg' , rating_key="msnbclive://testing", key=Callback(Lookup))<br />
  vco.add(MediaObject(<br />
    container = Container.MP4,<br />
    video_codec = VideoCodec.H264,<br />
    audio_codec = AudioCodec.AAC,<br />
    audio_channels = 2,<br />
    optimized_for_streaming = True,<br />
    parts = [PartObject(key = RTMPVideoURL(url="rtmp://a.cdn.msnbclive.eu/edge", clip="msnbc_live", swfUrl="http://msnbclive.eu/player.swf", live=True) )]))<br />
  oc.add(vco)<br />
 <br />
<br />
  vc1 = VideoClipObject(title = 'URL Test', summary = 'Live', thumb = 'http://members.fortunecity.com/tvnetworks/nbc/msnbc.jpg', url='msnbclive://testing')<br />
  oc.add(vc1)<br />
#  vco2 = VideoClipObject(title = "CNN", summary = "Live CNN", thumb ='http://upload.wikimedia.org/wikipedia/so/thumb/8/8b/Cnn.svg/800px-Cnn.svg.png' , url = "rtmp://176.31.231.57/edge playpath=5fvqxtgvyn2m9n1 swfUrl=http://cdn.static.ilive.to/jwplayer/player.swf pageUrl=http://www.ilive.to/view/26798/The_Best_Station swfVfy=true live=true")<br />
#  vco2.add(MediaObject(<br />
#    container = Container.MP4,<br />
#    video_codec = VideoCodec.H264,<br />
#    audio_codec = AudioCodec.AAC,<br />
#    audio_channels = 2,<br />
#    optimized_for_streaming = True,<br />
#    parts = [PartObject(key = RTMPVideoURL("rtmp://176.31.231.57/edge playpath=5fvqxtgvyn2m9n1 swfUrl=http://cdn.static.ilive.to/jwplayer/player.swf pageUrl=http://www.ilive.to/view/26798/The_Best_Station swfVfy=true live=true", clip = "", live=True, height=467, width=830) )]))<br />
#  oc.add(vco2)<br />
  <br />
  <br />
#  for video in XML.ElementFromURL("http://f.cl.ly/items/1D3O0M3s333c2K2Y0B3J/TVCh.xml").xpath('//item'):<br />
#	rtmplink = video.get('link')<br />
#	itemtitle = video.get('title')<br />
#	vc1 = VideoClipObject(title = itemtitle, summary = 'Live', thumb = '', url=rtmplink)<br />
	<br />
#	vc1.add(MediaObject(<br />
#      container = Container.MP4,<br />
#      video_codec = VideoCodec.H264,<br />
#      audio_codec = AudioCodec.AAC,<br />
#      audio_channels = 2,<br />
#      optimized_for_streaming = True,<br />
#      parts = [PartObject(key = RTMPVideoURL(rtmplink, clip = "", live=True) )]))<br />
#      #parts = [PartObject(key = RTMPVideoURL("rtmp://a.cdn.msnbclive.eu/edge playpath=msnbc_live swfUrl=http://msnbclive.eu/player.swf pageUrl=http://blog.livenewschat.tv/rockinroosters/ swfVfy=true live=true", clip = "msnbc_live", live=True, height=467, width=830) )]))<br />
#<br />
#	oc.add(vc1)<br />
<br />
  <br />
  #ir.add(oc)<br />
  return oc<br />
<br />
  <br />
<br />
<br />
###<br />
###<br />
def Lookup():<br />
  return VideoClipObject(title = "MSNBC", summary = "Live MSNBC", thumb ='http://members.fortunecity.com/tvnetworks/nbc/msnbc.jpg' , rating_key="msnbclive://testing", key=Callback(Lookup),<br />
        items = [MediaObject(<br />
                ### I think it's best not to specify MP4 as the container type for the RTMP stream since it will need to be transcoded for most clients anyway. ###<br />
                #container = Container.MP4,<br />
                video_codec = VideoCodec.H264,<br />
                audio_codec = AudioCodec.AAC,<br />
                audio_channels = 2,<br />
                optimized_for_streaming = True,<br />
                #### You're trying to pass too much info in the "url" parameter, which should be declared. the url is the actual rtmp url. The clip is the playpath, specifying the swf_url automatically assigns swfVfy as true. The pageUrl is not a necessary parameter. Also "height" and "width" are irrelevant when using RealRTMP #####<br />
                parts = [PartObject(key = RTMPVideoURL(url="rtmp://a.cdn.msnbclive.eu/edge", clip="msnbc_live", swfUrl="http://msnbclive.eu/player.swf", live=True) )])])<br />
                #parts = [PartObject(key = RTMPVideoURL("rtmp://a.cdn.msnbclive.eu/edge playpath=msnbc_live swfUrl=http://msnbclive.eu/player.swf pageUrl=http://blog.livenewschat.tv/rockinroosters/ swfVfy=true live=true", clip = "msnbc_live", live=True, height=467, width=830) )])])<br />
####################################################################################################<br />
<br />
<br />
<br />




service


<br />
####################################################################################################<br />
<br />
def MetadataObjectForURL(url):<br />
    vc = VideoClipObject( title = url )<br />
    #vc = VideoClipObject(<br />
    #  title = url, url = url)<br />
    return vc<br />
<br />
<br />
def MediaObjectsForURL(url):<br />
  <br />
  return [MediaObject(<br />
				parts = [PartObject(key=Callback(PlayVideo, url=url))],<br />
				protocol = Protocol.RTMP,<br />
                video_codec = VideoCodec.H264,<br />
                audio_codec = AudioCodec.AAC,<br />
                audio_channels = 2,<br />
                optimized_for_streaming = True)]<br />
                #parts = [PartObject(key = RTMPVideoURL(url="rtmp://a.cdn.msnbclive.eu/edge", clip="msnbc_live", swfUrl="http://msnbclive.eu/player.swf", live=True) )])]<br />
                <br />
<br />
def NormalizeURL(url):<br />
    return url<br />
<br />
<br />
####################################################################################################<br />
@indirect<br />
def PlayVideo(url):<br />
    Log(url)<br />
    return IndirectResponse(VideoClipObject,key = RTMPVideoURL(url="rtmp://a.cdn.msnbclive.eu/edge", clip="msnbc_live", swfUrl="http://msnbclive.eu/player.swf", live=True))<br />


Have you enabled the RealRTMP flag in the Info.plist and ServiceInfo.plist?



Also live rtmp streams can be tricky and/or just not work for transcoding. Do you have any logs when trying to run it? Might be helpful to track down the issues.

here are the logs, it also appears that this no longer works on the desktop plex clients either and with last PMS it did.



<br />
Jan 07, 2013 22:49:02:918 [15700] DEBUG - Request: GET /video/LiveTV [127.0.0.1:10509] (1 live)<br />
Jan 07, 2013 22:49:02:918 [15700] DEBUG - Plug-in com.plexapp.plugins.msnbclivestream has been used 34 times.<br />
Jan 07, 2013 22:49:02:989 [15700] DEBUG - [com.plexapp.plugins.msnbclivestream] Sending command over HTTP (GET): /video/LiveTV<br />
Jan 07, 2013 22:49:02:990 [15700] DEBUG - (Capabilties) Passing down capabilities of 'protocols=http-video,shoutcast;videoDecoders=h264{profile:high&resolution:1080&level:51};audioDecoders=mp3,aac' to plug-in.<br />
Jan 07, 2013 22:49:02:990 [15700] DEBUG - HTTP requesting to: http://127.0.0.1:9894/video/LiveTV<br />
Jan 07, 2013 22:49:03:026 [15740] DEBUG - Request: GET /:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMzUKY29tLnBsZXhhcHAucGx1Z2lucy5tc25iY2xpdmVzdHJlYW1zMTAKaWRlbnRpZmllcnIwCg__ [127.0.0.1:10512] (2 live)<br />
Jan 07, 2013 22:49:03:027 [15740] DEBUG - [com.plexapp.system] Sending command over HTTP (GET): /:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMzUKY29tLnBsZXhhcHAucGx1Z2lucy5tc25iY2xpdmVzdHJlYW1zMTAKaWRlbnRpZmllcnIwCg__<br />
Jan 07, 2013 22:49:03:027 [15740] DEBUG - HTTP requesting to: http://127.0.0.1:9119/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMzUKY29tLnBsZXhhcHAucGx1Z2lucy5tc25iY2xpdmVzdHJlYW1zMTAKaWRlbnRpZmllcnIwCg__<br />
Jan 07, 2013 22:49:03:044 [15740] DEBUG - [com.plexapp.system] HTTP reply status 200, with 32 bytes of content.<br />
Jan 07, 2013 22:49:03:080 [15700] DEBUG - [com.plexapp.plugins.msnbclivestream] HTTP reply status 200, with 2268 bytes of content.<br />
Jan 07, 2013 22:49:04:030 [15752] DEBUG - Request: GET / [127.0.0.1:10524] (1 live)<br />
Jan 07, 2013 22:49:04:030 [15752] DEBUG - It took 0.000000 sec to serialize a list with 9 elements.<br />
Jan 07, 2013 22:49:04:720 [15800] DEBUG - Request: GET /:/plugins/com.plexapp.plugins.msnbclivestream/serviceFunction/url/com.plexapp.plugins.msnbclivestream/MSNBCLIVE/PlayVideo?args=Y2VyZWFsMQoxCnR1cGxlCjAKcjAK&kwargs=Y2VyZWFsMQoxCmRpY3QKMQpzMTkKbXNuYmNsaXZlOi8vdGVzdGluZ3MzCnVybHIwCg__&indirect=1&mediaInfo=%7B%22audio_channels%22%3A%202%2C%20%22protocol%22%3A%20%22rtmp%22%2C%20%22optimized_for_streaming%22%3A%20true%2C%20%22video_frame_rate%22%3A%20null%2C%20%22duration%22%3A%20null%2C%20%22height%22%3A%20null%2C%20%22width%22%3A%20null%2C%20%22container%22%3A%20null%2C%20%22audio_codec%22%3A%20%22aac%22%2C%20%22aspect_ratio%22%3A%20null%2C%20%22video_codec%22%3A%20%22h264%22%2C%20%22video_resolution%22%3A%20null%2C%20%22bitrate%22%3A%20null%7D [127.0.0.1:10525] (1 live)<br />
Jan 07, 2013 22:49:04:720 [15800] DEBUG -  * args => Y2VyZWFsMQoxCnR1cGxlCjAKcjAK<br />
Jan 07, 2013 22:49:04:720 [15800] DEBUG -  * kwargs => Y2VyZWFsMQoxCmRpY3QKMQpzMTkKbXNuYmNsaXZlOi8vdGVzdGluZ3MzCnVybHIwCg__<br />
Jan 07, 2013 22:49:04:720 [15800] DEBUG -  * indirect => 1<br />
Jan 07, 2013 22:49:04:720 [15800] DEBUG -  * mediaInfo => {"audio_channels": 2, "protocol": "rtmp", "optimized_for_streaming": true, "video_frame_rate": null, "duration": null, "height": null, "width": null, "container": null, "audio_codec": "aac", "aspect_ratio": null, "video_codec": "h264", "video_resolution": null, "bitrate": null}<br />
Jan 07, 2013 22:49:04:721 [15800] DEBUG - Plug-in com.plexapp.plugins.msnbclivestream has been used 35 times.<br />
Jan 07, 2013 22:49:04:721 [15800] DEBUG - [com.plexapp.plugins.msnbclivestream] Sending command over HTTP (GET): /:/plugins/com.plexapp.plugins.msnbclivestream/serviceFunction/url/com.plexapp.plugins.msnbclivestream/MSNBCLIVE/PlayVideo?args=Y2VyZWFsMQoxCnR1cGxlCjAKcjAK&kwargs=Y2VyZWFsMQoxCmRpY3QKMQpzMTkKbXNuYmNsaXZlOi8vdGVzdGluZ3MzCnVybHIwCg__&indirect=1&mediaInfo=%7B%22audio_channels%22%3A%202%2C%20%22protocol%22%3A%20%22rtmp%22%2C%20%22optimized_for_streaming%22%3A%20true%2C%20%22video_frame_rate%22%3A%20null%2C%20%22duration%22%3A%20null%2C%20%22height%22%3A%20null%2C%20%22width%22%3A%20null%2C%20%22container%22%3A%20null%2C%20%22audio_codec%22%3A%20%22aac%22%2C%20%22aspect_ratio%22%3A%20null%2C%20%22video_codec%22%3A%20%22h264%22%2C%20%22video_resolution%22%3A%20null%2C%20%22bitrate%22%3A%20null%7D<br />
Jan 07, 2013 22:49:04:721 [15800] DEBUG - (Capabilties) Passing down capabilities of 'protocols=http-video,shoutcast;videoDecoders=h264{profile:high&resolution:1080&level:51};audioDecoders=mp3,aac' to plug-in.<br />
Jan 07, 2013 22:49:04:721 [15800] DEBUG - HTTP requesting to: http://127.0.0.1:9894/:/plugins/com.plexapp.plugins.msnbclivestream/serviceFunction/url/com.plexapp.plugins.msnbclivestream/MSNBCLIVE/PlayVideo?args=Y2VyZWFsMQoxCnR1cGxlCjAKcjAK&kwargs=Y2VyZWFsMQoxCmRpY3QKMQpzMTkKbXNuYmNsaXZlOi8vdGVzdGluZ3MzCnVybHIwCg__&indirect=1&mediaInfo=%7B%22audio_channels%22%3A%202%2C%20%22protocol%22%3A%20%22rtmp%22%2C%20%22optimized_for_streaming%22%3A%20true%2C%20%22video_frame_rate%22%3A%20null%2C%20%22duration%22%3A%20null%2C%20%22height%22%3A%20null%2C%20%22width%22%3A%20null%2C%20%22container%22%3A%20null%2C%20%22audio_codec%22%3A%20%22aac%22%2C%20%22aspect_ratio%22%3A%20null%2C%20%22video_codec%22%3A%20%22h264%22%2C%20%22video_resolution%22%3A%20null%2C%20%22bitrate%22%3A%20null%7D<br />
Jan 07, 2013 22:49:04:736 [15800] DEBUG - [com.plexapp.plugins.msnbclivestream] HTTP reply status 200, with 762 bytes of content.<br />
Jan 07, 2013 22:49:08:445 [15824] DEBUG - Request: GET /:/progress?key=msnbclive%3a%2f%2ftesting&identifier=com.plexapp.plugins.msnbclivestream&time=0&state=stopped [127.0.0.1:10532] (1 live)<br />
Jan 07, 2013 22:49:08:446 [15824] DEBUG -  * key => msnbclive://testing<br />
Jan 07, 2013 22:49:08:446 [15824] DEBUG -  * identifier => com.plexapp.plugins.msnbclivestream<br />
Jan 07, 2013 22:49:08:446 [15824] DEBUG -  * time => 0<br />
Jan 07, 2013 22:49:08:446 [15824] DEBUG -  * state => stopped<br />




Here is the plist


<br />
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><br />
<plist version="1.0"><br />
<dict><br />
    <key>CFBundleDevelopmentRegion</key><br />
    <string>English</string><br />
    <key>CFBundleExecutable</key><br />
    <string></string><br />
    <key>CFBundleIdentifier</key><br />
    <string>com.plexapp.plugins.msnbclivestream</string><br />
	<key>CFBundleInfoDictionaryVersion</key><br />
	<string>6.0</string><br />
	<key>CFBundlePackageType</key><br />
	<string>AAPL</string><br />
	<key>CFBundleSignature</key><br />
	<string>hook</string><br />
	<key>CFBundleVersion</key><br />
	<string>1.0</string><br />
	<br />
	<key>PlexFrameworkFlags</key><br />
	<array><br />
	<string>UseRealRTMP</string><br />
	</array><br />
	<br />
	<br />
	<key>PlexClientPlatforms</key><br />
	<string>MacOSX, iOS</string><br />
	<!-- TO ENABLE IOS<br />
	<key>PlexClientPlatforms</key><br />
	<string>MacOSX,iOS</string>--><br />
	<br />
	<!--<br />
	<key>PlexMediaContainer</key><br />
	<array><br />
	### PICK THE APPROPRIATE ONES<br />
		<string>Flash</string><br />
		<string>MP4</string><br />
		<string>FLV</string><br />
	</array><br />
	<key>PlexVideoCodec</key><br />
	<array><br />
		<string>H.264</string><br />
		<string>H.263</string><br />
	</array><br />
	<key>PlexAudioCodec</key><br />
	<array><br />
		<string>AAC</string><br />
		<string>MP3</string><br />
	</array><br />
	--><br />
	<br />
	<key>PlexFrameworkVersion</key><br />
	<string>2</string><br />
	<key>PlexPluginMode</key><br />
	<string>AlwaysOn</string><br />
	<br />
	<key>PlexPluginConsoleLogging</key><br />
	<string>1</string><br />
	<key>PlexPluginDevMode</key><br />
	<string>0</string><br />
	<br />
</dict><br />
</plist><br />




Here is the ServiceInfo.plist

<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><br />
<plist version="1.0"><br />
<dict><br />
        <key>URL</key><br />
        <dict><br />
                <key>MSNBCLIVE</key><br />
                <dict><br />
                        <key>TestURLs</key><br />
                        <array><br />
                                <string>msnbclive://testing</string><br />
                        </array><br />
                        <key>URLPatterns</key><br />
                        <array><br />
                                <string>msnbclive://testing</string><br />
                        </array><br />
                </dict><br />
        </dict><br />
        <key>PlexFrameworkFlags</key><br />
        <array><br />
                <string>UseRealRTMP</string><br />
        </array><br />
</dict><br />
</plist><br />




Now in both the windows, mac and iOS clients I just get an error when trying to play this feed (which still works in rtmpdump and as a .strm in xbmc) but with last version of PMS it worked with the desktop clients.

thanks for any help or insight you might be able to give me.

Off the top of my head I don’t see anything that jumps out at me as wrong with how you’re handling the rtmp bits … I can’t test it as I’m in Canada and get connection refused to any of the .eu domains when I try so I can’t really poke around, but I suspect that this may be something beyond your control that’s causing the issues. Sorry I couldn’t help more.

Thanks for the quick reply maybe I can find another live stream that works in your area so you could poke around more.



I'm not sure I want to fight with trying to get live streams working ... I asked another channel dev that did the work trying to get ustream working ... and he said it was quite a nightmare. RTMP is funky to deal with in the best case scenerio for a transcoder, but something about the live streams make it that much more evil :/

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.