richardpl / lavfi-preview Goto Github PK
View Code? Open in Web Editor NEWGUI for libavfilter
License: MIT License
GUI for libavfilter
License: MIT License
it seems that the movie-node has a hard time loading webcam/x11grab.
How to reproduce:
/dev/video0
and format v4l2
or video4linux2
(see docs):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?
To repro:
This is really two issues:
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.
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.
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
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+?
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.