Improve video player (was: Add note about time scaling of OGV files)
|Target version:||Current Sprint|
Better video player with information about how the video run time relates to real time.
- AC1: Video player reflects information about time scaling
- Based on the prototype in https://github.com/StefanBruens/StefanBruens.github.io/blob/master/index.html create a video player for openQA
- Ensure it shows the time scaling information or the realtime overlayed
videoencoder.cpp produces an OGG/Theora stream with the framerate hardcoded to 24 FPS. Of course 24 FPS is not really the case, leading to the videos played 12 times faster. It would be useful to add a note in the web UI that the videos are played faster by a constant factor of 12 so people can multiply timestamps or durations to know how long something took for real.
#3 Updated by mkittler over 1 year ago
Mh... haven't tough about Chromium users. In Firefox one can just select the desired playback speed in the right-click context menu but Chromium doesn't offer this (actually one of the reasons I still prefer Firefox). Not sure how people actually watch these videos. I usually use
mpv URL because it is really good at seeking and shortcuts are nice (including
] to increase the speed).
And the fact remains that the video is not real time, but really jumpy - turtle speed
That is true. Maybe it would be nice if only the timestamps would be adjusted but not the playback speed. So the player's progress bar would show the real time but still play it by default with 24 FPS. Likely that's not possible.
Is the speed of the video as it is right now increased by a constant factor? If so, I could just tell people (who are asking me about this) to multiply by a certain factor if they want to know the real time.
#8 Updated by StefanBruens over 1 year ago
Videos are not written with a constant "real time" frame rate, but based on similarity level. See
One possibility to make the relation between "real time"/wallclock timestamps and video time visible would be to:
1. output the video timestamp in the autoinst.log every time(?) a video frame is written
2. create a subtitle file showing the wallclock time - https://hacks.mozilla.org/2014/07/adding-captions-and-subtitles-to-html5-video/
#10 Updated by StefanBruens over 1 year ago
You are almost correct - we try to push frames at a constant rate of 0.5s/frames, but in reality this ends up somewhat slower, sometimes significanly slower in case of stalls.
I have created a prototype for overlaying wall clock timestamps (can be switched of), see https://stefanbruens.github.io/
#12 Updated by mkittler over 1 year ago
@StefanBruens I never considered the possibility of creating our own web-based media player. But this looks good and it wouldn't be a big effort to include it in openQA.
Reference to outstanding PR: https://github.com/os-autoinst/os-autoinst/pull/1059
#16 Updated by StefanBruens 2 months ago
@StefanBruens could you share a bit about your prototype from #42050#note-10 ? Can you say where is the code for that?
The complete code is actually in the link above, https://stefanbruens.github.io/ , or if you prefer a github repository, https://github.com/StefanBruens/StefanBruens.github.io
Everything is in the index.html, which links to the video.ogv and video_time.vtt
ah, great! I did not know if you "generate" any code for the HTML document in https://stefanbruens.github.io/ so this is why I asked but, yeah, the HTML source is clean and easy to read. So, do you have any preferences or suggestions how to continue? If you propose a PR for openQA yourself we can integrate it of course. If you suggest someone else takes the code as template then it would be good if you can confirm someone else may use it, at best licensed under GPLv2, same as openQA. Ok for you?
- Status changed from Workable to Feedback
- Assignee set to okurz
- Target version set to Current Sprint
- Status changed from Feedback to Resolved
Well, I don't have any further plans for the next days. I closed https://github.com/os-autoinst/openQA/pull/2604 and based on the existing ACs I think we can call this done. Eventually we might want to improve the video player further but I guess it's currently ok.