estherjk/edi-cam

Can't change the Resolution of camera output.

kaushalshah opened this issue · 1 comments

After completing current guide, I successfully got 320*240 live video streaming through Intel Edison.
BUT
1./edi-cam/web/server/server.js
2./edi-cam/web/client/index.html
3./edi-cam/bin/do_ffmpeg.sh
But unfortunately instead of 360p live streaming we got leggy low resolution video.
I use Logitech 720p Camera.
Please help me for Getting 720p live video streaming.
email: sha.kau2@gmail.com

Here's a screenshot for when I try 360p (640x360):

screen shot 2015-07-18 at 9 11 48 am

When I move the camera and/or objects around, there's not much noise or jitter in the video feed.

I made the following modifications to bin/do_ffmpeg.sh, web/server/server.js, and web/client/index.html:

bin/do_ffmpeg.sh:

/home/root/bin/ffmpeg/ffmpeg -s 640x360 -f video4linux2 -i /dev/video0 -f mpeg1video \
-b 800k -r 30 http://127.0.0.1:8082

web/server/server.js (lines 29-30):

var width = 640;
var height = 360;

web/client/index.html (lines 12-16 and 28):

#canvas-video {
  width: 640px;
  height: 360px;
  border: 1px solid #ccc;
}
<canvas id="canvas-video" width="640" height="360"></canvas>

I made similar modifications to try 720p (1280x720):

screen shot 2015-07-18 at 9 33 22 am

Unfortunately, it's more blocky and there's a bit of a lag. If I increase the -b option in do_ffmpeg.sh, it crashes after a few seconds. My guess is that it may not be able to handle a higher quality stream.

Feel free to continue trying out different resolutions and hopefully you'll find one that works for you.