Video Playlists and Format Question

MythTV Channel - development
Hi,

I have got my MythTV channel working now against my MythTV installation.

However, when Myth sets up a recording for streaming, it presents the results back in playlist files m3u

1st it returns a m3u with 2 choices on low and higher bandwidth
selecting one of the redirects in 1st

2nd returns a list of 'n' .ts urls representing the transcoded format.

I can't, however, seem to get the Plex Server to recognise the URL of either the m3u or ts formats to add as the media url for VideoClipObject.

Any suggestions pls.

Thanks

Paul


2012-06-10 00:48:32,839 (3640) :  INFO (core:337) - No user preferences file exists<br />
2012-06-10 00:48:32,852 (3640) :  DEBUG (core:337) - 2nd options line count: 113<br />
2012-06-10 00:48:32,854 (3640) :  DEBUG (core:337) - 2nd options line 0: #EXTM3U<br />
2012-06-10 00:48:32,854 (3640) :  DEBUG (core:337) - 2nd options line 1: #EXT-X-TARGETDURATION:10<br />
2012-06-10 00:48:32,855 (3640) :  DEBUG (core:337) - 2nd options line 2: #EXT-X-MEDIA-SEQUENCE:1<br />
2012-06-10 00:48:32,855 (3640) :  DEBUG (core:337) - 2nd options line 3: #EXTINF:10<br />
2012-06-10 00:48:32,857 (3640) :  DEBUG (core:337) - 2nd options line 4: /Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts<br />
2012-06-10 00:48:32,858 (3640) :  DEBUG (prefskit:390) - Reloading user prefs due to mtime change (None --> 0).<br />
2012-06-10 00:48:32,858 (3640) :  INFO (core:337) - No user preferences file exists<br />
2012-06-10 00:48:32,859 (3640) :  DEBUG (prefskit:390) - Reloading user prefs due to mtime change (None --> 0).<br />
2012-06-10 00:48:32,861 (3640) :  INFO (core:337) - No user preferences file exists<br />
2012-06-10 00:48:32,861 (3640) :  DEBUG (core:337) - Media URL is http://192.168.1.90:6544/Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts<br />
2012-06-10 00:48:32,868 (3640) :  DEBUG (core:337) - No service found for URL 'http://192.168.1.90:6544/Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts'<br />
2012-06-10 00:48:32,868 (3640) :  DEBUG (core:337) - No matching services found for 'http://192.168.1.90:6544/Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts'<br />
2012-06-10 00:48:32,871 (3640) :  DEBUG (servicekit:145) - There are 1 fallback services<br />
2012-06-10 00:48:32,872 (3640) :  DEBUG (core:337) - Loading service code for Fallback (URLServiceRecord)<br />
2012-06-10 00:48:32,992 (3640) :  DEBUG (prefskit:163) - Loading prefs for <Framework.policies.servicepolicy.ServicePolicy object at 0x05175C30><br />
2012-06-10 00:48:32,993 (3640) :  INFO (core:337) - No user preferences file exists<br />
2012-06-10 00:48:33,000 (3640) :  CRITICAL (core:337) - Function named 'NormalizeURL' couldn't be found in the current environment<br />
2012-06-10 00:48:33,002 (3640) :  WARNING (core:337) - Unable to normalize URL 'http://192.168.1.90:6544/Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts'<br />
2012-06-10 00:48:33,005 (3640) :  DEBUG (core:337) - No service found for URL 'http://192.168.1.90:6544/Content/GetFile?StorageGroup=Streaming&FileName=1002_20120504220000.mpg.640x368_800kV_64kA.av.000001.ts'<br />
2012-06-10 00:48:33,016 (3640) :  CRITICAL (core:337) - Exception when constructing response (most recent call last):<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\components\runtime.py", line 874, in construct_response<br />
    resultStr = self._core.data.xml.to_string(result._to_xml(context=context))<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\objectkit.py", line 374, in _to_xml<br />
    el = Framework.modelling.objects.ModelInterfaceObjectContainer._to_xml(self, context)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 351, in _to_xml<br />
    root = Container._to_xml(self, context)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 124, in _to_xml<br />
    self._append_children(root, self._objects, context)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\modelling\objects.py", line 130, in _append_children<br />
    el = obj._to_xml(context)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\objectkit.py", line 310, in _to_xml<br />
    if urlservice._media_objects_function_for_url_is_deferred(url):<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\servicekit.py", line 87, in _media_objects_function_for_url_is_deferred<br />
    return self._media_objects_function_for_service_is_deferred(service)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\servicekit.py", line 90, in _media_objects_function_for_service_is_deferred<br />
    return self._function_for_service_is_deferred(service, 'MediaObjectsForURL')<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\api\servicekit.py", line 93, in _function_for_service_is_deferred<br />
    ret = self._core.services._function_in_service_is_deferred(f_name, service, context=self._context)<br />
  File "C:\Users\Paul\AppData\Local\Plex Media Server\Plug-ins\Framework.bundle\Contents\Resources\Versions\2\Python\Framework\core.py", line 1021, in _function_in_service_is_deferred<br />
    return service.host.function_is_deferred(fname, self._create_service_context(service.host, context))<br />
AttributeError: 'NoneType' object has no attribute 'host'<br />
<br />
2012-06-10 00:48:33,017 (3640) :  DEBUG (core:337) - Unable to handle response type: <class 'Framework.modelling.objects.MediaContainer'><br />
2012-06-10 00:48:33,023 (3640) :  DEBUG (core:337) - Response: 500<br />


The plugin framework handles m3u playlists using the HTTPLiveStreamURL() callback. You should be able to implement your code something along the lines of:


<br />
stream = VideoClipObject(<br />
	items=[<br />
		MediaObject(<br />
			parts=[<br />
				PartObject(<br />
					key=HTTPLiveStreamURL(HI_RES_URL.m3u)<br />
					)<br />
				]<br />
			),<br />
		MediaObject(<br />
			parts=[<br />
				PartObject(<br />
					key=HTTPLiveStreamURL(LO_RES_URL.m3u)<br />
					)<br />
				]<br />
			)<br />
		]<br />
	)<br />





Adding them both as MediaObjects to the same VideoClipObject will allow the Plex client to choose the appropriate quality based on global settings.

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