Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get a time estimate while waiting for your video #3

Open
veltman opened this issue Jul 21, 2016 · 3 comments
Open

Get a time estimate while waiting for your video #3

veltman opened this issue Jul 21, 2016 · 3 comments

Comments

@veltman
Copy link
Contributor

veltman commented Jul 21, 2016

Current status updates tell you what stage the rendering is at and % progress, but it would be nice to get a full waiting time estimate, especially if you're in a queue with jobs in front of you. This would entail some formula for estimated completion time, which would require knowing the duration before a job has started, so we'd probably have to send a duration estimate from the browser. Then we could multiply the duration and framerate by some conservative per-frame estimate.

@Laurian
Copy link

Laurian commented Aug 11, 2016

ffmpeg has a -progress URL option, where progress info is HTTP POST-ed (chunked), that could feed into express and relayed further to the user

@veltman
Copy link
Contributor Author

veltman commented Aug 11, 2016

The FFmpeg processing time is only a small fraction of the total time, the main issue is drawing the frames. The steps to an estimate would basically be:

  1. Include a selectedDuration value in each job when it's submitted.
  2. Keep a moving average of how long each step takes per second of length.
  3. Use those per-second benchmarks to estimate how long each step a job of X seconds will take.
  4. To compute the ETA of a job, add up the estimated time of the remaining steps for in-progress jobs (if queued), plus the estimated time of the remaining steps for the job itself.

Steps 2 and 3 could be skipped in favor of a rough estimate based on system stats detected by os.cpus() and os.totalmem().

@Laurian
Copy link

Laurian commented Aug 19, 2016

Yup, I'm digging into FFmpeg progress for other projects, the HTTP chunked POST it can make is messy to listen to, looking now at https://github.com/eugeneware/ffmpeg-progress-stream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants