KartinaTV plugin

Hi all.

I began to rewrite the plugin Kartinatv which stopped supporting Alex Titoff.

 

 made ​​sure that the output channel list, library, video library list. But there is a problem with playing a direct stream that quietly played VLC player.

When I insert a link in VLC, the player play a channel with no problems. When playing the stream  on ATV3, in the PlexConnect-in logs i see:

 

07:51:55 ATVLogger: Player state: Loading at this time: 0
07:51:56 ATVLogger: Player state: Stopped at this time: 0

function that returns the video to the container returns it as:

 

Redirect(VideoItem(url, 'Title'))
 

Tell me please, what am I doing wrong? How do I play VLC stream?

Hi all.

I need help for channel plugin.

I try to play stream in Plex/web 2 different types of links

Plugin:

url_vlc_1 = 'http://50.7.240.106/rtr-planeta_800_00/rtr-planeta_800_00.m3u8?user=zixi_06_1372420_378d003cd717358ea94d5cf074d91598&session=null&hlsid=HLS_14432178'
url_vlc_2 = 'http://91.224.187.151/001/1376691219?ticket=CiHJYkjtyeEGyUtOrIISfgO1nn6KeqoAHHr%2FO9svZV%2FteoaMeIvxn%2Fw8Q1v0CiBs2oZC0SMBUwD3jbVMuPTs8WLaivjUpKrmsnfss6XInqBb4yCk1UJskKFkY%2Fvum1JVIyk4fPXDFNdghIgaBBeCb1dbQ6D8cVKWUjp5lGDWvTs%3D'

@handler(’/video/vlc’, TEXT_TITLE, thumb=ICON, art=ART)
def MainMenu():
dir = ObjectContainer()
dir.add(LiveStream(url=url_vlc))
return dir

####################################################################################################
def LiveStream(url):

vco = VideoClipObject(
	key = Callback(LiveStream, url=url),
	rating_key = 'Justin',
	title = 'Watch VLC Live',
	thumb = R(ICON),
	items = [
		MediaObject(
			parts = [
				PartObject(key=HTTPLiveStreamURL(url))
			],
			container = Container.MP4,
			video_codec = VideoCodec.H264,
			audio_codec = AudioCodec.AAC,
			audio_channels = 2,
			optimized_for_streaming = True
		)
	]
)

return vco

url_vlc_1 plays without problems.

url_vlc_2 - Plex/Web write Error loading player: No playable sources found

VLC player plays both links are equally.

Both streams are video codec (from VLC media info) H264 - MPEG4 - AVC (part 10) (h264), and audio codec MPEG AAC Audio (mp4a)

What am I doing wrong?

Hi!

I tried both of those URLs in VLC and only the first one plays?

Besides that I think another problem is the declaration of 

container = Container.MP4

for a HTTP Live Stream(HLS). That should be:

container = 'mpegts'

If the second URL points to a MP4 file(instead of a HLS m3u8 list in the first one), you need to return different VideoClipObjects depending on type, i.e. different MediaObjects

Hi, meo!

Thank you for help.

Second link not openopen because the service require login/password, and generate every time a new link.

I changed container to 'mpegts', error changed to "Error loading skin: Skin formatting error"

I understand that the error is related to jwplayer?

Oh, I didn't see it first, the VideoClipObject must be added to an ObjectContainer to start with. I'm not very familiar with plugins that returns video objects in __init__.py(basically I've forgotten, I only use URL services).

Maybe this example can help you:

https://github.com/plexinc-plugins/JerrySeinfeld.bundle/blob/master/Contents/Code/__init__.py

Okay, I'll look into the plugin. Thank you.


Tell me please, how to specify the object VideoItem, he has to play MPEG4 format (similar to container = 'mpegts', in MediaObject)

Hi. I looked JerrySeinfeld plugin and changed my code.

url_vlc_1 = 'http://91.224.187.86:8000/11069_normal_st_s2e41.m4v?ticket=fNiKGX65TMGsgEf2GjSm5uhILwvr%2BhZU3jtARoDVhpsLTbfGZiq3zJTOPjd90Odvqpq5y316dxMmlgMFFi%2F%2FxigMiPED49RSr7JExWUk4255nTms0N1hc07cVYrKYGZsj%2BDDmeIvj2ylrRiDx789UzOEWPZMgHYT%2Ffso2pdpqLE%3D'
url_vlc_2 = 'http://91.224.187.41/001/1376789237?ticket=bni7a2PXWRSuN7A9YOHQ0yj4xx9BRdWpMJqblK5JZRDl4JgyVc3wy%2F38nQz%2Fe%2FC3IFKtSvDvT4Av3SHq3v4EpX3FJ%2BgTd9rGH7OVGgo0dDDIwEnpPAGkCSjVgvfUrKhKbDAXmpBvJ6UbJVt1fqBuIYlGt4brK2OyBFafTuQzp9M%3D'

@handler(’/video/vlc’, TEXT_TITLE, thumb=ICON, art=ART)

def MainMenu():
oc = ObjectContainer()

oc.add(VideoClipObject(
	key = Callback(Lookup, video_url = url_vlc, title = "test"),
	rating_key = "Justin",
	title = "test",
	items = [
	MediaObject(
	  container = Container.AVI,
	  video_codec = VideoCodec.H264,
	  audio_codec = AudioCodec.AAC,
	  audio_channels = 2,
	  parts = [PartObject(key = url_vlc)]
	)
	]
))

return oc

###################################################################################################
@route(’/video/vlc/livestream’)
def Lookup(video_url, title):
oc = ObjectContainer()
oc.add(VideoClipObject(
key = Callback(Lookup, video_url = video_url, title = title),
rating_key = video_url,
title = title,
items = [
MediaObject(
container = Container.AVI,
video_codec = VideoCodec.H264,
audio_codec = AudioCodec.AAC,
audio_channels = 2,
parts = [PartObject(key = video_url)]
)
]
))
return oc

url_vlc_1 playing without problems in Plex/Web and in ATV3

url_vlc_2 get the error "Cannot load M3U8: 404 not found"

I think the error is due to the fact that URL is not specified file extension. Maybe it?

Hi. I looked JerrySeinfeld plugin and changed my code.

url_vlc_1 = 'http://91.224.187.86:8000/11069_normal_st_s2e41.m4v?ticket=fNiKGX65TMGsgEf2GjSm5uhILwvr%2BhZU3jtARoDVhpsLTbfGZiq3zJTOPjd90Odvqpq5y316dxMmlgMFFi%2F%2FxigMiPED49RSr7JExWUk4255nTms0N1hc07cVYrKYGZsj%2BDDmeIvj2ylrRiDx789UzOEWPZMgHYT%2Ffso2pdpqLE%3D'
url_vlc_2 = 'http://91.224.187.41/001/1376789237?ticket=bni7a2PXWRSuN7A9YOHQ0yj4xx9BRdWpMJqblK5JZRDl4JgyVc3wy%2F38nQz%2Fe%2FC3IFKtSvDvT4Av3SHq3v4EpX3FJ%2BgTd9rGH7OVGgo0dDDIwEnpPAGkCSjVgvfUrKhKbDAXmpBvJ6UbJVt1fqBuIYlGt4brK2OyBFafTuQzp9M%3D'

I think the error is due to the fact that URL is not specified file extension. Maybe it?

If you are certain that both those videos are AVI files, I suppose it should work without the extension. Clients usually perform a HEAD to get the MIME-TYPE, which would reveal that it is an AVI file, or perhaps doing a range GET to look at the first range of bytes(which also would reveal the container type).

If you are certain that both those videos are AVI files, I suppose it should work without the extension. Clients usually perform a HEAD to get the MIME-TYPE, which would reveal that it is an AVI file, or perhaps doing a range GET to look at the first range of bytes(which also would reveal the container type).

meo, I spent a lot of different experiments.
What do you think about that urls well only be played via a plugin VLC, or via VLC player. The other players
fail to play the stream.


Developers of the KartinaTV claim that the broadcast is via HTTP/TS, HTTP transport and codec H264 - MPEG-4 AVC (part 10) (h264)

I tried to play URLs through a html5 tag video, as a result, the tag "does not play an unknown MIME TYPE"

What are your thoughts?

meo, I spent a lot of different experiments.
What do you think about that urls well only be played via a plugin VLC, or via VLC player. The other players fail to play the stream.


Developers of the KartinaTV claim that the broadcast is via HTTP/TS, HTTP transport and codec H264 - MPEG-4 AVC (part 10) (h264)

I tried to play URLs through a html5 tag video, as a result, the tag "does not play an unknown MIME TYPE"

What are your thoughts?

That sounds like HLS(HTTP Live Streaming). Which clients have you been trying this on? I'd say stick to PMC first(since it will play almost all formats) and try removing some details:

@handler('/video/vlc', TEXT_TITLE, thumb=ICON, art=ART)

def MainMenu():
	oc = ObjectContainer()

	oc.add(VideoClipObject(
		key = Callback(Lookup, video_url = url_vlc, title = "test"),
		rating_key = "Justin",
		title = "test",
		items = [
		MediaObject(
		  audio_channels = 2,
		  parts = [PartObject(key = HTTPLiveStreamURL(url = url_vlc))]
		)
		]
	))

	return oc

###################################################################################################
@route('/video/vlc/livestream')
def Lookup(video_url, title):
  oc = ObjectContainer()
  oc.add(VideoClipObject(
    key = Callback(Lookup, video_url = video_url, title = title),
    rating_key = video_url,
    title = title,
    items = [
      MediaObject(
        audio_channels = 2,
        parts = [PartObject(key = HTTPLiveStreamURL(url = video_url))]
      )
    ]
  ))
  return oc

Hi, meo.

I tried the code.

Player say

Error loading player:
No playable sources found

Log of the plugin:

2013-08-29 07:22:31,299 (2a8) :  DEBUG (runtime:714) - Handling request GET /video/vlc/livestream?video_url=http%3A%2F%2Fapi.rodina.tv%2Flist%2Fm3u%2F9%2FSEwc0EvRbWCrS6eXWv&title=test
2013-08-29 07:22:31,302 (2a8) :  DEBUG (runtime:811) - Found route matching /video/vlc/livestream
2013-08-29 07:22:31,306 (2a8) :  WARNING (objectkit:199) - Media part has no streams - attempting to synthesize
2013-08-29 07:22:31,309 (1a7c) :  DEBUG (runtime:714) - Handling request GET /video/vlc
2013-08-29 07:22:31,313 (1a7c) :  DEBUG (runtime:811) - Found route matching /video/vlc
2013-08-29 07:22:31,318 (2a8) :  DEBUG (runtime:911) - Response: [200] MediaContainer, 954 bytes
2013-08-29 07:22:31,319 (1a7c) :  DEBUG (base:123) - Checking if com.plexapp.plugins.vlc is broken
2013-08-29 07:22:31,323 (1a7c) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMjMKY29tLnBsZXhhcHAucGx1Z2lucy52bGNzMTAKaWRlbnRpZmllcnIwCg__'
2013-08-29 07:22:31,342 (1a7c) :  DEBUG (runtime:911) - Response: [200] MediaContainer, 910 bytes
2013-08-29 07:22:35,262 (10bc) :  DEBUG (runtime:714) - Handling request GET /video/vlc
2013-08-29 07:22:35,263 (10bc) :  DEBUG (runtime:811) - Found route matching /video/vlc
2013-08-29 07:22:35,266 (10d8) :  DEBUG (runtime:714) - Handling request GET /video/vlc/livestream?video_url=http%3A%2F%2Fapi.rodina.tv%2Flist%2Fm3u%2F9%2FSEwc0EvRbWCrS6eXWv&title=test
2013-08-29 07:22:35,267 (10bc) :  DEBUG (base:123) - Checking if com.plexapp.plugins.vlc is broken
2013-08-29 07:22:35,273 (10d8) :  DEBUG (runtime:811) - Found route matching /video/vlc/livestream
2013-08-29 07:22:35,273 (10bc) :  DEBUG (networking:172) - Requesting 'http://127.0.0.1:32400/:/plugins/com.plexapp.system/messaging/function/X1N0b3JlU2VydmljZTpJc0NoYW5uZWxCcm9rZW4_/Y2VyZWFsMQoxCmxpc3QKMApyMAo_/Y2VyZWFsMQoxCmRpY3QKMQpzMjMKY29tLnBsZXhhcHAucGx1Z2lucy52bGNzMTAKaWRlbnRpZmllcnIwCg__'
2013-08-29 07:22:35,280 (10d8) :  DEBUG (runtime:911) - Response: [200] MediaContainer, 954 bytes
2013-08-29 07:22:35,302 (10bc) :  DEBUG (runtime:911) - Response: [200] MediaContainer, 910 bytes

Hi, Evgheny!

You are doing a great job! I was going to ask you to do this plugin early, cuz you are the guy who made it for xbmc! Right?

But you started this yourself.

Но у меня есть подозрения, что ты делаешь это для РодинаТВ! Он будет работать для КартиныТВ?

Evgheny,

Can you please give a couple of sample URL:s, then I can try to see if all those uses the same streaming method/codec etc. If they are not, we have to preload a couple of bytes in the plugin for probing purposes before we can return a VideoClipObject.

Serge.Stre,

Нет, я не тот парень :) Ты меня перепутал с кем то. :)

По поводу подозрений - Это был плагин именно для КартиныТВ. Начатый Alex Titoff, который я хотел восстановить.

Очень долго возился. Пробовал и так и сяк. На контакт они идут неохотно, у них действительно потом плексом не хочет определяться.

Поэтому я прекратил доработку этого плагина, и сел писать плагин именно для РодиныТВ.

meo,

Thank you very much for your participation. But I, unfortunately, I stop working on this plugin since moved on to another operator.
I can go for help if we need it?

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