Skip to content
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

update to support libav10 #17

Open
infinity0 opened this issue Mar 13, 2014 · 4 comments
Open

update to support libav10 #17

infinity0 opened this issue Mar 13, 2014 · 4 comments

Comments

@infinity0
Copy link

libav10 has dropped support for the CODEC_ID_* macros, renaming them to AV_CODEC_ID_*.

We can restore support just by replacing the relevant expressions in ffmpeg.c, but you might want to use a conditional macro instead. Here is the relevant entry from doc/APIchanges:

2012-08-07 - 104e10f - lavc 54.25 - avcodec.h
  Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
@infinity0
Copy link
Author

You probably also want to update avcodec__frame. While not removed from libav10, they have been deprecated and will be removed later.

dfries added a commit to dfries/motion that referenced this issue Aug 23, 2015
Update for libav10 API
Author: Ximin Luo <[email protected]>
Bug: sackmotion#17
mterzo pushed a commit to mterzo/motion-orig that referenced this issue Sep 24, 2016
When jpeg-turbo was enabled, LIBS was uncorrectly set: -lpthread, -lm,
... was lost. Same issue with CFLAGS.

Fixes sackmotion#17.

Signed-off-by: Fabrice Fontaine <[email protected]>
@ckxng
Copy link

ckxng commented Mar 4, 2019

This commit should allow you to compile on rasbian debian stretch, which uses ffmpeg 3.2.12 and includes the changes you referenced above.

Note also that the function used for deinterlacing is also no longer available and an alternate method must be used if you will be handling interlaced video. Since I have no interest in deinterlacing, I just pulled that code out and left a note behind.

This has been tested using ckxng/motion:mmal-ffmpeg-3.2.12 and the instructions in BUILD-HOWTO, on a Raspberry PI 3 B+ using an up-to-date image with the following properties:

$ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
$ dpkg -l ffmpeg libavcodec57
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
ii  ffmpeg         7:3.2.12-1~d armhf        Tools for transcoding, streaming
ii  libavcodec57:a 7:3.2.12-1~d armhf        FFmpeg library with de/encoders f
$ uname -a
Linux mirror01 4.19.25-v7+ #1205 SMP Mon Feb 25 18:19:20 GMT 2019 armv7l GNU/Linux

With a Pi Camera Module 2 (8MP), I am able to process motion on a smaller 410x308 image, and output full size 3280x2464 images using mmalcam_secondary_buffer_upscale and output_secondary_pictures. I am also running at 10% CPU while waiting for motion/30% during an event, instead of maxing out one of my cores at 100% all the time.

@tosiara
Copy link

tosiara commented Mar 4, 2019

@ckxng, please check the latest motion code base: https://github.com/Motion-Project/motion

@ckxng
Copy link

ckxng commented Mar 9, 2019

@tosiara I see. It appears that the official Motion codebase now supports Raspberry PI cameras with MMAL, and Raspbian simply is lagging behind. In that case, I will simply use a recent release of the upstream project instead. Thank you for that pointer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants