New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for avconv in favor of ffmpeg deprecation #27

Open
snod opened this Issue Apr 5, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@snod

snod commented Apr 5, 2018

Because you can not install ffmpeg anymore without hassle I installed avconv (from libav-tools). It is mostly identical to ffmpeg.

Stills work fine, however the streams do not work and fail with the following error:

Apr 05 11:42:06 raspberrypi homebridge[654]: -f video4linux2 -input_format h264 -video_size 1280x720 -framerate 30 -i /dev/video0 -vcodec copy -an -payload_type 99 -ssrc 1 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params gCky11lr1Ao/sM3zOQOAug2geKdTuLF1WzdQyNsX srtp://10.0.10.11:60722?rtcpport=60722&localrtcpport=60722&pkt_size=1378
Apr 05 11:42:07 raspberrypi homebridge[654]: ffmpeg avconv version 11.12-6:11.12-1~deb8u1+rpi1, Copyright (c) 2000-2018 the Libav developers
Apr 05 11:42:07 raspberrypi homebridge[654]: ffmpeg   built on Feb 21 2018 04:51:45 with gcc 4.9.2 (Raspbian 4.9.2-10+deb8u1)
Apr 05 11:42:07 raspberrypi homebridge[654]: ffmpeg [video4linux2 @ 0x7472a0] Cannot find a proper format for codec_id 28, pix_fmt -1.
Apr 05 11:42:07 raspberrypi homebridge[654]: ffmpeg /dev/video0: Input/output error

It would be nice to have avconv support, too.

@snod

This comment has been minimized.

snod commented Apr 6, 2018

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?

@moritzmhmk

This comment has been minimized.

Owner

moritzmhmk commented Apr 8, 2018

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.

@jeffvautin

This comment has been minimized.

jeffvautin commented Apr 15, 2018

+1 here on this request -- I couldn't manage to get ffmpeg installed on a Pi Zero W running Rasbian Stretch. Thanks!

@snod

This comment has been minimized.

snod commented Apr 16, 2018

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?

@moritzmhmk

This comment has been minimized.

Owner

moritzmhmk commented May 10, 2018

This should work on all Pis - it probably is avconv that does not support it (yet)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment