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

request for a few extra methods - set/get current time, get metadata(duration and other tags), set framerate speed #4

Open
blurymind opened this issue Mar 16, 2018 · 5 comments

Comments

@blurymind
Copy link

blurymind commented Mar 16, 2018

Thank you for adressing the compilation error issue btw. I will give it a try again in the weekend.

I really want to use this on a project, but I am missing a few features:

  • Seek Method - Ability to set video time and get current video time, also get overal duration of the video, ability to scrub a paused video
  • Get video metadata
  • Set framerate speed - Ability to control play speed by using a multiplier variable
@blurymind blurymind changed the title request for a few extra methods request for a few extra methods - set/get current time, get metadata(duration and other tags), set framerate speed Mar 16, 2018
@britzl
Copy link
Contributor

britzl commented Mar 16, 2018

Can't you pass in a multiplied dt to achive a different framerate speed?

What kind of metadata do you need?

@britzl
Copy link
Contributor

britzl commented Mar 16, 2018

I updated the example with some on-screen controls to pause, stop and fast forward

@blurymind
Copy link
Author

blurymind commented Mar 16, 2018

@britzl thank you for updating the example.
Fast forward is not the same as seek. Seek method should be able to set the video playback to a specific position. Some seek methods use a float value to set it in seconds/ms. Example:
https://www.appgamekit.com/documentation/Reference/Video/SetVideoPosition.htm

The seek should allow more interesting interaction methods with the video file - not just playing it. Scrubbing could be hooked with inputs, time ranges could be set to loop a number of times or until the player achieves somethings, etc.
It will make the video player much more usable in the context of using it for gameplay mechanics/interactivity

For metadata I mean the ability to read meta tags, implaned by the user - all the metatags!

Ffmpeg for example can attach metatags to video files like this:
ffmpeg -i input.webm -metadata key=value -codec copy output.webm
With the caveat of not overwriting the original when doing that

It could be very cool if we were able to get these tags and use them

For debugging, try above command and to retrieve the metadata you inserted back, ffmpeg can also do that:
ffmpeg -i output.webm -f ffmetadata metadata.txt
Actually web browsers can also do that I think

@blurymind
Copy link
Author

The metadata is not as important as a proper seek method. Setting the video to a specific position

@blurymind
Copy link
Author

blurymind commented Mar 19, 2018

For the javascript implementation you can get and set currentTime very easily via the htmlmediaelement

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime
video.currentTime
That allows for looping specific time ranges

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

No branches or pull requests

2 participants