TVHeadend - Cannot play sources

Based on the original plugin I've made some changes to get the plugin work with the new tvheadend. There were some api modifications at tvheadends site...

 

But I cannot get the PMS work to stream the TV-Channels.

After fetching all informations about the (TV) Channel I'll create the video-object:

                        mo = MediaObject(
                                parts=[PartObject(key=HTTPLiveStreamURL("%s%s" % (htsurl, id)))]
                        )
                        vco = VideoClipObject(
                                title=name,
                                thumb=icon,
                                summary=summary,
                                duration=duration,
                                key=Callback(mediaLookup, title=name, thumb=icon, id=id, rating_key=id),
                                rating_key=id
                        )
                    vco.add(mo)
                    channelList.add(vco)

I've read, that I need a callback for the key to get the metadata of the stream.

@route('/video/tvheadend/lookup')
def mediaLookup(title, thumb, id, rating_key):
        oc = ObjectContainer()
    Log("%s%s" % (htsurl, id))
    oc.add(
            VideoClipObject(
                    title = title,
                    thumb = thumb,
                    key=Callback(mediaLookup, title=title, thumb=thumb, id=id, rating_key=rating_key),
                    rating_key=id,
                    items = [
                            MediaObject(
                                    parts = [PartObject(key=HTTPLiveStreamURL("%s%s" % (htsurl, id)))],
                            )
                    ]
            )
    )
    return oc

After restarting the PMS I can access the videoclip. But starting the playback results in the following errormessage:

 

 

Error loading player:
No playable sources found

 

Any hints what could be the problem and where I could start debugging?

Greets,

Sascha

The most likely issue is that FireFox (which is what you're using according to your other post) doesn't support HLS video. Since PMS cannot transcode live streams, you get an error message. As per my message in your other thread, try testing with a different client or if your Mac OSX, then switch to Safari for testing since it is the only browser that supports HLS natively.

I enabled the transcoding ability within the TV-Headend server. So the server will deliver:

- Container: MP4

- VCodec: H264

- ACodec: AAC

I've changed the code to create the video/media objects the following way:

                        vurl = "%s%s%s" % (htsurl, id, transcode)
                        vco = VideoClipObject(
                                key = Callback(lookupVideo, video_url = vurl, title = name, thumb = icon),
                                rating_key = vurl,
                                title = name,
                                thumb = icon,
                                items = [
                                        MediaObject(
                                                container = Container.MP4,
                                                video_codec = VideoCodec.H264,
                                                audio_codec = AudioCodec.AAC,
                                                audio_channels = 2,
                                                parts = [PartObject(key = vurl)]
                                        )
                                        ]
                                )
                        channelList.add(vco)
        return channelList

def lookupVideo(video_url, title, thumb):
oc = ObjectContainer()

    oc.add(VideoClipObject(
            key = Callback(lookupVideo, video_url = video_url, title = title, thumb = thumb),
            rating_key = video_url,
            title = title,
            thumb = thumb,
            items = [
                    MediaObject(
                            container = Container.MP4,
                            video_codec = VideoCodec.H264,
                            audio_codec = AudioCodec.AAC,
                            audio_channels = 2,
                            parts = [PartObject(key = video_url)]
                    )
            ]
    ))
    return oc

PMS changed the way it wants to deliver the video to me. Now it seems that a html5-video player will fetch the source (before it was the jwplayer).

It doesn't work either. But this time it seems that this is a delivery problem. Looking at the html source code I found the DIRECT streaming url (192.168...). But this cannot work because it's a private ip :-) Is there something to configure/remember that the PMS-Server will deliver this stream?

Greets

Sascha

Seems I had a configuration error. Had enabled direct play/stream within the configuration. Disabling this options ends in a jwplayer just showing the "loading" ball... No stream started yet.

Is there any chance to see what PMS does? Looking at nearly all logfiles didn't give me a hint whats going wrong.

After reading and trying other streaming modules I can see, that the browser ALWAYS goes in direct contact with the streaming source not the PMS itself. Am I right when I say that the PMS is just a display framework in that case and cannot deliver these streams by itself?

Are the videos you are testing with live or recorded? In general, if a client (such as Plex/Web) is capable of direct playing a stream it will and in that case PMS (Plex Media Server) just hands off the URL of the source stream to the client. If the client is not able to direct-play the stream (due to incompatible container or codecs) then PMS will transcode the video. That is assuming that the video is in a format that PMS can transcode. At present, PMS will not transcode HTTP Live Streams (HLS) or any Live video. If the Web client is attempting to use the flash-player rather than the HTML5 player, that means that it is requesting a transcode of the source video from PMS. If it’s failing to play, then that means that either (a.) there’s an error in the playback request in the channel/service code, or (b.) the stream is failing to transcode for some reason. In the case of (a.) check the plugin and system logs for errors. In the case of (b.) check the Plex Media Server log for errors.

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