Re: [FFmpeg-user] All the video captures are made at a resolution of 176x144

2018-02-26 Thread Lindsey Williams
"-r 1 " is just going to use the input file sampling rate, no?  I don't
think this is a sampling rate problem unless there's signs of "rolling
shutters" or total disconnect in the expected output playback.

"You need to check with V4L utilities or ffmpeg, which formats /
resolutions your v4l2 device provides. I would guess that docker gives you
only an abstraction (it's a kind of virtualization, right?)."

Agree with that.  Cameras are getting smaller and smaller and in order
to get away with that software is used on the the intake signal and
unwrapped/decompressed into larger resolutions as it goes to our screens.
The reason I suggested scaling is because you didn't complain about the
image not making sense... which means ffmpeg was able to decode the stream
and encode it into some format ( maybe not the ideal one. )  My guess is
that the pre-packaged web cam software driver might perform a software
unwrapping of the data, which allows it to have a higher resolution than
perhaps something you can grab from ffmpeg.  That proprietary software
might also preform a scaling operation using a nice/custom filter to up-rez
it so that they can claim it has X resolution even though the raw data
might not actually be that.  I have not heard about this problem with web
cams but it is a conversation I've witnessed when people get data from
cameras mounted on drones.

On Mon, Feb 26, 2018 at 9:05 AM, Moritz Barsnick  wrote:

> On Fri, Feb 23, 2018 at 00:34:26 -0500, DiegoUG wrote:
> > 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:
>
> You need to check with V4L utilities or ffmpeg, which formats /
> resolutions your v4l2 device provides. I would guess that docker gives
> you only an abstraction (it's a kind of virtualization, right?).
> Perhaps you only get USB 1.1, and that doesn't allow for your device's
> larger resolutions (despite "-r 1"). Hmm, just guessing.
>
> Moritz
> ___
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-requ...@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

.
___
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-user] All the video captures are made at a resolution of 176x144

2018-02-26 Thread Lindsey Williams
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  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 :
>
> > 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
> >   libavformat57. 83.100 / 57. 83.100
> >   libavdevice57. 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
> >   libpostproc54.  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/20 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
> >   libavformat57. 83.100 / 57. 83.100
> >   libavdevice57. 10.100 / 57. 10.100
> >   libavfilter 6.107.100 /  6.107.100
> >   libavresample   3.  7.  0 /