# Help playing a TvEpisode

**URL:** <https://forums.plex.tv/t/help-playing-a-tvepisode/23848>\
**Category:** Dev/API Corner\
**Tags:** plugin-dev\
**Created:** [November 25, 2012, 5:54pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848 "2012-11-25T17:54:36Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [November 25, 2012, 5:54pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/1 "2012-11-25T17:54:36Z")

</div>

Hi,  
  
  
  
I am new to this with Plugin Development for Plex.  
  
I have been trying to fix a couple of broken plugins for swedish tv channels.  
  
I have gotten one of them to work, but not the other (TV4).  
  
  
  
Now I have managed to list all the shows etc, but I can’t make the episode play.  
  
There seems to be two possible ways of playing the video.  
  
Either I end up with an url like this:  
  
[http://embed.tv4play.se/tv4play/v0/tv4video.swf?vid=743749](http://embed.tv4play.se/tv4play/v0/tv4video.swf?vid=743749)  
  
or   
  
rtmpe://cp70051.edgefcs.net/tv4ondemandmp4:/mp4root/2012-11-09/20121109T193935\_SundhageBralottningvadvinmter\_2238881\_T6MP48\_.mp4?token=c3RhcnRfdGltZT0yMDEyMTExNzE4MzkzMCZlbmRfdGltZT0yMDEyMTExNzE4NDEzMCZkaWdlc3Q9OGMzZjM3MTZhZWQ2YzQxNjMyNWYzMDA4NDRjOGQyMzM=  
  
  
  
I have been trying various ways of displaying both of them.  
  
I am guessing the second url should be played with RTMPVideoURL, but I can’t get that to work.  
  
I have tried playing the first one using WebVideoURL, VideoClipObject etc, but I am probably doing something awfully wrong.  
  
  
  
I am attaching my code, and hoping someone will have a look at it and point me in the right direction…  
  
The Info.plist file is stolen from the old malfunctioning plugin, I might have deleted or edited something in my search for a solution, though …  
  
  
  
Please help me :’(  
  
  
  
Maeckie

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [November 26, 2012, 6:16pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/2 "2012-11-26T18:16:01Z")

</div>

I realised I did something wrong with the RTMPE url.  
  
I guess you are supposed to use it like this:  
  
return MediaObject(  
  
video\_resolution = “1280”,  
  
audio\_channels = 2,  
  
bitrate = 2400,  
  
parts = [PartObject(key=RTMPVideoURL(url=“rtmpe://cp70051.edgefcs.net/tv4ondemand”,   
  
clip=“mp4:/mp4root/2012-11-21/pid3923685(2242502\_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg=”))]  
  
)  
  
  
  
I am able to download the file using rtmpdump, but it’s not playing in Plex.  
  
The log doesn’t say much either. Can someone please shed some light on this 😕

```auto

<br />
2012-11-26 19:14:07,002 (7f76477fe700) : DEBUG (runtime:143) - Calling function 'TV4Play'<br />
2012-11-26 19:14:07,003 (7f76477fe700) : DEBUG (networking:166) - Requesting 'http://anytime.tv4.se/webtv/metafileFlash.smil?p=2242804&bw=300000&emulate=true&sl=true'<br />
2012-11-26 19:14:07,441 (7f76477fe700) : DEBUG (objectkit:673) - Checking for Real RTMP support... Enabled:False Platform:Windows Product:None Client:0.9.5.4 Server:0.9.6.9.241-da3068c<br />
2012-11-26 19:14:07,443 (7f76477fe700) : DEBUG (objectkit:750) - Using WebKit RTMP (True, False, True)<br />
2012-11-26 19:14:07,444 (7f76477fe700) : WARNING (objectkit:187) - The 'platforms' attribute is deprecated and should not be assigned.<br />
2012-11-26 19:14:07,445 (7f76477fe700) : WARNING (objectkit:187) - The 'protocols' attribute is deprecated and should not be assigned.<br />
2012-11-26 19:14:07,446 (7f76477fe700) : WARNING (objectkit:187) - Media part has no streams - attempting to synthesize<br />
2012-11-26 19:14:07,450 (7f76477fe700) : DEBUG (runtime:851) - Response: [200] MediaObject, 731 bytes<br />
<br />

```

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 27, 2012, 9:15pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/3 "2012-11-27T21:15:01Z")

</div>

> [@](#):
>
> I realised I did something wrong with the RTMPE url.  
> I guess you are supposed to use it like this:  
> return MediaObject(  
> video\_resolution = "1280",  
> audio\_channels = 2,  
> bitrate = 2400,  
> parts = [PartObject(key=RTMPVideoURL(url="rtmpe://cp70051.edgefcs.net/tv4ondemand",   
> clip="mp4:/mp4root/2012-11-21/pid3923685(2242502\_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg="))]  
> )  
>   
> I am able to download the file using rtmpdump, but it's not playing in Plex.  
> The log doesn't say much either. Can someone please shed some light on this :/  
>   
> 
> ```auto
> 
> <br />
> 2012-11-26 19:14:07,002 (7f76477fe700) : DEBUG (runtime:143) - Calling function 'TV4Play'<br />
> 2012-11-26 19:14:07,003 (7f76477fe700) : DEBUG (networking:166) - Requesting 'http://anytime.tv4.se/webtv/metafileFlash.smil?p=2242804&bw=300000&emulate=true&sl=true'<br />
> 2012-11-26 19:14:07,441 (7f76477fe700) : DEBUG (objectkit:673) - Checking for Real RTMP support... Enabled:False Platform:Windows Product:None Client:0.9.5.4 Server:0.9.6.9.241-da3068c<br />
> 2012-11-26 19:14:07,443 (7f76477fe700) : DEBUG (objectkit:750) - Using WebKit RTMP (True, False, True)<br />
> 2012-11-26 19:14:07,444 (7f76477fe700) : WARNING (objectkit:187) - The 'platforms' attribute is deprecated and should not be assigned.<br />
> 2012-11-26 19:14:07,445 (7f76477fe700) : WARNING (objectkit:187) - The 'protocols' attribute is deprecated and should not be assigned.<br />
> 2012-11-26 19:14:07,446 (7f76477fe700) : WARNING (objectkit:187) - Media part has no streams - attempting to synthesize<br />
> 2012-11-26 19:14:07,450 (7f76477fe700) : DEBUG (runtime:851) - Response: [200] MediaObject, 731 bytes<br />
> <br />
> 
> ```

  
  
Looks like you're almost there. You need to set the RealRTMP flag in the plugin's Info.plist file and the URL Service's ServiceInfo.plist if you're using a URL Service.  
  

```auto

<br />
<key>PlexFrameworkFlags</key><br />
<array><br />
<string>UseRealRTMP</string><br />
</array><br />

```

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [November 27, 2012, 9:32pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/4 "2012-11-27T21:32:50Z")

</div>

hi,  
  
  
  
Thank you very much for the reply.  
  
I have made some changes, I added what you suggested to the Info.plist file, and changed what is returned from TV4Play so it is now returns

```auto

return RTMPVideoURL(url="rtmpe://cp70051.edgefcs.net/tv4ondemand",<br />
                        clip="mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg=")<br />

```

  
  
I also tried to launch it from a MediaObjec with just a "parts" part. The behavior in the PMC is a bit different but in either case the movie is not playing.  
The log looks a bit different now:  

```auto

2012-11-27 22:28:30,621 (7f0a8bfff700) : DEBUG (runtime:143) - Calling function 'TV4Play'<br />
2012-11-27 22:28:30,623 (7f0a8bfff700) : DEBUG (networking:166) - Requesting 'http://anytime.tv4.se/webtv/metafileFlash.smil?p=2242804&bw=300000&emulate=true&sl=true'<br />
2012-11-27 22:28:30,780 (7f0a8bfff700) : DEBUG (objectkit:673) - Checking for Real RTMP support... Enabled:True Platform:Windows Product:None Client:0.9.5.4 Server:0.9.6.9.241-da3068c<br />
2012-11-27 22:28:30,781 (7f0a8bfff700) : DEBUG (objectkit:692) - Using Real RTMP<br />
2012-11-27 22:28:30,784 (7f0a8bfff700) : DEBUG (runtime:851) - Response: [200] RTMPURL, 232 bytes<br />

```

  
  
Any suggestions? :/

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 27, 2012, 10:17pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/5 "2012-11-27T22:17:28Z")

</div>

> [@](#):
>
> hi,  
>   
> Thank you very much for the reply.  
> I have made some changes, I added what you suggested to the Info.plist file, and changed what is returned from TV4Play so it is now returns  
> 
> ```auto
> 
> return RTMPVideoURL(url="rtmpe://cp70051.edgefcs.net/tv4ondemand",<br />
> clip="mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg=")<br />
> 
> ```
> 
>   
>   
> I also tried to launch it from a MediaObjec with just a "parts" part. The behavior in the PMC is a bit different but in either case the movie is not playing.  
> The log looks a bit different now:  
> 
> ```auto
> 
> 2012-11-27 22:28:30,621 (7f0a8bfff700) : DEBUG (runtime:143) - Calling function 'TV4Play'<br />
> 2012-11-27 22:28:30,623 (7f0a8bfff700) : DEBUG (networking:166) - Requesting 'http://anytime.tv4.se/webtv/metafileFlash.smil?p=2242804&bw=300000&emulate=true&sl=true'<br />
> 2012-11-27 22:28:30,780 (7f0a8bfff700) : DEBUG (objectkit:673) - Checking for Real RTMP support... Enabled:True Platform:Windows Product:None Client:0.9.5.4 Server:0.9.6.9.241-da3068c<br />
> 2012-11-27 22:28:30,781 (7f0a8bfff700) : DEBUG (objectkit:692) - Using Real RTMP<br />
> 2012-11-27 22:28:30,784 (7f0a8bfff700) : DEBUG (runtime:851) - Response: [200] RTMPURL, 232 bytes<br />
> 
> ```
> 
>   
>   
> Any suggestions? :/

  
  
  
Off the top of my head, I can think of two possibilities:  
1. You need to pass the "token=..." as a separate command to libRTMP.   
and/or  
2. You need to specify a swf url for swf verification.  
  
If you're able to grab the stream using rtmpdump without specifying 'swfVfy' then, we can probably ignore #2 for now. I would try:  

```auto

return RTMPVideoURL(url="rtmpe://cp70051.edgefcs.net/tv4ondemand",<br />
                        clip="mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130)",<br />
			args=[False, "mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg="])<br />

```

  
  
You can also check the Plex.log for errors when attempting playback. Your last PMS log snippet shows that the RTMP arguments are being successfully passed to the client so, any further errors will show up in the client log.

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [November 29, 2012, 8:26am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/6 "2012-11-29T08:26:21Z")

</div>

Hi again,  
  
  
  
I tried the approach with the token as an arg, but it looks the same in the PMC log (once I found it :))  
  
  
  
It says:

```auto

09:24:00 T:13972 M:33% NOTICE: PlexDirectory::GetDirectory(http://10.0.0.2:32400/video/tv4play)<br />
09:24:01 T:10920 M:33% NOTICE: PlexDirectory::GetDirectory(http://10.0.0.2:32400/video/tv4play/:/function/TV4Shows?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NQpOw7ZqZXMxMgpjYXRlZ29yeU5hbWVyMAo_)<br />
09:24:01 T:12812 M:33% NOTICE: PlexDirectory::GetDirectory(http://10.0.0.2:32400/video/tv4play/:/function/TV4Episodes?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1MTUKQmVyZyBmbHl0dGFyIGluczgKc2hvd05hbWVyMAo_)<br />
09:24:03 T:10920 M:33% NOTICE: PlexDirectory::GetDirectory(http://10.0.0.2:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ0Njk0czYKdm1hbmlkcjAK)<br />
09:24:03 T:10920 M:33% ERROR: CPlexDirectory::ReallyGetDirectory - Unable to parse XML<br />
                                            rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130) conn=B:0 conn=S:mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg=<br />
09:24:03 T:13972 M:33% ERROR: XFILE::CDirectory::GetDirectory - Error getting http://10.0.0.2:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ0Njk0czYKdm1hbmlkcjAK<br />
09:24:03 T:13972 M:33% ERROR: CGUIMediaWindow::GetDirectory(http://10.0.0.2:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ0Njk0czYKdm1hbmlkcjAK) failed<br />
09:24:04 T:14660 M:33% NOTICE: PlexDirectory::GetDirectory(http://127.0.0.1:32400)<br />
09:24:09 T:14852 M:33% WARNING: XFILE::CFileCurl::CReadState::FillBuffer: curl failed with code 28<br />
09:24:09 T:14852 M:33% ERROR: CFileCurl::CReadState::Open, didn't get any data from stream.

```

  
  
Can I get it to print the XML it is trying to parse?

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [November 29, 2012, 1:24pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/7 "2012-11-29T13:24:47Z")

</div>

> [@](#):
>
> Can I get it to print the XML it is trying to parse?

  
  
Yes. From your log snippet, you can grab the URL that the player requests to see what is returned.  

```auto

http://10.0.0.2:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ0Njk0czYKdm1hbmlkcjAK

```

  
Hopefully, it's valid XML. You may need to enclose the MediaObject in an ObjectContainer for it to work properly.

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [November 30, 2012, 7:41am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/8 "2012-11-30T07:41:10Z")

</div>

I appears that XML is not being returned at all…  
  
This is what is being returned:

```auto

rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130) conn=B:0 conn=S:mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg=

```

  
  
I really don't get this ..  
Now I am just doing a return of RTMPVideoURL() to the key in an ObjectContainer using callback. Is that the problem?

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [December 1, 2012, 4:17pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/9 "2012-12-01T16:17:28Z")

</div>

I’m sorry, I hadn’t downloaded and reviewed your code up 'til now. Just going from what you were posting in-line. At least part of the problem is that you are trying to get a DirectoryObject to play media:

```auto

oc.add(DirectoryObject(key=Callback(TV4Play, whatever=vmanid), title=name, thumb=thumb, summary=summary))

```

  
Whereas, to play media you need to use a Media Object of some kind. Based on the context of the code, I would suggest either an EpisodeObject or a VideoClipObject.  

```auto

oc.add(VideoClipObject(key=Callback(TV4Play, whatever=vmanid), title=name, thumb=thumb, summary=summary))

```

  
  
If I were you, I would probably try to use a URL Service to handle the video separately from the navigation structure but let's see if we can get it working using your chosen path first. When using a VideoObject, you need to provide either a "url" parameter which will be used to call the appropriate URL Service, or you need to provide both the "key" and "rating\_key" parameters. The "rating\_key" needs to be a unique string. Usually it automatically gets assigned the value of the "url" so, in your case you could use:  

```auto

rating_key = SWF_PLAYER_URL % vmanid

```

  
The key parameter needs to point to a callback which handles the video return. You're partway there with what you have already. Here's a link to the [relevant section of code](https://github.com/plexinc-plugins/AmazonInstantVideo.bundle/blob/master/Contents/Code/\_\_init\_\_.py#L165) for the AmazonInstantVideo plugin. Notice how the EpisodeObject includes a "key" which points to the PlayVideo Callback, as well as a "rating\_key" which is just the url, and an "items" parameter which (via a callback in this case) includes a MediaObject which also points to the PlayVideo function. I know that likely seems a little convoluted and IMO it is. When using a URL Service, most of that convoluted stuff is taken care of behind the scenes. When doing it "manually" we need to handle it up front. The other thing to note is that the PlayVideo function uses the @indirect decorator which tells the client to expect an object container back from the PlayVideo function rather than a direct link to a video file. Using that, your TV4Play functino could look something like this:  

```auto

<br />
@indirect<br />
def TV4play(vmanid):<br />
	# get the rtmp params<br />
     """ here's where you would include code to take the vmanid to determine the appropriate rtmp_url and playpath parameters """<br />
	<br />
	# return the rtmp params inside the necessary containers<br />
	return IndirectResponse(VideoClipObject, key=RTMPVideoURL(url=rtmp_url, clip=playpath))<br />

```

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [December 8, 2012, 9:41am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/10 "2012-12-08T09:41:46Z")

</div>

Hi again,  
  
  
  
I haven’t been able to look at this for a week or so, but now I have finally tried out your pointers above Mike and things looks much better.  
  
Like I am almost there now.  
  
Now the fricking things just won’t play …  
  
  
  
I’ve added a swfUrl argument to the RTMPVideoURL call now, but it won’t play. The error message is “Could not determine input format”  
  
The client side log says:

```auto

<br />
10:38:29 T:8636 M:35% NOTICE: DVDPlayer: Opening: http://10.0.0.4:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ3Mjg3czYKdm1hbmlkcjAK&indirect=1<br />
10:38:29 T:8636 M:35% WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED<br />
10:38:29 T:4776 M:35% NOTICE: Creating InputStream<br />
10:38:29 T:4776 M:35% NOTICE: Creating Demuxer<br />
10:38:29 T:4776 M:35% ERROR: CDVDDemuxFFmpeg::Open - error probing input format, http://10.0.0.4:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ3Mjg3czYKdm1hbmlkcjAK&indirect=1<br />
10:38:29 T:4776 M:35% ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer<br />

```

  
  
  
The XML returned from the address above is  

```auto

<br />
<MediaContainer title1="TV4 Play" art="/:/plugins/com.plexapp.plugins.tv4play/resources/art-default.jpg?t=1352088774" size="1" identifier="com.plexapp.plugins.tv4play" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1347358810"><br />
<embed type="{0C55C096-0F1D-4F28-AAA2-85EF591126E7}" cotype="cs" id="cosymantecbfw" style="width: 0px; height: 0px; display: block;"/><br />
<Video key="rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg= swfUrl=http://wwwb.tv4play.se/polopoly_fs/1.939636.1281635185!approot/tv4video.swf?swfvfy=true swfVfy=1" type="clip"><br />
<Media protocol="rtmp"><br />
<Part key="rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg= swfUrl=http://wwwb.tv4play.se/polopoly_fs/1.939636.1281635185!approot/tv4video.swf?swfvfy=true swfVfy=1" file=""><br />
<Stream index="0" streamType="1" id="1"/><br />
<Stream index="1" streamType="2" id="2"/><br />
</Part><br />
</Media><br />
</Video><br />
</MediaContainer> <br />

```

  
  
  
Either I have just missed something somewhere, or I have approached the whole thing the wrong way from start ...  
Do you see anything obvious?  
  
Marcus

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [December 9, 2012, 6:49am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/11 "2012-12-09T06:49:12Z")

</div>

> [@](#):
>
> Hi again,  
>   
> I haven't been able to look at this for a week or so, but now I have finally tried out your pointers above Mike and things looks much better.  
> Like I am almost there now.  
> Now the fricking things just won't play ...  
>   
> I've added a swfUrl argument to the RTMPVideoURL call now, but it won't play. The error message is "Could not determine input format"  
> The client side log says:  
> 
> ```auto
> 
> <br />
> 10:38:29 T:8636 M:35% NOTICE: DVDPlayer: Opening: http://10.0.0.4:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ3Mjg3czYKdm1hbmlkcjAK&indirect=1<br />
> 10:38:29 T:8636 M:35% WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED<br />
> 10:38:29 T:4776 M:35% NOTICE: Creating InputStream<br />
> 10:38:29 T:4776 M:35% NOTICE: Creating Demuxer<br />
> 10:38:29 T:4776 M:35% ERROR: CDVDDemuxFFmpeg::Open - error probing input format, http://10.0.0.4:32400/video/tv4play/:/function/TV4Play?function_args=Y2VyZWFsMQoxCmRpY3QKMQp1NwoyMjQ3Mjg3czYKdm1hbmlkcjAK&indirect=1<br />
> 10:38:29 T:4776 M:35% ERROR: CDVDPlayer::OpenDemuxStream - Error creating demuxer<br />
> 
> ```
> 
>   
>   
>   
> The XML returned from the address above is  
> 
> ```auto
> 
> <br />
> <MediaContainer title1="TV4 Play" art="/:/plugins/com.plexapp.plugins.tv4play/resources/art-default.jpg?t=1352088774" size="1" identifier="com.plexapp.plugins.tv4play" mediaTagPrefix="/system/bundle/media/flags/" mediaTagVersion="1347358810"><br />
> <embed type="{0C55C096-0F1D-4F28-AAA2-85EF591126E7}" cotype="cs" id="cosymantecbfw" style="width: 0px; height: 0px; display: block;"/><br />
> <Video key="rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg= swfUrl=http://wwwb.tv4play.se/polopoly_fs/1.939636.1281635185!approot/tv4video.swf?swfvfy=true swfVfy=1" type="clip"><br />
> <Media protocol="rtmp"><br />
> <Part key="rtmpe://cp70051.edgefcs.net/tv4ondemand playpath=mp4:/mp4root/2012-11-21/pid3923685(2242502_T3MP4130).mp4?token=c3RhcnRfdGltZT0yMDEyMTEyNjE4NTAyNiZlbmRfdGltZT0yMDEyMTEyNjE4NTIyNiZkaWdlc3Q9ZWJiM2Q0YTQxNDc0ZmYwMTcyMmZkNDc0NmZmZDhhODg= swfUrl=http://wwwb.tv4play.se/polopoly_fs/1.939636.1281635185!approot/tv4video.swf?swfvfy=true swfVfy=1" file=""><br />
> <Stream index="0" streamType="1" id="1"/><br />
> <Stream index="1" streamType="2" id="2"/><br />
> </Part><br />
> </Media><br />
> </Video><br />
> </MediaContainer> <br />
> 
> ```
> 
>   
>   
>   
> Either I have just missed something somewhere, or I have approached the whole thing the wrong way from start ...  
> Do you see anything obvious?  
>   
> Marcus

  
  
Is that error from attempting to play on the desktop Plex client or the web client (or something else)? Apparently an error with RTMP handling snuck in to the framework and affects iOS (and possibly Roku?) clients. It should be fixed soon though. I don't think the web client is currently able to handle RTMP streams although that may have changed or soon might. The desktop client (version 0.9.5.4) should definitely be able to handle the playback if you've got it set up right. The "embed type" tag in the XML looks odd to me. ie. I don't recall having seen that in Plex channel XML before but things change pretty quick these days and I've been out of town.

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [December 9, 2012, 7:38am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/12 "2012-12-09T07:38:30Z")

</div>

The error above is from trying to play it on my PC Desktop Client (windows 7).  
  
  
  
I found another (old) post which is discussing the same thing.  
  
They solved by adding an “ext=‘mp4’” to the VideoObject (see line 56 here [https://github.com/jonnywray/IMDb-Trailers.bundle/blob/master/Contents/Code/](https://github.com/jonnywray/IMDb-Trailers.bundle/blob/master/Contents/Code/) **init**.py#L56).  
  
  
  
Now when I try to do the same I get an error in the server log:

```auto

FrameworkException: The 'ext' attribute is inaccessible from model interfaces.

```

  
Does that mean I need to be using an URL service in order to set that?

---

<div class="post-metadata">

**Author:** ![mikedm139](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/mikedm139/32/96909_2.png) [@mikedm139](https://forums.plex.tv/u/mikedm139)\
**Post date:** [December 9, 2012, 8:02am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/13 "2012-12-09T08:02:37Z")

</div>

> [@](#):
>
> The error above is from trying to play it on my PC Desktop Client (windows 7).  
>   
> I found another (old) post which is discussing the same thing.  
> They solved by adding an "ext='mp4'" to the VideoObject (see line 56 here [https://github.com/j...\_\_init\_\_.py#L56](https://github.com/jonnywray/IMDb-Trailers.bundle/blob/master/Contents/Code/\_\_init\_\_.py#L56)).  
>   
> Now when I try to do the same I get an error in the server log:  
> 
> ```auto
> 
> FrameworkException: The 'ext' attribute is inaccessible from model interfaces.
> 
> ```
> 
>   
> Does that mean I need to be using an URL service in order to set that?

  
  
An URL Service is the most common (and IMO better) but not only way to achieve what you're attempting. The discussion and code you're referencing are too old to be relevant here. Do you have the latest version of your code on github (or anywhere)?

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [December 9, 2012, 10:14am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/14 "2012-12-09T10:14:32Z")

</div>

I’ve only got the code locally.  
  
Attaching it here  
  
  
  
Added a Git repo as well now …   
  
[GitHub](https://github.com/maeckie/Tv4Play)

---

<div class="post-metadata">

**Author:** ![Maeckie](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@Maeckie](https://forums.plex.tv/u/Maeckie)\
**Post date:** [December 10, 2012, 10:10am UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/15 "2012-12-10T10:10:12Z")

</div>

So I was reading through the dev documentation (again) and came across this

> [@](#):
>
> When you should NOT create a Site Config  
> If you have access to the video stream directly, then you should not use a site configuration file.  
>   
> You will have to do some sleuthing to see if you can get access to the .flv, .mp4 or RTMP streams directly. You can use tools like the Net inspector in Firebug or you can sometimes find the stream URL passed in as a parameter to the player if you view the HTML source.  
>   
> Some formats will just not work. RTMPE (note the E) or other formats which have DRM will have to be played with the flash/silverlight player and warrant the creation of a Site Configuration file.

  
  
Since I'm trying to use rtmpe I guess I'm screwed trying to what we tried above (?).  
  
Another question as well. Since I have acess to a swf which can be played straight of in the browser, can I play that in plex?  
Or do I need to use a player on the web site?  
I'm a bit confused how this works ..

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [December 20, 2019, 10:28pm UTC](https://forums.plex.tv/t/help-playing-a-tvepisode/23848/16 "2019-12-20T22:28:11Z")

</div>

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