> I mean this command. > ffplay -f dshow -i video="Mercury USB2.0 Camera" -s 640x480 > > How can we set 640x480 in C++ code?
To quote my original answer: > > there is libswscale (or the scale filter that uses > > libswscale) to do the resizing. See doc/examples/filtering_video.c for an example for on how to use video filters, doc/examples/scaling_video.c for an example on how to use libswscale. Please do not top-post here, it is considered rude, Carl Eugen ------------------------------------------------- Hi Carl, Thanks! But when I use the command ffmpeg -f dshow -list_options true -i video="Mercury USB2.0 Camera" It has the option [dshow @ 00a9eb00] vcodec=mjpeg min s=640x480 fps=30 max s=640x480 fps=30 Because I am newbie to ffmpeg, I suppose we can take the frame with size 640x480 directly. ffmpeg -f dshow -list_options true -i video="Mercury USB2.0 Camera" [dshow @ 00a9eb00] DirectShow video device options [dshow @ 00a9eb00] Pin "Capture" [dshow @ 00a9eb00] vcodec=mjpeg min s=1280x720 fps=30 max s=1280x720 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=1280x720 fps=30 max s=1280x720 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=640x480 fps=30 max s=640x480 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=640x480 fps=30 max s=640x480 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=1600x1200 fps=15 max s=1600x1200 fps=15 [dshow @ 00a9eb00] vcodec=mjpeg min s=1600x1200 fps=15 max s=1600x1200 fps=15 [dshow @ 00a9eb00] vcodec=mjpeg min s=800x600 fps=30 max s=800x600 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=800x600 fps=30 max s=800x600 fps=30 [dshow @ 00a9eb00] vcodec=mjpeg min s=1920x1080 fps=15 max s=1920x1080 fps=15 [dshow @ 00a9eb00] vcodec=mjpeg min s=1920x1080 fps=15 max s=1920x1080 fps=15 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1280x720 fps=10 max s=1280x720 fps=10 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1280x720 fps=10 max s=1280x720 fps=10 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=640x480 fps=30 max s=640x480 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=352x288 fps=30 max s=352x288 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=320x240 fps=30 max s=320x240 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=160x120 fps=30 max s=160x120 fps=30 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1600x1200 fps=5 max s=1600x1200 fps=5 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1600x1200 fps=5 max s=1600x1200 fps=5 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1920x1080 fps=7.5 max s=1920x1080 fps=7.5 [dshow @ 00a9eb00] pixel_format=yuyv422 min s=1920x1080 fps=7.5 max s=1920x1080 fps=7.5 _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
