I have a master video I wish to take a clip out of and on that clip place
an overlay (mostly transparent png file).

Does this need to be a two step process, first creating the clip, then
reading it in and adding the overlay, or can it be combined into one step
to save time?

To create the clip I have successfully used this command (in Kotlin):
val cmd = "-ss $start -t $duration -accurate_seek -i $inputFile -codec copy
-avoid_negative_ts 1 $outputFile"

val command = cmd.split(" ".toRegex()).dropLastWhile { it.isEmpty()
}.toTypedArray()

FFmpeg.getInstance(context).execute(command, object :
ExecuteBinaryResponseHandler() {...}


For the overlay, I know I need to do something like this:

val cmd2 = "-y -i $sourceMp4 -i overlayImage.png -filter_complex
\"[1]format=bgra,colorchannelmixer=aa=1,rotate=0:c=black@0:ow=rotw(0):oh=roth(0)[overlayImage];[0][overlayImage]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2\"
$outputFileMp4"


Can those two be commands be combined?

Thanks.
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to