action #42050

Improve video player (was: Add note about time scaling of OGV files)

Added by mkittler over 1 year ago. Updated 16 days ago.

Status:ResolvedStart date:05/10/2018
Priority:LowDue date:
Assignee:okurz% Done:

0%

Category:Feature requests
Target version:Current Sprint
Difficulty:
Duration:

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

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.


Related issues

Related to openQA Project - action #34345: use streams in ogg format to embed more information in th... New 05/04/2018

History

#1 Updated by okurz over 1 year 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

#2 Updated by coolo over 1 year ago

And the fact remains that the video is not real time, but really jumpy - turtle speed :)

#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.

#4 Updated by coolo over 1 year 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

#5 Updated by mkittler over 1 year 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.

#6 Updated by sebchlad over 1 year 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?

#7 Updated by coolo over 1 year ago

the logs contain real timestamps. this is just about netflix customers

#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
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:
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/

#9 Updated by coolo over 1 year ago

we either write a new frame or a R - so IMO it is constant frame rate

#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/

#11 Updated by coolo over 1 year 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

#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

#13 Updated by okurz about 1 year ago

  • Status changed from New to Workable

@mkittler what do you see missing after the PR?

#14 Updated by okurz about 1 year ago

  • Related to action #34345: use streams in ogg format to embed more information in the video added

#15 Updated by okurz 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?

#16 Updated by StefanBruens 2 months 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

#17 Updated by okurz 2 months 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?

#18 Updated by okurz 2 months 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)

#19 Updated by okurz 2 months 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.

#20 Updated by okurz 2 months ago

simplified version merged

#21 Updated by cdywan 16 days ago

So #2605 was merged, #2604 is still marked as WIP. Are there more features being worked on?

#22 Updated by okurz 16 days 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.

Also available in: Atom PDF