1

I have a web app that allows users to insert short advert videos (30 to 60 seconds) into a longer main video (typically 45 minutes, but file sizes can vary widely).

The entire process involves:

  • Importing all selected files from s3
  • Encoding each to a common scheme, ipad-high.
  • Extracting clips from the main video.
  • Concatenating all clips from the main video with the advert videos.

For n videos to be inserted into the main video, n + 1 clips will be extracted.

Since Transloadit does not provide any estimates on how long an assembly may run, I'm looking to find a way to estimate this myself so I can display a progress bar or just an ETA to give users an idea of how long their jobs will take.

My first thought is to determine the total size of all files in the assembly and save that to some redis database, along with the completion time for that.

Subsequent runs will use this as a benchmark of sorts, i.e if 60GB took 50 minutes, how long will 25GB take.

The data on redis will be continually updated (I guess I could make the values a running average of sorts) to make the estimates a reliable as possible.

Any ideas are welcome, thanks :)

SamAko
  • 3,485
  • 7
  • 41
  • 77

1 Answers1

0

I'll para-phrase some of the conversation had over at Transloadit regarding this question:

  • Estimating the duration of an assembly is a complex problem to solve due to how many factors go into the calculation, for example: how many files are in a zip that is being uploaded? how many files in the directory that is will be imported? how many files will pass the filter on colorspace: rgb? These are things that are only found out as the Assembly runs - but they can wildly alter the ETA
  • There are plans for a dashboard that will showcase graphs with information on your Assemblies - such as throughput in Mbit/s, combined with historical data on the Template and filesizes, this could be used for rough estimations.
  • One suggestion was that instead of an ETA, it may be easier to implement a progress bar showcasing when each step or job has been completed. The downside with this is of course the accuracy, but it may be all you need for a front-facing solution
  • You may also be interested in looking into turbo mode. If you're using the /video/encode or /video/concat robot, it may help dramatically reduce the encoding speeds
MSSNG
  • 36
  • 4