The below video is the input material I want in a video. But I want the first image of the video to be side by side with the video section of the video on a white background (so the top section of the video with the circles, want that whited out) , and I want this to be a format that I can simply record my desktop everyday what I'm eating and adjust the above settings on the fly with new screen recordings and the same inputs.
If you follow
so just the first image next to the second image, but the second part of the video, the actual recording, would be side by side with the first image. If that makes sense?
http://www.mediafire.com/watch/itlysu3b4y4tn8s/Jan_20_Crono.mkv
+ Reply to Thread
Results 1 to 21 of 21
-
-
You may consider ffmpeg as OK - it can create white video background (pad) and overlay your capture on top at arbitrary position. At the same time it may encode this to some modern format (h.264 + mkv). As a script it may work automatically so all you need to do is drag and drop your capture on script.
-
You mean something like this?:
In that image I cropped away the circles at the top of the frame but that leads to a problem. There are some parts of the video where a popup window appears in that area -- so it gets cropped away too. It will be much harder to eliminate the circles and keep the full popup window. I'd recommend you just keep the circles.
I did that in AviSynth:
Code:ffVideoSource("Jan 20 Crono.mkv") left = Crop(400,0,-0,-0).AddBorders(0,0,400,0,Color=$FFFFFF).Trim(8,8).Loop(1074,0,0) right = Crop(726,108,720,948).Trim(124,0) Overlay(left, right, x=1100, y=80)
-
Yes that is exactly what I wanted! Thanks man! Appreciate the effort. I'm in premiere I really should have mentioned that.
I would ideally want the circles removed if this is a process that can happen. I'll be doing a video series over several months so it isn't just a once off so if I can have a template where I'll be able to just screen record and then just add it into a template that I can just put it together effortlessly if possible?
I don't know how to use AviSynth. I'll learn how to use it I guess if I have to but is there a way I can do this in premiere? Is this the type of thing I would need after affects for? -
I guess what I'm describing pandy has suggested via ffmpeg. Again I don't know how to use that. If this is a matter of spending 20 minutes on doing this for someone I'd be happy to chuck someone $20 or whatever is reasonable price to help me with this so I can just use the template in the future.
-
Here's a slight modification of the script I used:
Code:ffVideoSource("Jan 20 Crono.mkv") right = Crop(726,108,720,948).Trim(124,0) left = Crop(400,0,-0,-0).AddBorders(0,0,400,0,Color=$FFFFFF).Trim(8,8).Loop(right.framecount,0,0) Overlay(left, right, x=1100, y=80)
The second line creates a new video called right that crops the video down to just the part of the picture we want to place on the right. It also cuts off the first 124 frames which contain the part of the frame we want to put on the left.
The third line makes a new video called right that crops the original video down to just the part of the frame we want to put on the left. It extends the right edge of the frame enough to make the frame a full 1920 pixels wide and fills that new area with white. The very first frame of the video wasn't the highest quality but the picture improved by frame 8. So I trimmed the video down to just one frame, frame #8. Then I used the loop filter to duplicate that frame to make the left clip the same number of frames as the right clip.
On the last line the right clip was overlaid onto the left clip at the desired position.
Here's a slight modification that keeps the circles at the top of the frame so the popup never gets cropped:
Code:ffVideoSource("Jan 20 Crono.mkv") right = Crop(726,70,720,-2).Trim(124,0) left = Crop(400,0,-0,-0).AddBorders(0,0,400,0,Color=$FFFFFF).Trim(8,8).Loop(right.framecount,0,0) Overlay(left, right, x=1100, y=50)
Getting rid of the circles will make the script more complex but it can be done. It would involve creating a mask from the frame where nothing is overlaying the circles. Then using that mask and another mask of the right video to control what parts of the right image overlay the left image.
To use this script you will need to download and install AviSynth. Then download and install the ffmpeg source filter. Create the script with a text editor, save it with the extension ".avs". Then open that script in any editor/encoder that supports AviSynth scripts as input. Finally, save the resulting video. For future videos, change the name of the file that's opened by ffVideoSource(). If the start of the right video is at the same frame, and the position of the rest of the elements doesn't change, that's the only change you need to make.
AviSynth guide: http://avisynth.nl/index.php/Main_Page -
So premiere requires AVFS, and I need to use ffmpeg? What do I do with the avisynth script to get it into ffmpeg? How do I get it in?
I have teamviewer. Is there a way you could show me how to do this on a couple of screen records so that I had the method down? I could pay you. I just would want to get this completely down so that all I have to do is screen record it and apply the script.
This video series is taking dozens and dozens of hours I feel this would take dozens more hours I just want to get onto the other side of editing, which is hard enough!
It seems when I've been here to do anything I want I have to use avisynth or virutaldub or ffmpeg. Everything is command line FFS! grr
Thank you so much Jagabo but I just can't leap the next step on how to get these scripts working for me? -
I recommend you use all 32 bit versions (not 64 bit, even if you are running 64 bit Windows) of the following software: Install Avisynth. Download the ffmpeg source plugin for Avisynth:
http://avisynth.nl/index.php/FFmpegSource
Extract ffms2.dll from the archive (x86 folder) an put it in AviSynths plugins folder, usually "c:\program files\Avisynth\plugins" or "c:\program files (x86)\Avisynth\plugins". It's not needed for this particular script but I suggest you also extract FFMS2.avsi to the plugins folder.
Now create the script I gave above. Put the script in the same folder as your source video. Open that script as if it was a video file in an editor (I don't know anything about Premiere). I suggest you use VirtualDub (File -> Open Video File) to preview your Avisynth scripts. I use the x264 command line encoder to encode my videos to MKV but you can use any editor that supports avisynth scripts. -
Here is a way you can do it with ffmpeg. ffmpeg has to be in the search path (most people that use ffmpeg semi frequently will set it up as an environment variable)
You can do it as a batch file, or drop & drag on a .bat, or put it in your right click context menu => send to . I included it in the zip file below as a bat.bat, you can drop & drag and test it
You can change the options, right now it's set to start at frame 125 for the right side, takes frame 0 from the left side, x264 with crf 20, preset "faster". It currently outputs the same filename as the input file with "new" appended , into an MKV container in the same directory
You probably want to customize some options e.g. maybe you want to put output files into a new directory, maybe you want a different naming convention, maybe you want different crf, maybe you want to position it slightly differently, etc...
There is no audio, but you never mentioned anything about audio (-an for the .bat)
Code:ffmpeg -f lavfi -i color=c=white:s=1920x1080 -i "%~f1" -i "%~f1" -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, trim=start_frame=0:end_frame=1 [bg]; [1:v] setpts=PTS-STARTPTS, trim=start_frame=0:end_frame=1 [left]; [2:v] setpts=PTS-STARTPTS, crop=w=720:h=982:x=730:y=96 [right]; [base][bg] overlay=shortest=0 [tmp1]; [tmp1][left] overlay=shortest=0:x=-400 [tmp2]; [tmp2][right] overlay=shortest=1:x=1120:y=60 [tmp3]; [tmp3] trim=start_frame=125 " -c:v libx264 -crf 20 -preset:v faster -an "%~n1.new.mkv"
-
Could you screen record exactly what you do and put it on mediafire or something?
-
80040154, I'm pretty sure that error code means AviSynth isn't installed. Did you install 32 bit AvISynth and 32 bit VirtualDub.
-
omg i think i got it working!
and just save as AVI?
i actually want to screw off the date
and just have the meals and the other part, and want them evenly centred on the left and right.. if you follow me, just play around with the numbers
so if i screen record anything else, i will be able to just add this final script to vdub, and then recreate an avi
it was an mkv that i exported from premiere.. can i do the same with mpeg? -
You'll want to select a compression codec and configure it (the default settings are probably fine for this). Then save as AVI. For AVI I'd recommend something like the Xvid codec. You'll have to download and install it.
Something like this:
Code:ffVideoSource("Jan 20 Crono.mkv") right = Crop(726,70,720,-2).Trim(124,0) left = Crop(700,0,-0,-0).AddBorders(200,0,500,0,Color=$FFFFFF).Trim(8,8).Loop(right.framecount,0,0) Overlay(left, right, x=1000, y=50)
ffVideoSource() should work with an mpg file too. -
mpeg worked, but with the below settings it didnt fit in the video part, and I don't know how to put the meals at the top side by side, because in the future ill be adding more meals and need it to be able to run down so that both are side by side.
is there a way i can get rid of the circles, if its in a script, it will be easy to just reimplement each time?
ffVideoSource("Jan 20 Crono 2.mpeg")
right = Crop(726,70,720,-2).Trim(124,0)
left = Crop(702,0,-0,-0).AddBorders(200,0,500,0,Color=$FFFFFF).Trim(8,8) .Loop(right.framecount,0,0)
Overlay(left, right, x=1000, y=50) -
Can someone help with having the left clip up the top side by side with the right clip?
also when i save it as an avi from vdub it gives an off white border down the bottom in the video?Last edited by krohm; 1st Mar 2016 at 19:32.
-
Starting with you last script, something like this will move the left part up:
Code:ffVideoSource("Jan 20 Crono 2.mpeg") right = Crop(726,70,720,-2).Trim(124,0) left = Crop(702,114,-0,-0).AddBorders(200,0,500,114,Color=$FFFFFF).Trim(8,8) .Loop(right.framecount,0,0) Overlay(left, right, x=1000, y=50)
-
thanks !
ive tried adjusting it still gives the off white at the bottom?
how complicated would it be to remove the circles? i have teamviewer and skype, could you maybe help with this? could chuck you some cash.. pm me
its just once i have this script, ill be able to just rerecord the screen and just add the script, export the avi, readd it to premiere and away i go so i could use it 100 times over -
What codec are you using?
This works pretty well and leaves you with a 1920x1080 frame:
Code:ffVideoSource("Jan 20 Crono.mkv") right = Crop(726,70,720,-2).Trim(124,0) left = Crop(700,114,-0,-0).AddBorders(200,0,500,114,Color=$FFFFFF).Trim(8,8) .Loop(right.framecount,0,0) circles = right.Trim(125,125).Loop(right.framecount,0,0) circles = AbsDiff(right, circles).ColorYUV(gain_y=65000, off_y=-4000).Crop(0,0,-0,28).AddBorders(0,0,0,right.height-28,Color=$ffffff).ColorYUV(gain_y=30) Overlay(left, right, x=1000, y=50, mask=circles) function AbsDiff(clip v1, clip v2) { Subtract(v1, v2) Overlay(ColorYUV(off_y=-126), Invert().ColorYUV(off_y=-130), mode="add") }
-
i installed xvid but just loaded the script to vdub and then hit save as avi and it worked straight away
OMG you legend! sorry for the late reply I only just saw this now. moved state and have been messing around for a few weeks, bout to get back onto the project
this is so awesome !! this is going to be utilised 100 times !! booooom
first video will be ready !!
Similar Threads
-
Create video from images with ffmpeg
By TorBru in forum Video ConversionReplies: 7Last Post: 30th Aug 2014, 08:42 -
how to put images in the video
By bobo11 in forum EditingReplies: 5Last Post: 9th Jun 2014, 21:16 -
Include Docs/Images in Video
By mgrove in forum Newbie / General discussionsReplies: 2Last Post: 17th Aug 2012, 10:49 -
Creating video from images WITH audio
By boyer in forum Video ConversionReplies: 13Last Post: 3rd Mar 2012, 02:01 -
Capture Images from HD video clip
By amigo_rk in forum Newbie / General discussionsReplies: 1Last Post: 30th Oct 2011, 21:22