Get info about video that not finished encoding

90 Views Asked by At

Where does all meta data about video file comes from? Is it comes from original video or from encoded? I'm trying to write video duration into database, but i'm not sure if i can get this value during POST on my server

1

There are 1 best solutions below

0
On BEST ANSWER

This english is hard to read but I'll take my best shot. I also have zero experience with pandastream but the API looks easy enough. It look like the pandastream requires you to upload the video file first. Then work off an ID.

In the api docs at: https://github.com/pandastream/panda_gem, it looks like

encodings = Panda::Video.find("1234").encodings

means that you have to have encoded it first. They are just sending the attributes down to you over the web API. After you query for the attributes, you can do anything you want with it, like inserting them into a database.

You could even loop through all the videos on your account and get the video duration and bulk insert them.

videos = Panda::Video.all
# loop through videos as |upload|
#   find video as video
#   insert into database upload.id and video.attributes["duration"]

Good luck!