Reputation: 1395
I am a newbie in Flutter. I am working on applications like Instagram/TikTok in which I am stuck with one issue that is Duet Video
I have created Video Recording functionality using Img.ly SDK.
I am also using FFmpeg library to give my own audio file to recorded video. But now I want to create functionality of Duet Video same as TikTok.
Anyone can suggest a way to do it in Flutter?
Upvotes: 4
Views: 780
Reputation: 1395
I did achieve it using:
final filter =
" [0:v]scale=480:640,setsar=1[l];[1:v]scale=480:640,setsar=1[r];[l][r]hstack;[0][1]amix -vsync 0 ";
FlutterFFmpeg().execute(" -y -i " +
"[YOUR_LEFT_VIDEO_FILE_PATH]" +
" -i " +
"[YOUR_RIGHT_VIDEO_FILE_PATH]" +
" -filter_complex" +
filter +
"[YOUR_OUTPUT_VIDEO_FILE_PATH]")
Upvotes: 2
Reputation: 175
you can achive that with filter_complex hstack
Example:
ffmpeg -i 1.mp4 -i 2.mp4 -filter_complex hstack duet.mp4
Upvotes: 1