Skip to content

Compiling on aarch64 raspberry pi #39

Description

@chriskosinski
  1. Preparation for install:
    pi@raspi:~/ $ git clone https://github.com/klaxa/mkvserver_mk2
    cd mkvserver_mk2
    pi@raspi:~/mkvserver_mk2 $ sudo apt install libavformat-dev libavcodec-dev libavutil-dev
  2. make and errors:
pi@raspi:~/mkvserver_mk2 $ make
cc -g -Wall `pkg-config --cflags libavformat libavcodec libavutil` -pthread -c segment.c
segment.c: In function ‘segment_init’:
segment.c:108:5: error: unknown type name ‘AVCodecContext’; did you mean ‘AVIODirContext’?
  108 |     AVCodecContext *codec_ctx;
      |     ^~~~~~~~~~~~~~
      |     AVIODirContext
segment.c:111:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  111 |     seg->ifmt = fmt->iformat;
      |               ^
segment.c:129:34: error: assignment of member ‘flags’ in read-only object
  129 |     seg->fmt_ctx->oformat->flags &= AVFMT_NOFILE;
      |                                  ^~
segment.c:137:25: error: implicit declaration of function ‘avcodec_alloc_context3’; did you mean ‘avio_alloc_context’? [-Wimplicit-function-declaration]
  137 |             codec_ctx = avcodec_alloc_context3(NULL);
      |                         ^~~~~~~~~~~~~~~~~~~~~~
      |                         avio_alloc_context
segment.c:137:23: error: assignment to ‘int *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
  137 |             codec_ctx = avcodec_alloc_context3(NULL);
      |                       ^
segment.c:138:13: error: implicit declaration of function ‘avcodec_parameters_to_context’; did you mean ‘avcodec_parameters_copy’? [-Wimplicit-function-declaration]
  138 |             avcodec_parameters_to_context(codec_ctx, in_stream->codecpar);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |             avcodec_parameters_copy
segment.c:139:69: error: request for member ‘codec’ in something not a structure or union
  139 |             out_stream = avformat_new_stream(seg->fmt_ctx, codec_ctx->codec);
      |                                                                     ^~
segment.c:141:13: error: implicit declaration of function ‘avcodec_free_context’; did you mean ‘avformat_free_context’? [-Wimplicit-function-declaration]
  141 |             avcodec_free_context(&codec_ctx);
      |             ^~~~~~~~~~~~~~~~~~~~
      |             avformat_free_context
make: *** [Makefile:15: segment.o] Error 1

I've tried installing ffserver from the ffmpeg 3.4 branch, but there's a lot more problems than you see in log above. Also, from my understanding this is a legit replacement for ffserver. Was anyone successful at compiling it on Rpi4?

Activity

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