[FFmpeg-user] bitrate=N/A at 640x480, no video recorded

Guilherme de Oliveira Costa guilherme.oliveira at autotrac.com.br
Thu May 11 21:10:29 EEST 2017


I'm trying to record a video at 640x480, but ffmpeg is not working as expected in this case.

My command line:
   ffmpeg -y -s 640x480 -t 00:00:20 -i /dev/video0 out.mpg

The output:
ffmpeg version 2.8.7 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.9.3 (crosstool-NG crosstool-ng-1.22.0)
  libavutil      54. 31.100 / 54. 31.100
  libavcodec     56. 60.100 / 56. 60.100
  libavformat    56. 40.101 / 56. 40.101
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 40.101 /  5. 40.101
  libavresample   2.  1.  0 /  2.  1.  0
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.101 /  1.  2.101
Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 16205.126331, bitrate: 147456 kb/s
    Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 640x480, 147456 kb/s, 30 fps, 30 tbr, 1000k tbn, 1000k tbc
[mpeg @ 0x1130970] VBV buffer size not set, using default size of 130KB
If you want the mpeg file to be compliant to some specification
Like DVD, VCD or others, make sure you set the correct buffer size
Output #0, mpeg, to 'out.mpg':
    encoder         : Lavf56.40.101
    Stream #0:0: Video: mpeg1video, yuv420p, 640x480, q=2-31, 200 kb/s, 30 fps, 90k tbn, 30 tbc
      encoder         : Lavc56.60.100 mpeg1video
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo (native) -> mpeg1video (native))
Press [q] to stop, [?] for help
frame=    1 fps=0.4 q=0.0 size=       0kB time=00:00:00.00 bitrate=N/A

And then it just stays like this. I've checked with strace and the program is stuck in a loop, trying to dequeue the video buffer
( it loops here: ioctl(3, VIDIOC_DQBUF, {type=V4L2_BUF_TYPE_VIDEO_CAPTURE}) = -1 EAGAIN).

Ffmpeg works normally on lower resolutions, though. I've also tested the camera, and it supports this resolution.

>From what I understand, ffmpeg is not being able to get any data from the video device, thus it can't encode the video. Why?

My system specs are: Kernel 3.2.61, 64 MB RAM, 128 MB Storage Space.

Guilherme de Oliveira Costa
Firmware Engineer - Autotrac Comercio Telecomunicacoes
Phone: +55 61 3307 7000 (Extension 2665)

Esta mensagem e qualquer anexo a ela s?o documentos confidenciais e direcionados exclusivamente ao(s) destinat?rio(s). Qualquer uso, desvio, sonega??o, supress?o, revela??o ou divulga??o n?o autorizada ? proibida e sujeita ?s san??es e/ou repara??es legais por ato il?cito (C?digo Penal, Artigos 151 e 152). Caso n?o seja um dos destinat?rios expressamente indicados, por favor entre em contato com o remetente, respondendo este e-mail e destrua quaisquer c?pias da mensagem original. Qualquer opini?o, cr?tica ou an?lise descrita nesta mensagem ? de responsabilidade ?nica do remetente, a menos quando estiver explicitamente expresso que seja da empresa remetente.

This message and any attachment are confidential information for the sole use of the intended recipients. Any unauthorized use, deviation, withholdment, suppression, disclosure or distribution is prohibited and is subjected to legal sanctions and/or compensations per illicit act (Penal Code, articles 151 and 152). If you are not one of the intended recipients, please contact the sender by reply e-mail and destroy any copy of the original message. Any view, comment or analysis expressed in this message is sole responsibility from the sender, except when it's specifically expressed that it's the view, comment or analysis of the company.

More information about the ffmpeg-user mailing list