Open snod opened 6 years ago
After a little investigating and tweaking it seams that, if I change the input_format
to mjpeg
, the stream works. However my pi will crash shortly after. It is just a RP1, maybe I will try with a different pi revision.
Are the supported version tied to the used cam, the pi revision or the software used?
what is the output of avplay -f video4linux2 -list_formats all /dev/video0
?
Using -input_format h264
is what makes this work on 1st generation pis (it uses the h264 hardware encoding).
If all you need on the pi is the camera you could use this image.
+1 here on this request -- I couldn't manage to get ffmpeg
installed on a Pi Zero W running Rasbian Stretch. Thanks!
Sorry for the late reply.
The output is as follows:
root@raspberrypi:/home/pi# avplay -f video4linux2 -list_formats all /dev/video0
avplay version 11.12-6:11.12-1~deb8u1+rpi1, Copyright (c) 2003-2018 the Libav developers
built on Feb 21 2018 04:51:45 with gcc 4.9.2 (Raspbian 4.9.2-10+deb8u1)
[video4linux2 @ 0xb2500480] R : yuv420p : Planar YUV 4:2:0 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : yuyv422 : YUYV 4:2:2 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : rgb24 : 24-bit RGB 8-8-8 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] C : mjpeg : JFIF JPEG : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] C : Unsupported : H.264 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] C : mjpeg : Motion-JPEG : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : Unsupported : YVYU 4:2:2 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : Unsupported : VYUY 4:2:2 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : uyvy422 : UYVY 4:2:2 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : nv12 : Y/CbCr 4:2:0 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : bgr24 : 24-bit BGR 8-8-8 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : Unsupported : Planar YVU 4:2:0 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : Unsupported : Y/CrCb 4:2:0 : {32-2592, 2}x{32-1944, 2}
[video4linux2 @ 0xb2500480] R : bgra : 32-bit BGRA/X 8-8-8-8 : {32-2592, 2}x{32-1944, 2}
/dev/video0: Immediate exit requested
root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 4.9.35+ #1014 Fri Jun 30 14:34:49 BST 2017 armv6l GNU/Linux
I am not sure why h264 is listed as unsupported, maybe the pi is too old?
This should work on all Pis - it probably is avconv that does not support it (yet)
Because you can not install
ffmpeg
anymore without hassle I installedavconv
(fromlibav-tools
). It is mostly identical toffmpeg
.Stills work fine, however the streams do not work and fail with the following error:
It would be nice to have
avconv
support, too.