camera capture size is wrong

hi

i would like to make low video file.
so i scaled underflow…

videotestsrc encoding size is good
but v4l2src encoding size is wrong…

is it right size?

/*capute videotestsrc scale to 640x480 */
gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw, format=(string)I420, width=(int)1280, height=(int)720’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420’ ! omxh264enc ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=videotestsrc_640x480.mp4

/*capute videotestsrc scale to 320x240 */
gst-launch-1.0 videotestsrc num-buffers=100 ! ‘video/x-raw, format=(string)I420, width=(int)1280, height=(int)720’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)320, height=(int)240, format=(string)I420’ ! omxh264enc ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=videotestsrc_320x240.mp4

/*capute v4l2src scale to 640x480 */
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100 ! ‘video/x-raw,format=UYVY,width=1280,height=720’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)I420’ ! omxh264enc ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=v4l2_640x480.mp4

/*capute v4l2src scale to 320x240 */
gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=100 ! ‘video/x-raw,format=UYVY,width=1280,height=720’ ! nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)320, height=(int)240, format=(string)I420’ ! omxh264enc ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=v4l2_320x240.mp4


-rw-r–r-- 1 root root----1629324 Mar 27 12:01 v4l2_320x240.mp4<-------------------1.6M
-rw-r–r-- 1 root root----1779584 Mar 27 12:01 v4l2_640x480.mp4<-------------------1.7M
-rw-r–r-- 1 root root-----383803 Mar 27 12:00 videotestsrc_320x240.mp4<-----------375K
-rw-r–r-- 1 root root----1605905 Mar 27 12:00 videotestsrc_640x480.mp4<-----------1.6M

Hi walterkim,
It is normal, the camera frame is always more complex than the video test source, leading to higher bitrate.

Please refer to user guide on encoder parameters of setting bitrate

Thank you for you reply

default bitrate is 4000000.

so i change bitrate 1000000 to 320x240 resolution

i checked reduce image size.

thank you

gst-launch-1.0
v4l2src device=/dev/video0 num-buffers=100 ! ‘video/x-raw,format=UYVY,width=1280,height=720’ !
nvvidconv ! ‘video/x-raw(memory:NVMM), width=(int)320, height=(int)240, format=(string)I420’ !
omxh264enc bitrate=1000000 ! ‘video/x-h264, stream-format=(string)byte-stream’ ! h264parse ! qtmux ! filesink location=v4l2_320x240.mp4

-rw-r–r-- 1 root root 415K Mar 27 16:16 v4l2_320x240.mp4