Git Product home page Git Product logo

lavfi-preview's People

Contributors

btbn avatar richardpl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lavfi-preview's Issues

swap filename/format order

it seems that the movie-node has a hard time loading webcam/x11grab.
How to reproduce:

  1. create movie node
  2. enter filename /dev/video0 and format v4l2 or video4linux2 (see docs)
  3. enter filename :0.0+100,200 format x11grab (see docs)

Usually hitting ctl+enter makes the output-socket appear, but here it displays error:

Failed to av_format_open_input <filename>
cannot init str for filter

looking at the docs, the fileformat should be passed to ffmpeg first, before passing the inputfile..perhaps that's happening in the reversed order?

z-ordering of nodes

See this screen shot:
image

To repro:

  1. make movie src
  2. make buffersink
  3. click options of movie

This is really two issues:

  1. You note that that buffersink node retains focus, not the movie node i just clicked the options button for
  2. there is some z-ordering issue here. Even though buffersink is topmost and has focus, some of the elements of the movie src (the text input boxes) are drawn on top over it

HiDPI support

I'm using a hidpi screen and lavfi-preview is not hidpi aware (I'm using Windows 10). That means everything is super small. In my own imgui+glfw c++ program, I handle this as follows, feel free to copy and adapt in case you'd like to fix this:

// 1. before opening the glfw window
float highDPIscaleFactor = 1.0;
float xscale, yscale;
glfwGetMonitorContentScale(glfwGetPrimaryMonitor(), &xscale, &yscale);
if (xscale > 1 || yscale > 1) {
    highDPIscaleFactor = xscale;
    glfwWindowHint(GLFW_SCALE_TO_MONITOR, GLFW_TRUE);
}

// 2. after creating imgui context (and before setup Platform/Renderer bindings, but i'm not sure if that's important)
if (highDPIscaleFactor > 1.f) {
    ImGuiStyle& style = ImGui::GetStyle();
    style.ScaleAllSizes(highDPIscaleFactor);
}

This of course does not handle the case of dragging the gui between screens with different dpi, but its something at least.

displaymatrix handling

I tested lavfi-preview with a file source that happened to have the following side data attached to the video stream according to ffprobe:

    Side data:
      displaymatrix: rotation of -90.00 degrees

This was not honored in the playback. I am not aware of how ffmpeg normally handles this. But just in case this is something you instead of the lavfi-preview user should be handling, hereby i've reported it ;) Else just close this.

ffmpeg version compatibility

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+?

remove-button issue

cool project,
Btw. when pressing 'remove' on a movie-source (after clicking options), the application stops on linux:

$ ./lavfi-preview-linux64 `
lavfi-preview-linux64: imnodes/imnodes.cpp:470: void ImNodes::{anonymous}::DrawListActivateNodeBackground(int): Assertion `submission_idx != -1' failed.
Aborted (core dumped)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.