user14358: 
How can encode video with images like these help me ffmpeg ?

user1871: To overlay a half-sized version of a video in the center of an image, use
ffmpeg -loop 1 -i image -i video
-filter_complex "[1]scale=iw/2:-1[ovrl];
                 [0][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v]"
-map "[v]" -map 1:a -c:v libx264 -c:a copy output.mp4


To frame the video:
ffmpeg -loop 1 -i image -i video loop 1 -i frame
-filter_complex "[1]scale=iw/2:-1[ovrl];
                 [2][ovrl]scale2ref=iw*1.2:-1[fr][ol];
                 [fr][ol]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[fv];
                 [0][fv]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v]"
-map "[v]" -map 1:a -c:v libx264 -c:a copy output.mp4

If you composite the frame onto the background image beforehand, in ffmpeg or elsewhere, you can just use that resultant image with the first command. Of course, you'll lose freedom of movement for the video overlay.

14358: <p><a href="https://i.stack.imgur.com/F7gn9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F7gn9.jpg" alt="**enter image description here**"></a></p>

<p>How can encode video with images like these help me ffmpeg ?</p>
 1871: <p>To overlay a half-sized version of a video in the center of an image, use</p>

<pre><code>ffmpeg -loop 1 -i image -i video
-filter_complex "[1]scale=iw/2:-1[ovrl];
                 [0][ovrl]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v]"
-map "[v]" -map 1:a -c:v libx264 -c:a copy output.mp4
</code></pre>

<hr>

<p>To frame the video:</p>

<pre><code>ffmpeg -loop 1 -i image -i video loop 1 -i frame
-filter_complex "[1]scale=iw/2:-1[ovrl];
                 [2][ovrl]scale2ref=iw*1.2:-1[fr][ol];
                 [fr][ol]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[fv];
                 [0][fv]overlay=(main_w-overlay_w)/2:(main_h-overlay_h)/2:shortest=1[v]"
-map "[v]" -map 1:a -c:v libx264 -c:a copy output.mp4
</code></pre>

<p>If you composite the frame onto the background image beforehand, in ffmpeg or elsewhere, you can just use that resultant image with the first command. Of course, you'll lose freedom of movement for the video overlay.</p>
