Subversion Repositories colinrmitchell.com

Rev

Blame | Last modification | View Log | RSS feed

Logitech C270 and Ffmpeg:

--------------------
RESOLUTIONS
--------------------

   Here is some info on the fps for each resolution:

                Size: Discrete 320x176
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)
                        
                Size: Discrete 320x240
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)

                Size: Discrete 640x360
                        Interval: Discrete 0.033s (30.000 fps)
                        Interval: Discrete 0.040s (25.000 fps)
                        Interval: Discrete 0.050s (20.000 fps)
                        Interval: Discrete 0.067s (15.000 fps)
                        Interval: Discrete 0.100s (10.000 fps)
                        Interval: Discrete 0.200s (5.000 fps)

                Size: Discrete 1280x720
                        Interval: Discrete 0.133s (7.500 fps)
                        Interval: Discrete 0.200s (5.000 fps)

   In order to get Ffmpeg to use the webcam properly, you must specify the resolution and fps that you want.  E.g.,

      ffmpeg -f v4l2 -s 640x360 -r 10 -input_format rawvideo -i /dev/video0

   -s is one of the resolutions above.
   -r must be an fps that goes with the selected resolution.

--------------------
FFSERVER
--------------------

   The video output settings are controlled by Ffserver:

      VideoCodec libvpx
      VideoSize 320x240
      VideoFrameRate 15
      VideoBitRate 800
      AVOptionVideo flags +global_header

   The VideoSize and VideoFrameRate must be one of the value present for the webcam.

   The VideoBitRate must be appropriate scaled for the video.  The following settings seem to work okay:

      640x360 @ 10fps: 800kbs/s
      320x240 @ 15fps: 500kbs/s
      1280x720 @ 5fpx: 1000kbs/s

   These values will change how much compression is used in the video.  More compressions makes the bitrate smaller, but more CPU is needed, I think.

   If using multiple streams from a single feed, set the ffmpeg input setting to the settings needed for the highest fps one.

--------------------
SETTINGS THAT WORK
--------------------

   High resolution, low frames:

      VideoSize 1280x720
      VideoFrameRate 3
      VideoBitRate 1000

   Medium resolution, medium frames:

      VideoSize 640x360
      VideoFrameRate 10
      VideoBitRate 800

   Low resolution, high frames:

      VideoSize 320x240
      VideoFrameRate 15
      VideoBitRate 500