[FFmpeg-user] Fwd: problem with analyzeduration

Александр Маджугин madzhugin at yandex.ru
Fri Mar 9 17:16:57 CET 2012


Andrey Utkin <andrey.krieger.utkin at gmail.com> писал(а) в своём письме Wed,
07 Mar 2012 14:14:21 +0400:

> 7 марта 2012 г. 1:02 пользователь Маджугин Александр
> <madzhugin at yandex.ru> написал:
>> Hi.
>> I have faced the following problem - i have to make a photo with webcam  
>> and i have to do it quickly.
>> But while running ffmpeg analizes input stream too long - about 2-3 sec.
>> I tried to use the option "-analyzeduration 0", however, it didn't give  
>> any result - ffmpeg analizes input stream anyway.
>> I also tried to describe input stream totally, but it didn't give any  
>> result again.
>>
>> I use the following command:
>> "ffmpeg -f video4linux2,v4l2 -analyzeduration 0 -s 640x480 -qscale 0 -r  
>> 30 -pix_fmt yuyv422 -i /dev/video0 -f image2 -c:v mjpeg -pix_fmt  
>> yuvj422p -vframes 1 out.jpg"
>
> Try adding
> -probesize 0 -fpsprobesize 0
>

If i add -probesize 0 and -fpsprobesize 0, i get:
Если просто добавить -probesize 0 и -fpsprobesize 0, то на получаю:
----------------------------------------------------------------
$ ffmpeg -f video4linux2,v4l2 -analyzeduration 0 -probesize 0
-fpsprobesize 0 -s 640x480 -qscale 0 -r 30 -pix_fmt yuyv422 -i /dev/video0
-f image2 -c:v mjpeg -pix_fmt yuvj422p -vframes 1 out.jpg
...
[video4linux2,v4l2 @ 0x9eb8680] Value 0.000000 for parameter 'probesize'
out of range
[video4linux2,v4l2 @ 0x9eb8680] Error setting option probesize to value 0.
/dev/video0: Numerical result out of range
----------------------------------------------------------------

Minimal value for -probesize, which doesn't cause an error - 32. But it  
does not have any effect:
Минимальное значение для -probesize, которое не вызывает ошибки - 32. Но
оно не дает эффекта:
----------------------------------------------------------------
$ time ffmpeg -f video4linux2,v4l2 -analyzeduration 0 -probesize 32
-fpsprobesize 0 -s 640x480 -qscale 0 -r 30 -pix_fmt yuyv422 -i /dev/video0
-f image2 -c:v mjpeg -pix_fmt yuvj422p -vframes 1 out.jpg
...
real	0m2.328s
user	0m0.108s
sys	0m0.176s
----------------------------------------------------------------

The situation is the same without -probesize:
Без -probesize картина остается такой же:
----------------------------------------------------------------
$ time ffmpeg -f video4linux2,v4l2 -analyzeduration 0 -fpsprobesize 0 -s
640x480 -qscale 0 -r 30 -pix_fmt yuyv422 -i /dev/video0 -f image2 -c:v
mjpeg -pix_fmt yuvj422p -vframes 1 out.jpg
...
real	0m2.332s
user	0m0.112s
sys	0m0.172s
----------------------------------------------------------------


More information about the ffmpeg-user mailing list