Page 1 of 1

Split-Screen Video

Posted: Tue Dec 01, 2015 1:42 pm
by kenny
Hello, I have succesfully rewritten a command that combines two videos to a horizontal splitscreen in ffmpeg, using this:

Code: Select all

ffmpeg -i bf3Sample1.mp4 -s 850x480 -vf "scale=850:240 [inScale]; color=c=black@1.0:s=850x480:r=29.97:d=30.0 [bg]; movie=bf3Sample2.mp4, scale=850:240 [vid2]; [bg][vid2] overlay=0:0 [basis1]; [basis1][inScale] overlay=0:240" splitScreenOut.mp4
Image

(Please ignore the stretching for now, will be fixed)
Now I want to create that as a workflow in Ffasttrans (because it hast to be usable by non-techies) but I don't know where to start because I am new to the program. Would you say that it is even possible with FFAStrans or should I look for other software solutions?

Thanks in advance, Kenny :)

PS: Additional information on understanding the command by the Inventor:
OK lets explain this. We input the file bf3Sample1.mp4 and explicitly tell ffmpeg we want it to be of size (-s) 850x480. -vf starts the video filter process. The first command scales everything before the video filter to 850x240. We then name the result inScale. Next,mcolor generates a black image 850x480. The reason for this is to provide a full resolution backdrop for overlaying video on. We name the full screen backdrop bg. the backdrop is set to the color black, with an alpha value of 1 (it cannot be seen through), a size of 850x480, a frame rate of 29.97, a duration of 30 seconds. The next command is the very valuable movie command which allows us to load other images and videos into a filter chain. For our sample we load the second video. In the same series we also then scale that video to 850x240 and finally name it vid2. We finally get to the magic after that. We set bg and vid2 as inputs to the first overlay command. bg having vid2 overlayed on top of it at coordinates 0,0. We then name this result basis1. We then do a second overlay, (this is for the bottom part of our final video). Our next overlay uses the basis1 which is the black video and the top portion of our split screen. We take the original input video that has been scaled and named inScale and put it on top of our already top portion on black. This overlay puts the input video at 0, 240....we then finally get our output split screen video!

Re: Split-Screen Video

Posted: Tue Dec 01, 2015 3:55 pm
by admin
Hi kenny and thank you for using FFAStrans! :-)

I think this is doable in FFAStrans as long as you can construct a second name from the original file picked up by FFAStrans. F.ex:

If your initial file is "bf3Sample1.mp4" you can construct "bf3Sample1_2.mp4" using the variables "%original_name%_2.%original_ext%"

Now you need to set up a "Folder"-monitor that looks for "*1.mp4" files in the, lets say "D:\GameVideo" folder.

Then create a "Custom FFmpeg"-encoder preset with this line:

-s 850x480 -vf "scale=850:240 [inScale]; color=c=black@1.0:s=850x480:r=29.97:d=30.0 [bg]; movie='D\:\\GameVideo\\%original_name%_2.%original_ext%', scale=850:240 [vid2]; [bg][vid2] overlay=0:0 [basis1]; [basis1][inScale] overlay=0:240"

Before execution it will be translated into this:

ffmpeg.exe -i "D:\GameVideo\bf3Sample1.mp4" -s 850x480 -vf "scale=850:240 [inScale]; color=c=black@1.0:s=850x480:r=29.97:d=30.0 [bg]; movie='D\:\\GameVideo\\bf3Sample1_2.mp4',scale=850:240 [vid2]; [bg][vid2] overlay=0:0 [basis1]; [basis1][inScale] overlay=0:240"


Now, for this workflow to work the second file must be present when the monitor picks up the first. Also the name for the second file must always be the same as the first but with added "_2", or whatever you prefer.

The output name is initially the same as the input but can be changed in the "Folder"-delivery node.


I'm not able to try this at the moment but I'm keen to know how it works out for you :-)

-steipal

Re: Split-Screen Video

Posted: Tue Dec 01, 2015 5:27 pm
by kenny
Thank you for the superquick reply! This sound exactly like what I need.
I can test it tomorrow and will let you know if it works :)