ffmpeg - join / merge on top of each other

Posted by AisIceEyes on Super User See other posts from Super User or by AisIceEyes
Published on 2013-10-17T02:19:36Z Indexed on 2013/10/20 9:59 UTC
Read the original article Hit count: 173

Filed under:
|

I'm trying to join together two videos on top of each other. I already did these two ffmpeg commands

ffmpeg -i 2_Out_of_Control.VOB -aspect 16:9 \
-vf "yadif=0:-1:0,crop=w=714:h=476:x=6:y=0,scale=1280:720,boxblur=lp=13" \
-c:v libx264 -preset medium \
-c:a copy \
'2(blurred)Out_of_Control.mp4'

ffmpeg -i 2_Out_of_Control.VOB \
-vf "yadif=0:-1:0,crop=w=714:h=476:x=6:y=0,scale=1080:720" \
-c:v libx264 -preset medium \
-c:a copy \
'2(clear)Out_of_Control.mp4'

I'm currently stuck on making the "clear" version on top of the "blurred" version. I'm not sure how to do that. Can anybody help please? Been googling for around 2 days already. Only achieved it by using OpenShot but yeah, would prefer if there is an ffmpeg command to merge the two videos on top of each other.

Edit: I want the "clear" video to be at the center at the top of the "blurred" video

Edit2: console output would be the same as above:

ffmpeg -i 2(blurred)Out_of_Control.mp4 \
-i 2(clear)Out_of_Control.mp4 \
-aspect 16:9 \
-vf <just something that will join the two together: the blurred at the bottom, clear at top that is centered> \
-c:v libx264 -preset medium \
-c:a copy \
'2_Out_of_Control_VOB.mp4'

Edit3: here is the output when I used ffmpeg -i 2_Out_of_Control.VOB

$ ffmpeg -i 2_Out_of_Control.VOB 
ffmpeg version git-2013-10-03-c7fe2a3 Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct  4 2013 05:22:06 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --prefix=/home/username/ffmpeg_build --extra-cflags=-I/home/username/ffmpeg_build/include --extra-ldflags=-L/home/username/ffmpeg_build/lib --bindir=/home/username/bin --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-x11grab
  libavutil      52. 46.100 / 52. 46.100
  libavcodec     55. 34.100 / 55. 34.100
  libavformat    55. 19.100 / 55. 19.100
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 88.101 /  3. 88.101
  libswscale      2.  5.100 /  2.  5.100
  libswresample   0. 17.103 /  0. 17.103
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mpeg, from '2_Out_of_Control.VOB':
  Duration: 00:05:00.01, start: 0.500000, bitrate: 4574 kb/s
    Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p(tv, smpte170m), 720x480 [SAR 8:9 DAR 4:3], max. 9334 kb/s, 29.97 fps, 29.97 tbr, 90k tbn, 59.94 tbc
    Stream #0:1[0x80]: Audio: ac3, 48000 Hz, stereo, fltp, 384 kb/s
At least one output file must be specified
$

© Super User or respective owner

Related posts about bash

Related posts about ffmpeg

  • how to install ffmpeg in cpanel

    as seen on Super User - Search for 'Super User'
    i'm using dedicated server(linux) so i need to install ffmpeg in cpanel so here ffmpeg i found in Main Software Install a Perl Module but i writing script in php so how can i install ffmpeg phpperl when i'am trying to install ffmpeg in perl module i get this response Checking C compiler… >>> More

  • FFMpeg-PHP Installation Error

    as seen on Server Fault - Search for 'Server Fault'
    While installing FFmpeg-PHP, I got this interesting error: /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c: In function 'zim_ffmpeg_movie_getAudioStreamId': /usr/downloads/ffmpeg-php-0.6.0/ffmpeg_movie.c:1051: error: 'CODEC_TYPE_AUDIO' undeclared (first use in this function) /usr/downloads/ffmpeg-php-0… >>> More

  • git problems installing stuff [closed]

    as seen on Super User - Search for 'Super User'
    root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~# cd root@Frenzen:~# git clone --depth 1 git://source.ffmpeg.org/ffmpeg Initialized empty Git repository in /root/ffmpeg/.git/ root@Frenzen:~#… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More

  • Unable to install ffmpeg-php

    as seen on Server Fault - Search for 'Server Fault'
    Hi, I followed the instructions on http://www.mysql-apache-php.com/ffmpeg-install.htm but ffmpeg-php does not show up in my phpinfo() The commands I ran (in order) #yum install ffmpeg ffmpeg-devel ... Public key for faac-1.26-1.el5.rf.x86_64.rpm is not installed #rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0… >>> More