rtsp-ffmpeg
rtsp-ffmpeg copied to clipboard
High resolution video playback
When I try to playback 4k video from my cam using the example code, it show only part of the video in the screen.
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.
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?
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.
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.
Hi @Seikon
I have another problem for the library, I added the option resolution : "640x480"
but the video size still the original size.
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