[Libav-user] howto play lavfi complexfilter-script in c++

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Libav-user] howto play lavfi complexfilter-script in c++

Leon van Kammen
Hi All,

FFmpeg c++ newbie here, I've just joined this wonderful mailinglist, and have a mission:
Im trying to get the c++ equivalent of this amazing cmd:

$ ffmpeg -filter_complex_script script.txt test.mp4

testsrc=r=5:n=1:d=2 [v1];
sine=440:b=2:d=1    [a1];
testsrc=r=5:n=1:d=1 [v2];
sine=622:b=2:d=2    [a2];
testsrc=r=5:n=1:d=1 [v3];
sine=880:b=2:d=1    [a3];

[v1][a1][v2][a2][v3][a3] concat=v=1:a=1:n=3
I've tried reading the ffmpeg source, some c++ examples, but without any results.
I'm stuck fiddling with avformat_open_input(&format, "lavfi", NULL, NULL).

1. any tips where to look?
2. how do i read frames from lavfi-streams from the filtergraph? avcodec_decode_video2()? avcodec_receive_frame()?

My shtick is: I want to play a filtergraph-file in my qt-app (so I can use movie/amovie/crossfade/mix/blend nodes).
The good news is : playing one simple videofile works using avformat_open_input.
However, I want to refactor it to render a complex-filter-script like above instead.
This would be much more powerful, so I any pointers are very welcome!

Thanks for being awesome.


Libav-user mailing list
[hidden email]

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".