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

Seek to arbitrary position #176

Closed
ssssssssssss opened this issue Jun 6, 2017 · 8 comments
Closed

Seek to arbitrary position #176

ssssssssssss opened this issue Jun 6, 2017 · 8 comments

Comments

@ssssssssssss
Copy link

JSMpeg is good for streaming content, but for the VOD content, an accurate seek is a must have feature. It seeks like it doesn't take previous I-frame in mind.

@ssssssssssss
Copy link
Author

Seems like there was seekToTime and seekToFrame implementation before the refactor, do you have any plan to bring it back? Thank you.

@ssssssssssss
Copy link
Author

I managed to get it working with nextFrame and even seek to arbitrary frame with the help of server side. The code may be coupled with server side logic to get correct meta data, so closing this.

@Rob-ot
Copy link

Rob-ot commented Jan 9, 2019

@phoboslab Thank you for this amazing library!

I'm trying add a scrubber by using player.seek but the video gets messed up when seeking to a non-intra frame. Are there plans to add back the seekToFrame with the "exact" parameter as detailed here? #9 (comment)

@dumblob
Copy link

dumblob commented Nov 27, 2021

I have actually the same question 😉.

@Rob-ot did you manage to make it work without distorting the video?

@Rob-ot
Copy link

Rob-ot commented Nov 29, 2021

@dumblob No, unfortunately. We were working with somewhat short clips (<5m) so we just processed the entire video into frames. We saved the frames as compressed jpegs in BLOBs which seemed to allow the browser to swap the data to disk and avoid using a ton or ram, though it still used plenty.

@dumblob
Copy link

dumblob commented Nov 30, 2021

@Rob-ot very insightful, thank you. Speaking of "still used plenty" - could you specify how much that could be (just roughly) for a 5m video in FullHD? My goal is to make it work on quite low-end tablets and maybe smartphones (but I'm free to choose a web browser). Do you think it's viable?

@Rob-ot
Copy link

Rob-ot commented Nov 30, 2021

@dumblob "plenty" being like 2GB+ so probably not good for low-end. We also experimented with decoding the entire video on the server to jpeg frames and loading them one-by-one, which actually worked really well for scrubbing back and forth in the video. We would prefetch like 50 frames to the left and right of where the user was looking. There's also ideas of extracting a large and small version of each frame to keep things snappy. Hope that helps and good luck!

@dumblob
Copy link

dumblob commented Nov 30, 2021

@Rob-ot thanks again! Pffff, 2GB+ is way too much. So yeah, decoding on server and prefetching +-50 frames suddenly sounds viable. Thanks a lot!

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

3 participants