hi! i’m in the process of making a channel to access all mit opencourseware on my tv. retrieving the structure of the courses and the list of videos to play went ok but playing any videos fails. i’m not sure about the process to follow for writing this part of my plugin. basically one good test url would be http://archive.org/download/MIT16.03F03/11_flight_1-220k.mp4
can someone help me on this? thanx !
There’s already an url service for media hosted on Archive.org (https://github.com/plexinc-plugins/Services.bundle/blob/master/Contents/Service%20Sets/com.plexapp.plugins.internetarchive/) but it doesn’t do well with cases where are the videos are listed on the same page. In your case I would suggest something like:
<br />
oc = ObjectContainer()<br />
<br />
oc.add(<br />
VideoClipObject(<br />
title = video_title,<br />
summary = video_summary,<br />
thumb = thumb,<br />
items = [<br />
MediaObject(<br />
container = Container.MP4,<br />
parts = [<br />
PartObject(key = download_url)<br />
]<br />
)<br />
]<br />
)<br />
)<br />
Thanks ! It didn’t work but did point me on the good way and now I’ve got something which is working.
As you mentioned, Internet Archive service was not really adapted on this case. I’ve just scanned all the page trying to build the VideoClipObjects, MediaObjects and PartObjects myself.
Although, I’m not sure about some aspects. In fact, the _files.xml of this internet archive inform me that:
There is several contents -> mapped to VideoClipObjects in my case
There is several video formats for each content -> mapped to MediaObjects, attached to VideoClipObject
Is this the good way to do ?
Plus, contents are usually of four types: H264, MPEG4, Ogg Vorbis (ogv) and RealMedia (rm). When building up the MediaObjects and setting up the container and video_codec property, I have very few type of enum available (if not one, like for the video_codec where only VideoCodec.H264 is available.
What would be the best way for me to wrap up ogv and rm ? (I’m just skipping those two guys for now)
And also, as the videoClipObject asks for the key and rating_key (I’m not setting the url, I’m setting a key in partObject attached to mediaObject), I’m inputing for rating_key the SHA1 signature of the first media attached to the videoClipObject, and for the key, a dummy string like “tadaaa”. It’s working that way, but what should I really do ?
Wherever there are multiple file/codec types available H.264/MP4 are really the ideal choice. There are container and codec settings for ogg vorbis but they were added after the last update of the Dev docs. The Internet Archive service implements them so, best to double-check there for reference. Unless there is some content that is only available as RealMedia, I would just ignore it. TBH, I’m not sure that any Plex clients handle that format. For the key and rating_key, I think you should be able to use the URL itself. I haven’t implemented anything that way but I think that any unique string can be used and the key and rating_key can be the same.
Thanks a lot for your help, most of my channel is working now… Hope to release it soon.
Thanks again !
You're welcome. I love seeing new people tackle plugin development.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.