[FFmpeg-user] chwe17/FFmpeg-Cedrus can't open my webcam?

Moritz Barsnick barsnick at gmx.net
Mon May 14 17:27:48 EEST 2018


On Mon, May 14, 2018 at 15:48:18 +0200, cedric.dewijs at telfort.nl wrote:
> I have a bananapi, running Armbian 5.38. I have done the following steps to compile ffmpeg:
> git clone https://github.com/chwe17/FFmpeg-Cedrus.git

I would like to claim: If you have issues with that fork of ffmpeg, why
don't you ask there? (Honest question.) That said, that repo isn't even
a proper fork, so it's hard to understand what they changed...but okay.

It's apparently based on a quite old version of ffmpeg, so you'll have
an extremely hard time getting support here. For all we know, any
issues may have been fixed in a long time!

(Cedrus:)
> cedric at bananapi:~$ ffmpeg -i /dev/video0 -c:v cedrus264 -b:v 1000k -vewait 1000 -f h264 test.h264
[...]
(armbian:)
> cedric at bananapi:~/new/FFmpeg-Cedrus$ ffmpeg -b:v 1000k -f h264 test.h264 -i /dev/video0 
[...]
(Cedrus:)
> cedric at bananapi:~/new/FFmpeg-Cedrus$ ./ffmpeg -v debug  -c:v cedrus264 -b:v 1000k -vewait 1000 -f h264 test.h264 -i /dev/video0 

You order of inputs and outputs in the third command line confuses me.
It might work (does it), but I expect
$ ffmpeg [input options] -i input [output options] output

Have you tried:
$ ffmpeg -i /dev/video0 -f null -
with the Cedrus version (skipping the special encoder)?

This site:
http://linux-sunxi.org/FFmpeg
where the Cedrus patch comes from recommends this:
$ ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 [...]
Have you tried that?

Furthermore:
(armbian:)

> Then I uninstall and reinstall ffmpeg from armbian, so I can test if my webcam itself is to blame. I see this works correctly, but it does not have the options -c:v cedrus264 and -vewait:
> cedric at bananapi:~/new/FFmpeg-Cedrus$ ffmpeg -b:v 1000k -f h264 test.h264 -i /dev/video0 
> ffmpeg version 2.8.14-0ubuntu0.16.04.1 Copyright (c) 2000-2018 the FFmpeg developers

This is extremely old. Can you get hold of a newer binary build for
armbian? ffmpeg-4.0 or recent ffmpeg git, if possible.

> Where can I get a version of ffmpeg that uses the h264 hardware encoder for the Allwinner A20 SOC on the bananapi?

Assuming that Cedrus code used to work - http://linux-sunxi.org/FFmpeg
hints that is was experimental and is unmaintained - you could try to
port their changes to recent ffmpeg. The feasibility of this would be
easier to check if those guys&gals had made it clear which version of
ffmpeg their code is based on[*]. Sigh.

Cheers,
Moritz

[*] This could be some sort of indication:
  libavutil      54.  6.100 / 54.  6.100
  libavcodec     56.  0.101 / 56.  0.101
  libavformat    56.  2.100 / 56.  2.100
  libavdevice    56.  0.100 / 56.  0.100
  libavfilter     5.  0.102 /  5.  0.102
  libswscale      3.  0.100 /  3.  0.100
  libswresample   1.  1.100 /  1.  1.100
  libpostproc    53.  0.100 / 53.  0.100


More information about the ffmpeg-user mailing list