[FFmpeg-user] All the video captures are made at a resolution of 176x144
Lindsey Williams
lindsey.b.williams at gmail.com
Mon Feb 26 15:42:07 EET 2018
I can't say for certain as its been some time since I used ffmpeg, but
there are only a fixed number of resolutions to pass to ffmpeg using the -s
size parameter and the behavior isn't what you're probably looking for.
What you probably need to look at is the scaling filter:
https://ffmpeg.org/ffmpeg-filters.html#scale
https://trac.ffmpeg.org/wiki/Scaling
On Mon, Feb 26, 2018 at 8:06 AM DiegoUG <diego.uribe.gamez at gmail.com> wrote:
> Hello, can someone guide me a little towards the solution?
>
> I really do not understand what it is, and with another camera the same
> thing is happening to me.
>
> 2018-02-23 0:34 GMT-05:00 DiegoUG <diego.uribe.gamez at gmail.com>:
>
> > Hello,
> >
> > I'm doing a capture of an image from the docker using my web cam, but the
> > docker is doing it at a resolution of 176x144 and outside of the docker
> in
> > my localhost it takes it to 640x360, in both it's the same installation,
> I
> > do not know it's happening:
> >
> > Docker ------------------------------------------------------------
> > -----------------------
> > # ffmpeg -r 1 -f v4l2 -s 720x480 -i /dev/video0 -vframes 1 menu%d.jpg
> >
> > ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
> > built with gcc 7 (Debian 7.3.0-3)
> > configuration: --disable-debug --disable-doc --disable-ffplay
> > --enable-shared --enable-avresample --enable-libopencore-amrnb
> > --enable-libopencore-amrwb --enable-gpl --enable-libass
> > --enable-libfreetype --enable-libvidstab --enable-libmp3lame
> > --enable-libopenjpeg --enable-libopus --enable-libtheora
> --enable-libvorbis
> > --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264
> > --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar
> > --enable-postproc --enable-small --enable-version3
> > --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
> > --extra-libs=-ldl --prefix=/opt/ffmpeg
> > libavutil 55. 78.100 / 55. 78.100
> > libavcodec 57.107.100 / 57.107.100
> > libavformat 57. 83.100 / 57. 83.100
> > libavdevice 57. 10.100 / 57. 10.100
> > libavfilter 6.107.100 / 6.107.100
> > libavresample 3. 7. 0 / 3. 7. 0
> > libswscale 4. 8.100 / 4. 8.100
> > libswresample 2. 9.100 / 2. 9.100
> > libpostproc 54. 7.100 / 54. 7.100
> > [video4linux2,v4l2 @ 0x55cbd71f70a0] The V4L2 driver changed the video
> > from 720x480 to 176x144
> > [video4linux2,v4l2 @ 0x55cbd71f70a0] The driver changed the time per
> frame
> > from 1/1 to 1/5
> > Input #0, video4linux2,v4l2, from '/dev/video0':
> > Duration: N/A, start: 59614.860847, bitrate: 2027 kb/s
> > Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 176x144,
> > 2027 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc
> > Stream mapping:
> > Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
> > Press [q] to stop, [?] for help
> > [swscaler @ 0x55cbd7209280] deprecated pixel format used, make sure you
> > did set range correctly
> > Output #0, image2, to 'menu%d.jpg':
> > Metadata:
> > encoder : Lavf57.83.100
> > Stream #0:0: Video: mjpeg, yuvj422p(pc), 176x144, q=2-31, 200 kb/s, 1
> > fps, 1 tbn, 1 tbc
> > Metadata:
> > encoder : Lavc57.107.100 mjpeg
> > Side data:
> > cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> > frame= 1 fps=0.0 q=2.7 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=
> > 424x
> > video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: unknown
> > ------------------------------------------------------------
> > ---------------------------------
> >
> >
> > local ------------------------------------------------------
> > --------------------------------
> > # ffmpeg -r 1 -f v4l2 -s 720x480 -i /dev/video0 -vframes 1 menu%d.jpg
> >
> > ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
> > built with gcc 7.3.0 (GCC)
> > configuration: --prefix=/usr --disable-debug --disable-static
> > --disable-stripping --enable-avisynth --enable-avresample
> > --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
> > --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype
> > --enable-libfribidi --enable-libgsm --enable-libiec61883
> > --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
> > --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
> > --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh
> > --enable-libtheora --enable-libv4l2 --enable-libvidstab
> --enable-libvorbis
> > --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> > --enable-libxcb --enable-libxml2 --enable-libxvid --enable-shared
> > --enable-version3 --enable-omx
> > libavutil 55. 78.100 / 55. 78.100
> > libavcodec 57.107.100 / 57.107.100
> > libavformat 57. 83.100 / 57. 83.100
> > libavdevice 57. 10.100 / 57. 10.100
> > libavfilter 6.107.100 / 6.107.100
> > libavresample 3. 7. 0 / 3. 7. 0
> > libswscale 4. 8.100 / 4. 8.100
> > libswresample 2. 9.100 / 2. 9.100
> > libpostproc 54. 7.100 / 54. 7.100
> > [video4linux2,v4l2 @ 0x55c87b781a40] The V4L2 driver changed the video
> > from 720x480 to 640x480
> > [video4linux2,v4l2 @ 0x55c87b781a40] The driver changed the time per
> frame
> > from 1/1 to 1/15
> > Input #0, video4linux2,v4l2, from '/dev/video0':
> > Duration: N/A, start: 59593.137905, bitrate: 73728 kb/s
> > Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480,
> > 73728 kb/s, 15 fps, 15 tbr, 1000k tbn, 1000k tbc
> > Stream mapping:
> > Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (native))
> > Press [q] to stop, [?] for help
> > [swscaler @ 0x55c87b7935e0] deprecated pixel format used, make sure you
> > did set range correctly
> > Output #0, image2, to 'menu%d.jpg':
> > Metadata:
> > encoder : Lavf57.83.100
> > Stream #0:0: Video: mjpeg, yuvj422p(pc), 640x480, q=2-31, 200 kb/s, 1
> > fps, 1 tbn, 1 tbc
> > Metadata:
> > encoder : Lavc57.107.100 mjpeg
> > Side data:
> > cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1
> > frame= 1 fps=0.0 q=4.9 Lsize=N/A time=00:00:01.00 bitrate=N/A speed=
> > 178x
> > video:21kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
> > muxing overhead: unknown
> > ------------------------------------------------------------
> > ---------------------------------
> >
> > I checked how the camera was detected and I saw a difference, but I do
> not
> > know why
> >
> > Docker ------------------------------------------------------------
> > -----------------------
> > # ffmpeg -f v4l2 -list_formats all -i /dev/video0
> >
> > ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
> > built with gcc 7 (Debian 7.3.0-3)
> > configuration: --disable-debug --disable-doc --disable-ffplay
> > --enable-shared --enable-avresample --enable-libopencore-amrnb
> > --enable-libopencore-amrwb --enable-gpl --enable-libass
> > --enable-libfreetype --enable-libvidstab --enable-libmp3lame
> > --enable-libopenjpeg --enable-libopus --enable-libtheora
> --enable-libvorbis
> > --enable-libvpx --enable-libx265 --enable-libxvid --enable-libx264
> > --enable-nonfree --enable-openssl --enable-libfdk_aac --enable-libkvazaar
> > --enable-postproc --enable-small --enable-version3
> > --extra-cflags=-I/opt/ffmpeg/include --extra-ldflags=-L/opt/ffmpeg/lib
> > --extra-libs=-ldl --prefix=/opt/ffmpeg
> > libavutil 55. 78.100 / 55. 78.100
> > libavcodec 57.107.100 / 57.107.100
> > libavformat 57. 83.100 / 57. 83.100
> > libavdevice 57. 10.100 / 57. 10.100
> > libavfilter 6.107.100 / 6.107.100
> > libavresample 3. 7. 0 / 3. 7. 0
> > libswscale 4. 8.100 / 4. 8.100
> > libswresample 2. 9.100 / 2. 9.100
> > libpostproc 54. 7.100 / 54. 7.100
> > [video4linux2,v4l2 @ 0x55e122701f60] Raw : yuyv422 :
> > YUYV 4:2:2 : 160x90 160x120 176x144
> > [video4linux2,v4l2 @ 0x55e122701f60] Compressed: h264 :
> > H.264 : 640x480 160x90 160x120 176x144 320x180 320x240 352x288
> 432x240
> > 640x360 800x448 800x600 864x480 960x720 1024x576 1280x720
> > [video4linux2,v4l2 @ 0x55e122701f60] Compressed: mjpeg :
> > Motion-JPEG : 640x480 160x90 160x120 176x144 320x180 320x240 352x288
> > 432x240 640x360
> > ------------------------------------------------------------
> > ---------------------------------
> >
> > local ------------------------------------------------------
> > --------------------------------
> > # ffmpeg -f v4l2 -list_formats all -i /dev/video0
> >
> > ffmpeg version 3.4.2 Copyright (c) 2000-2018 the FFmpeg developers
> > built with gcc 7.3.0 (GCC)
> > configuration: --prefix=/usr --disable-debug --disable-static
> > --disable-stripping --enable-avisynth --enable-avresample
> > --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
> > --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype
> > --enable-libfribidi --enable-libgsm --enable-libiec61883
> > --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb
> > --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus
> > --enable-libpulse --enable-libsoxr --enable-libspeex --enable-libssh
> > --enable-libtheora --enable-libv4l2 --enable-libvidstab
> --enable-libvorbis
> > --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
> > --enable-libxcb --enable-libxml2 --enable-libxvid --enable-shared
> > --enable-version3 --enable-omx
> > libavutil 55. 78.100 / 55. 78.100
> > libavcodec 57.107.100 / 57.107.100
> > libavformat 57. 83.100 / 57. 83.100
> > libavdevice 57. 10.100 / 57. 10.100
> > libavfilter 6.107.100 / 6.107.100
> > libavresample 3. 7. 0 / 3. 7. 0
> > libswscale 4. 8.100 / 4. 8.100
> > libswresample 2. 9.100 / 2. 9.100
> > libpostproc 54. 7.100 / 54. 7.100
> > [video4linux2,v4l2 @ 0x55b84fec19c0] Raw : yuyv422 :
> > YUYV 4:2:2 : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
> > 960x540 1280x720
> > [video4linux2,v4l2 @ 0x55b84fec19c0] Compressed: mjpeg :
> > Motion-JPEG : 640x480 320x180 320x240 352x288 424x240 640x360 848x480
> > 960x540 1280x720
> >
> > ------------------------------------------------------------
> > ---------------------------------
> >
> > --
> > *Diego Alonso Uribe Gamez*
> > ------------------------------
> >
> > *Desarrollador web*
> >
> > Twitter: @DiegoUG <http://www.twitter.com/DiegoUG>
> >
> > Google+: +DiegoAlonsoUribeGamez
> > <https://plus.google.com/+DiegoAlonsoUribeGamez>
> > ------------------------------
> >
> >
>
>
> --
> *Diego Alonso Uribe Gamez*
> ------------------------------
>
> *Desarrollador web*
>
> Twitter: @DiegoUG <http://www.twitter.com/DiegoUG>
>
> Google+: +DiegoAlonsoUribeGamez
> <https://plus.google.com/+DiegoAlonsoUribeGamez>
> ------------------------------
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
--
There be monsters out there... consider using PGP/GPG encryption for
confidential communications. My public key can be found here
<https://drive.google.com/file/d/0B9VvIkxWz5nhWkd5SFVUaWZqVWc/view?usp=sharing>
.
More information about the ffmpeg-user
mailing list