Playing video fragments
#1
I have some videos that contain multiple topics and I want to be able to play the individual fragments separately using the Player.Open API call.
The best I can get currently is to issue the Player.Open call on the video, and then immedeately issue a Player.Seek to get to the starting position.
While this works, it is sub-optimal since it requires multiple API calls, and from the perspective of the viewer he is still watching the 'big' video. Something like “at 1'36" you'll see …” doesn't make sense without calculating. And playing does not stop at the end of the fragment.

Is there a better way to do play video fragments like they were independent videos? Splitting the main video into fragments is not an option.
Reply
#2
use
Code:
item.setProperty('startoffset', 'time_in_seconds')
to start at a given position.

if you want to enforce an end point you will have to use a edl.

ehm, brainfart. i was thinking python lol. same thing only you set the 'resume' property on the item in the same format you did the Seek using.
Reply
#3
Sounds interesting, but I fail to see how to do this using the JSON-RPC API.

My first call is (leaving out obvious data):

   "method" : "Player.Open",
   "params" : { "item" : { "file" : "/volume1/Storage0/Video/Bird_On_A_Wire.avi" } }


My second call is:

    "method" : "Player.Seek",
    "params" : { "playerid" : 1, "value" : { "hours" : 0, "minutes" : 8, "seconds" : 32 } }

How would the set property look like?
Reply
#4
Code:
"method": "Player.Open"
"param": { "item" : { "file" : "blblablabla"}, "resume" : {"hours": 0, "minutes": 8, "seconds": 32}}
Reply
#5
Splendid!!! Thanks.
Reply
#6
Apparently, it should be:
 
Code:
"param": { "item" : { "file" : "blblablabla"}, "options" { "resume" : {"hours": 0, "minutes": 8, "seconds": 32} } }
Reply
#7
Okay then i misread the schema. But if it works all is goodSmile
Reply

Logout Mark Read Team Forum Stats Members Help
Playing video fragments0