shauntarves / livebarn

A Javascript library for fetching videos from the LiveBarn streaming service.
MIT License
6 stars 1 forks source link

Weird behaviour with the duration parameter #2

Closed ramenatorr closed 1 year ago

ramenatorr commented 1 year ago

Hey, first of this is a great library to use for LiveBarn. I'm trying to automate my beer league team's videos by grabbing the files then uploading them to YouTube. I'm still in exploration mode, so I'm running everything locally for now.

One thing I noticed is that I'm passing a duration of 55 however, my output video file ends up being an hour in duration. Is this normal behaviour? Here's the code:

const games = [ new livebarn.Game(_surfaces.canton1, new Date(Date.UTC(2023, 9, 12, 21, 30, 00)), 55, 4), ];

Thanks!

shauntarves commented 1 year ago

Yeah, that's not really surprising. The livebarn service API basically has "start" and "end" time parameters so this library can only ask livebarn for video from the specified surface between the start time and the start time + duration you asked for. The request receives a list of video files from livebarn, and my code just downloads all of those files. It sounds like maybe they are grouping their video playlists in 5- or 10-minute bunches so in order to get 10:25pm in your case, the next 5 minutes may also be included.

ramenatorr commented 1 year ago

Thanks for the quick follow up, Shaun!