richardpl/lavfi-preview

ffmpeg version compatibility

legraphista opened this issue · 2 comments

Hey, awesome project and i've been waiting for something like this for the past 5 years :D

I am running ffmpeg (and shared libraries) at 4.2.4, and I have some build issues

Build log
root@6dee3e1d8ada:~/app# make
g++ -Iimgui -Iimgui/backends -Iimnodes -g -Wall -Wformat `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags glfw3` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libavutil` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libavcodec` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libavformat` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libswresample` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libswscale` `pkg-config --with-path=/usr/local/lib/pkgconfig --cflags libavfilter` -c -o main.o main.cpp
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
/bin/sh: 1: pkg-config: not found
main.cpp: In function 'bool is_simple_filter(const AVFilter*)':
main.cpp:502:9: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  502 |     if (avfilter_filter_pad_count(filter, 0) == 1 &&
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~
      |         avfilter_pad_count
main.cpp: In function 'bool is_source_filter(const AVFilter*)':
main.cpp:530:10: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  530 |     if ((avfilter_filter_pad_count(filter, 0)  > 0  ||  (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) ||
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
      |          avfilter_pad_count
main.cpp: In function 'bool is_sink_filter(const AVFilter*)':
main.cpp:540:10: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  540 |     if ((avfilter_filter_pad_count(filter, 0)  > 0  ||  (filter->flags & AVFILTER_FLAG_DYNAMIC_INPUTS)) &&
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
      |          avfilter_pad_count
main.cpp: In function 'bool is_source_audio_filter(const AVFilter*)':
main.cpp:551:34: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  551 |         for (unsigned i = 0; i < avfilter_filter_pad_count(filter, 1); i++) {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  avfilter_pad_count
main.cpp: In function 'bool is_source_video_filter(const AVFilter*)':
main.cpp:565:34: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  565 |         for (unsigned i = 0; i < avfilter_filter_pad_count(filter, 1); i++) {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  avfilter_pad_count
main.cpp: In function 'bool is_sink_audio_filter(const AVFilter*)':
main.cpp:579:34: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  579 |         for (unsigned i = 0; i < avfilter_filter_pad_count(filter, 0); i++) {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  avfilter_pad_count
main.cpp: In function 'bool is_sink_video_filter(const AVFilter*)':
main.cpp:593:34: error: 'avfilter_filter_pad_count' was not declared in this scope; did you mean 'avfilter_pad_count'?
  593 |         for (unsigned i = 0; i < avfilter_filter_pad_count(filter, 0); i++) {
      |                                  ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                  avfilter_pad_count
main.cpp: In function 'void draw_node_options(FilterNode*)':
main.cpp:911:18: error: 'AV_OPT_TYPE_CHLAYOUT' was not declared in this scope; did you mean 'AV_OPT_TYPE_COLOR'?
  911 |             case AV_OPT_TYPE_CHLAYOUT:
      |                  ^~~~~~~~~~~~~~~~~~~~
      |                  AV_OPT_TYPE_COLOR
main.cpp: In function 'void show_commands(bool*)':
main.cpp:1268:48: error: 'AV_OPT_FLAG_RUNTIME_PARAM' was not declared in this scope; did you mean 'AV_OPT_FLAG_SUBTITLE_PARAM'?
 1268 |                             if (!(opt->flags & AV_OPT_FLAG_RUNTIME_PARAM))
      |                                                ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                AV_OPT_FLAG_SUBTITLE_PARAM
make: *** [Makefile:61: main.o] Error 1

Is this compatible only with ffmpeg 5+?

Developed on ffmpeg master. But I think it will compile with FFmpeg 5.0 too (master FFmpeg have some source filters fixes for setting frame_rate of outlinks, so if you can, pick that one instead of 5.0). Anything older than 5.0 is not supported.

mentioned ffmpeg version in readme.md file.