[1.5 version] Multi-input FFmpegFrameFilter initialization error:avfilter_graph_config() error -22
#1,214 opened on May 27, 2019
Repository metrics
- Stars
- (6,985 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
I wanted to mix two audios into a single one, I used the FFmpegFrameFilter to do this.
my javacv version:
javaCVVersion := "1.5" javaCppVersion := "1.5"
here's my code:
val filterStr = "amix=inputs=2"
val filter = new FFmpegFrameFilter(filterStr, 2)
filter.start()
when start() executed, an exception occurred:
org.bytedeco.javacv.FrameFilter$Exception: avfilter_graph_config() error -22 at org.bytedeco.javacv.FFmpegFrameFilter.startAudioUnsafe(FFmpegFrameFilter.java:464) at org.bytedeco.javacv.FFmpegFrameFilter.startUnsafe(FFmpegFrameFilter.java:271) at org.bytedeco.javacv.FFmpegFrameFilter.start(FFmpegFrameFilter.java:251)
But when I change the filterStr to "amix=inputs=1", the input becomes a single one, the exception won't occur.
I tried some other filter strings, and I found single input works well, but when it comes to multiple input situations, the filter can't start successfully, and this exception occurs.
Btw, I mixed two mp3 audios successfully using ffmpeg command line with the same filter aforementioned.
Any Initialization steps I missed when I tried to use the multi-input FFmpegFrameFilter? Or the "amix" filter cannot be used yet?