action #42050
closedImprove video player (was: Add note about time scaling of OGV files)
0%
Description
Motivation¶
Better video player with information about how the video run time relates to real time.
Acceptance criteria¶
- AC1: Video player reflects information about time scaling
Suggestions¶
- 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
Further details¶
Original proposal¶
Currently 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.
Updated by okurz over 6 years ago
I like the time lapse effect of the current implementation. If you make the videos play in real-time speed by default I am sure some people would watch the videos in real-time and waste their time :D
Updated by coolo over 6 years ago
And the fact remains that the video is not real time, but really jumpy - turtle speed :)
Updated by mkittler over 6 years 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.
Updated by coolo over 6 years ago
I disagree to play the video at real time by default. And firefox only allows between 0.5x and 2x speed - and our videos are 12x. Putting that info in the webui could help users I guess
Updated by mkittler over 6 years ago
- Subject changed from Produce correctly timed OGV files to Add note about time scaling of OGV files
- Description updated (diff)
I agree that playing in realtime would make things worse. I updated the ticket description.
Updated by sebchlad over 6 years ago
" so people can multiply timestamps or durations to know how long something took for real." if this information is indeed useful, should we perhaps add the adjusted timestamps to logs?
Updated by coolo over 6 years ago
the logs contain real timestamps. this is just about netflix customers
Updated by StefanBruens over 6 years ago
Videos are not written with a constant "real time" frame rate, but based on similarity level. See
https://github.com/os-autoinst/os-autoinst/blob/23d7584b7ff798fe9bd33e9faf5e8ef9cd5900a4/backend/baseclass.pm#L424
One possibility to make the relation between "real time"/wallclock timestamps and video time visible would be to:
- output the video timestamp in the autoinst.log every time(?) a video frame is written
- create a subtitle file showing the wallclock time - https://hacks.mozilla.org/2014/07/adding-captions-and-subtitles-to-html5-video/
Updated by coolo over 6 years ago
we either write a new frame or a R - so IMO it is constant frame rate
Updated by StefanBruens over 6 years 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/
Updated by coolo over 6 years ago
But does the error really matter? I guess the use case is to report 'it took 2 minutes for X' - and this might have been actually 110 or 130 seconds instead (and the error is most likely not even that big).
Having said that, I do like your prototype
Updated by mkittler over 6 years 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
Updated by okurz over 6 years ago
- Status changed from New to Workable
@mkittler what do you see missing after the PR?
Updated by okurz over 6 years ago
- Related to action #34345: use streams in ogg format to embed more information in the video added
Updated by okurz about 5 years ago
@StefanBruens could you share a bit about your prototype from #42050#note-10 ? Can you say where is the code for that?
Updated by StefanBruens about 5 years ago
okurz wrote:
@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
Updated by okurz about 5 years ago
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?
Updated by okurz about 5 years ago
- Subject changed from Add note about time scaling of OGV files to Improve video player (was: Add note about time scaling of OGV files)
- Description updated (diff)
Updated by okurz about 5 years ago
- Status changed from Workable to Feedback
- Assignee set to okurz
- Target version set to Current Sprint
My proposal incorporating the prototype from StefanBruens into openQA: https://github.com/os-autoinst/openQA/pull/2604 and https://github.com/os-autoinst/openQA/pull/2605 for a simplified alternative.
Updated by okurz about 5 years ago
- 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.