ffmpeg video4linux2 at specified resolution

Posted by wim on Super User See other posts from Super User or by wim
Published on 2012-11-20T14:04:50Z Indexed on 2012/11/20 23:06 UTC
Read the original article Hit count: 329

Filed under:
|
|
|

When I'm trying to record a clip from my webcam, using:

ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 /tmp/spam.avi

I get annoying problem with very low resolution video, and there is a message from ffmpeg saying:

[video4linux2,v4l2 @ 0x2bff3e0] The V4L2 driver changed the video from 800x600 to 176x144

I have tried not specifying -s, or trying other sizes like 800x600, and always it forces me back to 176x144. Why is this and how can I prevent it? My webcam is one of those Logitech 9000 Pro, I know it supports better resolutions than this and I can see with v4l2-ctl --list-formats-ext that it goes up to at least 800x600.


edit: complete console output follows

wim@wim-desktop:~$ ffmpeg -f video4linux2 -s 640x480 -i /dev/video0 /tmp/spam.avi
ffmpeg version git-2012-11-20-70c0f13 Copyright (c) 2000-2012 the FFmpeg developers
  built on Nov 21 2012 00:09:36 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3
  libavutil      52.  8.100 / 52.  8.100
  libavcodec     54. 73.100 / 54. 73.100
  libavformat    54. 37.100 / 54. 37.100
  libavdevice    54.  3.100 / 54.  3.100
  libavfilter     3. 23.101 /  3. 23.101
  libswscale      2.  1.102 /  2.  1.102
  libswresample   0. 17.100 /  0. 17.100
  libpostproc    52.  2.100 / 52.  2.100
[video4linux2,v4l2 @ 0x37a33e0] The V4L2 driver changed the video from 640x480 to 176x144
[video4linux2,v4l2 @ 0x37a33e0] Estimating duration from bitrate, this may be inaccurate
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 37066.740548, bitrate: 6082 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 176x144, 6082 kb/s, 15 tbr, 1000k tbn, 15 tbc
File '/tmp/spam.avi' already exists. Overwrite ? [y/N] y
Output #0, avi, to '/tmp/spam.avi':
  Metadata:
    ISFT            : Lavf54.37.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 176x144, q=2-31, 200 kb/s, 15 tbn, 15 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> mpeg4)
Press [q] to stop, [?] for help
frame=   95 fps= 22 q=2.0 Lsize=      88kB time=00:00:13.86 bitrate=  51.8kbits/s    
video:77kB audio:0kB subtitle:0 global headers:0kB muxing overhead 13.553706%

© Super User or respective owner

Related posts about resolution

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More