[FFmpeg-user] ffmpeg -f fbdev doesn't work with some fb drivers

Dan Flett dflett at bigpond.net.au
Wed Jul 10 13:50:43 CEST 2013


> -----Original Message-----
> From: ffmpeg-user-bounces at ffmpeg.org [mailto:ffmpeg-user-
> bounces at ffmpeg.org] On Behalf Of Stefano Sabatini
> Sent: Tuesday, 28 August 2012 01:56
> To: FFmpeg user questions
> Subject: Re: [FFmpeg-user] ffmpeg -f fbdev doesn't work with some fb
> drivers
> 
> On date Monday 2012-08-27 19:14:58 +0000, Xeslaro encoded:

..snip

> >   however, when i wanna grab something using ffmpeg -f fbdev -i
> >   /dev/fb0, ffmpeg just complains that the pixel format couldn't be
> >   recognized.
> >
> >   i used the exactly the ffmpeg binary running on anther computer
> >   with intel 945gm integrated graphics card, and ffmpeg -f fbdev -i
> >   /dev/fb0 just worked fine.
> 
> >   are there some limitations in ffmpeg with framebuffer device?
> >   anyway to solve that problem? thanks.
> 
> I implemented only the formats which I could test. Can you debug the
device
> and test the information passed to get_pixfmt_from_fb_varinfo()? It should
> be rather easy to add an entry to the rgb_pixfmt_map array in fbdev.c.
> 

Hi ,
I'm trying to use the fbdev format on the Raspberry Pi  (Raspbian).  When I
try to to a screen grab or screencast I too get told "pixel format not
supported".

pi at raspberrypi ~/videos/test $ /usr/local/bin/ffmpeg -f fbdev -frames:v 1 -r
1 -i /dev/fb0 screenshot.jpeg
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul  9 2013 14:47:41 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration:
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
[fbdev @ 0xeae430] Framebuffer pixel format not supported.
/dev/fb0: Invalid argument

But I've discovered that this does work:

pi at raspberrypi ~/videos/test $ /usr/local/bin/ffmpeg -f rawvideo -codec:v
rawvideo -s 1680x1050 -pix_fmt rgb565le -frames:v 1 -r 1 -i /dev/fb0
screenshot-ff01.bmp
ffmpeg version 1.2.1 Copyright (c) 2000-2013 the FFmpeg developers
  built on Jul  9 2013 14:47:41 with gcc 4.6 (Debian 4.6.3-14+rpi1)
  configuration:
  libavutil      52. 18.100 / 52. 18.100
  libavcodec     54. 92.100 / 54. 92.100
  libavformat    54. 63.104 / 54. 63.104
  libavdevice    54.  3.103 / 54.  3.103
  libavfilter     3. 42.103 /  3. 42.103
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
[rawvideo @ 0x2a835d0] Estimating duration from bitrate, this may be
inaccurate
Input #0, rawvideo, from '/dev/fb0':
  Duration: N/A, start: 0.000000, bitrate: 28224 kb/s
    Stream #0:0: Video: rawvideo (RGB[16] / 0x10424752), rgb565le,
1680x1050, 28224 kb/s, 1 tbr, 1 tbn, 1 tbc
Output #0, image2, to 'screenshot-ff01.bmp':
  Metadata:
    encoder         : Lavf54.63.104
    Stream #0:0: Video: bmp, rgb565le, 1680x1050, q=2-31, 200 kb/s, 90k tbn,
1 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (rawvideo -> bmp)
Press [q] to stop, [?] for help
[rawvideo @ 0x2a8c3a0] Invalid buffer size, packet size 20160 < expected
length 3528000
Error while decoding stream #0:0: Invalid argument
frame=    1 fps=0.4 q=0.0 Lsize=N/A time=00:00:01.00 bitrate=N/A
video:3445kB audio:0kB subtitle:0 global headers:0kB muxing overhead
-100.000624%

So it looks like the Raspberry Pi uses pixel format rgb565le.  But I can't
use this to create a video stream (I want to pipe it into gstreamer and use
the omxh264enc encoder).

Can I help fix this?  If so, you'll have to take me through the debug steps
as I'm not much of  a c coder at all. :)

Cheers,

Dan



More information about the ffmpeg-user mailing list