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

High resolution video playback #15

Open
chinkan opened this issue Jul 14, 2017 · 5 comments
Open

High resolution video playback #15

chinkan opened this issue Jul 14, 2017 · 5 comments

Comments

@chinkan
Copy link

chinkan commented Jul 14, 2017

When I try to playback 4k video from my cam using the example code, it show only part of the video in the screen.
2017-07-14_172021
How can I fix it? Thanks!

P.S.: I had tried 1080p also same issue. I had changed to 704*576 and work perfectly. However I need to playback at lease 1080p for my project.

@Seikon
Copy link
Collaborator

Seikon commented Jul 14, 2017

Hi @chinkan

What browser are you using?
What example are you using? (canvas or img html tag)
Could you see errors in the javascript console?

@chinkan
Copy link
Author

chinkan commented Jul 14, 2017

Hi @Seikon

I am use the latest Chrome version 59 and I tried the canvas version.
I have changed the canvas size to
<canvas width='2560' height='1440'>
but nothing helps.
Here is the console from google chrome.
2017-07-14_174511

@Seikon
Copy link
Collaborator

Seikon commented Jul 14, 2017

it is a bit strange. Has all the frame the same size or it changes in time? Try to force the change of the frame crossing in front of the camera and see if the size's image oscilate.

I never try this with 4K cameras, so it's very difficult to test it. Maybe the canvas hasn't enough memory to put the entire image. You can test it adding debug points and watching what appends when canvas draw the image.

@chinkan
Copy link
Author

chinkan commented Jul 17, 2017

Hi @Seikon

I have another problem for the library, I added the option resolution : "640x480" but the video size still the original size.

@Seikon
Copy link
Collaborator

Seikon commented Jul 17, 2017

This is because in the example you are setting the resolution by code using ctx.drawImage(img,100,100);
change the "100" value for your preference:

https://www.w3schools.com/tags/canvas_drawimage.asp

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