Skip to content

update to support libav10 #17

Open

Description

@infinity0

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_*.

Activity

  1. infinity0 commented on Mar 13, 2014

    @infinity0
    Author

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

  2. added a commit that references this issue on Aug 23, 2015
  3. added a commit that references this issue on Sep 24, 2016
    02bda9d
  4. cameroncking commented on Mar 4, 2019

    @cameroncking

    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.

  5. tosiara commented on Mar 4, 2019

    @tosiara

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

  6. cameroncking commented on Mar 9, 2019

    @cameroncking

    @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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions