Steaming-IP-Camera-Nodejs icon indicating copy to clipboard operation
Steaming-IP-Camera-Nodejs copied to clipboard

Scaled image does not display correctly

Open Adimarantis opened this issue 5 years ago • 3 comments

In order to reduce load on the Raspberry, I tried to reduce resolution. by adding ffmpegOptions: { '-s': '640x400' } in the app.js file. However, it seems that the webpage still creates the canvas the size of the input resolution, which causes a totally distorted picture. (same with cropping) Is there a way to fix that? Probably in the jsmpeg.min.js

I would by the way, also like to reduce the fps to further reduce load. I would be good with 1-2 pictures per second. Any idea?

Adimarantis avatar Feb 11 '19 15:02 Adimarantis

Sometimes you find the solution just by asking. Looks like you have to specify width and height as option for the Stream in addition to the ffmpeg option:

    width: 640 ,
    height: 400 ,
    ffmpegOptions: {
     '-s': "640x400"
   }

Still searching for a solution to drop frames

Adimarantis avatar Feb 11 '19 16:02 Adimarantis

Have you tried the style on CSS?

xpcrts avatar Apr 11 '22 10:04 xpcrts

Have you tried the style on CSS?

it's worked for me. Thank u

buithikieu11 avatar Oct 13 '23 01:10 buithikieu11