rtsp-ffmpeg icon indicating copy to clipboard operation
rtsp-ffmpeg copied to clipboard

High resolution video playback

Open chinkan opened this issue 7 years ago • 5 comments

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.

chinkan avatar Jul 14 '17 09:07 chinkan

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?

Seikon avatar Jul 14 '17 09:07 Seikon

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

chinkan avatar Jul 14 '17 09:07 chinkan

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.

Seikon avatar Jul 14 '17 09:07 Seikon

Hi @Seikon

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

chinkan avatar Jul 17 '17 03:07 chinkan

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

Seikon avatar Jul 17 '17 06:07 Seikon