Vertically or horizontally stack several videos using ffmpeg?
up vote
5
down vote
favorite
I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file.
How can I do this?
ffmpeg video-processing
add a comment |
up vote
5
down vote
favorite
I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file.
How can I do this?
ffmpeg video-processing
add a comment |
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file.
How can I do this?
ffmpeg video-processing
I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file.
How can I do this?
ffmpeg video-processing
ffmpeg video-processing
edited Jun 4 at 19:30
LordNeckbeard
43.1k13101133
43.1k13101133
asked Jul 19 '12 at 0:59
Joseph Turian
4,778113354
4,778113354
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
13
down vote
accepted
See this answer to this question for a newer way to do this.
Old version:
You should be able to do this using the pad, movie and overlay filters in FFmpeg. The command will look something like this:
ffmpeg -i top.mov -vf 'pad=iw:2*ih [top]; movie=bottom.mov [bottom];
[top][bottom] overlay=0:main_h/2' stacked.mov
First the movie that should be on top is padded to twice its height. Then the bottom movie is loaded. Then the bottom movie is overlaid on the padded top movie at an offset of half the padded movie's height.
add a comment |
up vote
32
down vote
Use the vstack (vertical), hstack (horizontal), or xstack (custom layout) filters. It is easier and faster than other methods.
Example 1: Combine/stack two videos
Vertical
Using the vstack filter.
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
Videos must have the same width.
Horizontal
Using the hstack filter.
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
Videos must have the same height.
Example 2: Same as above but with audio
Combined audio from both inputs
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
-ac 2
is included to downmix to stereo in case both inputs contain multi-channel audio. For example, if both inputs are stereo, you would get a 4-channel output audio stream instead of stereo if you omit-ac 2
.
Using audio from one particular input
This example will use the audio from input1
:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v]" -map "[v]" -map 1:a output
Adding silent audio / If one input does not have audio
If you mix inputs that have audio and inputs that do not have audio then amerge will fail because each input needs audio. You can add silent audio with the anullsrc filter to prevent this:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
Example 3: Three videos
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output
Example 4: 2x2 grid
Using xstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[v]" -map "[v]" output
Using hstack and vstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2[v]" -map "[v]" output
This is less efficient than using xstack as shown above.
Example 5: Resize/scale an input
Since both videos need to have the same with for vstack, and the same height for hstack, you may need to scale one of the other videos to match the other:
Simple scale filter example to set width of input0 to 640 and automatically set height while preserving the aspect ratio:
ffmpeg -i input0 -i input2 -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]vstack=inputs=2" output
For a more advanced method to fit any size video into a specific size while preserving aspect ratio see Resizing videos with ffmpeg to fit into static sized player.
You can also use the scale2ref filter to automatically resize one video to match the dimensions of the other.
ffmpeg
reportsNo such filter: 'vstack'
. Do I have to install it first?
– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but yourffmpeg
is too old. Users are recommended to use affmpeg
build derived from the current git master branch.
– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?
– RaduM
Jun 29 '17 at 9:02
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
|
show 12 more comments
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
13
down vote
accepted
See this answer to this question for a newer way to do this.
Old version:
You should be able to do this using the pad, movie and overlay filters in FFmpeg. The command will look something like this:
ffmpeg -i top.mov -vf 'pad=iw:2*ih [top]; movie=bottom.mov [bottom];
[top][bottom] overlay=0:main_h/2' stacked.mov
First the movie that should be on top is padded to twice its height. Then the bottom movie is loaded. Then the bottom movie is overlaid on the padded top movie at an offset of half the padded movie's height.
add a comment |
up vote
13
down vote
accepted
See this answer to this question for a newer way to do this.
Old version:
You should be able to do this using the pad, movie and overlay filters in FFmpeg. The command will look something like this:
ffmpeg -i top.mov -vf 'pad=iw:2*ih [top]; movie=bottom.mov [bottom];
[top][bottom] overlay=0:main_h/2' stacked.mov
First the movie that should be on top is padded to twice its height. Then the bottom movie is loaded. Then the bottom movie is overlaid on the padded top movie at an offset of half the padded movie's height.
add a comment |
up vote
13
down vote
accepted
up vote
13
down vote
accepted
See this answer to this question for a newer way to do this.
Old version:
You should be able to do this using the pad, movie and overlay filters in FFmpeg. The command will look something like this:
ffmpeg -i top.mov -vf 'pad=iw:2*ih [top]; movie=bottom.mov [bottom];
[top][bottom] overlay=0:main_h/2' stacked.mov
First the movie that should be on top is padded to twice its height. Then the bottom movie is loaded. Then the bottom movie is overlaid on the padded top movie at an offset of half the padded movie's height.
See this answer to this question for a newer way to do this.
Old version:
You should be able to do this using the pad, movie and overlay filters in FFmpeg. The command will look something like this:
ffmpeg -i top.mov -vf 'pad=iw:2*ih [top]; movie=bottom.mov [bottom];
[top][bottom] overlay=0:main_h/2' stacked.mov
First the movie that should be on top is padded to twice its height. Then the bottom movie is loaded. Then the bottom movie is overlaid on the padded top movie at an offset of half the padded movie's height.
edited May 23 '17 at 12:10
Community♦
11
11
answered Jul 19 '12 at 2:32
blahdiblah
24.7k1681140
24.7k1681140
add a comment |
add a comment |
up vote
32
down vote
Use the vstack (vertical), hstack (horizontal), or xstack (custom layout) filters. It is easier and faster than other methods.
Example 1: Combine/stack two videos
Vertical
Using the vstack filter.
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
Videos must have the same width.
Horizontal
Using the hstack filter.
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
Videos must have the same height.
Example 2: Same as above but with audio
Combined audio from both inputs
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
-ac 2
is included to downmix to stereo in case both inputs contain multi-channel audio. For example, if both inputs are stereo, you would get a 4-channel output audio stream instead of stereo if you omit-ac 2
.
Using audio from one particular input
This example will use the audio from input1
:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v]" -map "[v]" -map 1:a output
Adding silent audio / If one input does not have audio
If you mix inputs that have audio and inputs that do not have audio then amerge will fail because each input needs audio. You can add silent audio with the anullsrc filter to prevent this:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
Example 3: Three videos
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output
Example 4: 2x2 grid
Using xstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[v]" -map "[v]" output
Using hstack and vstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2[v]" -map "[v]" output
This is less efficient than using xstack as shown above.
Example 5: Resize/scale an input
Since both videos need to have the same with for vstack, and the same height for hstack, you may need to scale one of the other videos to match the other:
Simple scale filter example to set width of input0 to 640 and automatically set height while preserving the aspect ratio:
ffmpeg -i input0 -i input2 -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]vstack=inputs=2" output
For a more advanced method to fit any size video into a specific size while preserving aspect ratio see Resizing videos with ffmpeg to fit into static sized player.
You can also use the scale2ref filter to automatically resize one video to match the dimensions of the other.
ffmpeg
reportsNo such filter: 'vstack'
. Do I have to install it first?
– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but yourffmpeg
is too old. Users are recommended to use affmpeg
build derived from the current git master branch.
– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?
– RaduM
Jun 29 '17 at 9:02
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
|
show 12 more comments
up vote
32
down vote
Use the vstack (vertical), hstack (horizontal), or xstack (custom layout) filters. It is easier and faster than other methods.
Example 1: Combine/stack two videos
Vertical
Using the vstack filter.
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
Videos must have the same width.
Horizontal
Using the hstack filter.
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
Videos must have the same height.
Example 2: Same as above but with audio
Combined audio from both inputs
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
-ac 2
is included to downmix to stereo in case both inputs contain multi-channel audio. For example, if both inputs are stereo, you would get a 4-channel output audio stream instead of stereo if you omit-ac 2
.
Using audio from one particular input
This example will use the audio from input1
:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v]" -map "[v]" -map 1:a output
Adding silent audio / If one input does not have audio
If you mix inputs that have audio and inputs that do not have audio then amerge will fail because each input needs audio. You can add silent audio with the anullsrc filter to prevent this:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
Example 3: Three videos
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output
Example 4: 2x2 grid
Using xstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[v]" -map "[v]" output
Using hstack and vstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2[v]" -map "[v]" output
This is less efficient than using xstack as shown above.
Example 5: Resize/scale an input
Since both videos need to have the same with for vstack, and the same height for hstack, you may need to scale one of the other videos to match the other:
Simple scale filter example to set width of input0 to 640 and automatically set height while preserving the aspect ratio:
ffmpeg -i input0 -i input2 -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]vstack=inputs=2" output
For a more advanced method to fit any size video into a specific size while preserving aspect ratio see Resizing videos with ffmpeg to fit into static sized player.
You can also use the scale2ref filter to automatically resize one video to match the dimensions of the other.
ffmpeg
reportsNo such filter: 'vstack'
. Do I have to install it first?
– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but yourffmpeg
is too old. Users are recommended to use affmpeg
build derived from the current git master branch.
– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?
– RaduM
Jun 29 '17 at 9:02
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
|
show 12 more comments
up vote
32
down vote
up vote
32
down vote
Use the vstack (vertical), hstack (horizontal), or xstack (custom layout) filters. It is easier and faster than other methods.
Example 1: Combine/stack two videos
Vertical
Using the vstack filter.
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
Videos must have the same width.
Horizontal
Using the hstack filter.
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
Videos must have the same height.
Example 2: Same as above but with audio
Combined audio from both inputs
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
-ac 2
is included to downmix to stereo in case both inputs contain multi-channel audio. For example, if both inputs are stereo, you would get a 4-channel output audio stream instead of stereo if you omit-ac 2
.
Using audio from one particular input
This example will use the audio from input1
:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v]" -map "[v]" -map 1:a output
Adding silent audio / If one input does not have audio
If you mix inputs that have audio and inputs that do not have audio then amerge will fail because each input needs audio. You can add silent audio with the anullsrc filter to prevent this:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
Example 3: Three videos
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output
Example 4: 2x2 grid
Using xstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[v]" -map "[v]" output
Using hstack and vstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2[v]" -map "[v]" output
This is less efficient than using xstack as shown above.
Example 5: Resize/scale an input
Since both videos need to have the same with for vstack, and the same height for hstack, you may need to scale one of the other videos to match the other:
Simple scale filter example to set width of input0 to 640 and automatically set height while preserving the aspect ratio:
ffmpeg -i input0 -i input2 -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]vstack=inputs=2" output
For a more advanced method to fit any size video into a specific size while preserving aspect ratio see Resizing videos with ffmpeg to fit into static sized player.
You can also use the scale2ref filter to automatically resize one video to match the dimensions of the other.
Use the vstack (vertical), hstack (horizontal), or xstack (custom layout) filters. It is easier and faster than other methods.
Example 1: Combine/stack two videos
Vertical
Using the vstack filter.
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
Videos must have the same width.
Horizontal
Using the hstack filter.
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
Videos must have the same height.
Example 2: Same as above but with audio
Combined audio from both inputs
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
-ac 2
is included to downmix to stereo in case both inputs contain multi-channel audio. For example, if both inputs are stereo, you would get a 4-channel output audio stream instead of stereo if you omit-ac 2
.
Using audio from one particular input
This example will use the audio from input1
:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v]" -map "[v]" -map 1:a output
Adding silent audio / If one input does not have audio
If you mix inputs that have audio and inputs that do not have audio then amerge will fail because each input needs audio. You can add silent audio with the anullsrc filter to prevent this:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];anullsrc[silent];[0:a][silent]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output.mp4
Example 3: Three videos
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output
Example 4: 2x2 grid
Using xstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0[v]" -map "[v]" output
Using hstack and vstack
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v]hstack=inputs=2[top];[2:v][3:v]hstack=inputs=2[bottom];[top][bottom]vstack=inputs=2[v]" -map "[v]" output
This is less efficient than using xstack as shown above.
Example 5: Resize/scale an input
Since both videos need to have the same with for vstack, and the same height for hstack, you may need to scale one of the other videos to match the other:
Simple scale filter example to set width of input0 to 640 and automatically set height while preserving the aspect ratio:
ffmpeg -i input0 -i input2 -filter_complex "[0:v]scale=640:-1[v0];[v0][1:v]vstack=inputs=2" output
For a more advanced method to fit any size video into a specific size while preserving aspect ratio see Resizing videos with ffmpeg to fit into static sized player.
You can also use the scale2ref filter to automatically resize one video to match the dimensions of the other.
edited Oct 31 at 21:32
answered Nov 17 '15 at 18:59
LordNeckbeard
43.1k13101133
43.1k13101133
ffmpeg
reportsNo such filter: 'vstack'
. Do I have to install it first?
– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but yourffmpeg
is too old. Users are recommended to use affmpeg
build derived from the current git master branch.
– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?
– RaduM
Jun 29 '17 at 9:02
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
|
show 12 more comments
ffmpeg
reportsNo such filter: 'vstack'
. Do I have to install it first?
– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but yourffmpeg
is too old. Users are recommended to use affmpeg
build derived from the current git master branch.
– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?
– RaduM
Jun 29 '17 at 9:02
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
ffmpeg
reports No such filter: 'vstack'
. Do I have to install it first?– frans
Dec 12 '15 at 13:39
ffmpeg
reports No such filter: 'vstack'
. Do I have to install it first?– frans
Dec 12 '15 at 13:39
@frans You probably figured this out by now, but your
ffmpeg
is too old. Users are recommended to use a ffmpeg
build derived from the current git master branch.– LordNeckbeard
Dec 14 '15 at 1:36
@frans You probably figured this out by now, but your
ffmpeg
is too old. Users are recommended to use a ffmpeg
build derived from the current git master branch.– LordNeckbeard
Dec 14 '15 at 1:36
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?– RaduM
Jun 29 '17 at 9:02
Stream specifier ':a' in filtergraph description [0:v][1:v]vstack[v];[0:a][1:a]amerge=inputs=2[a] matches no streams.
Why do I get this?– RaduM
Jun 29 '17 at 9:02
2
2
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@RaduM its because one of your video doesnt have audio in it , you need to add an audio or silent audio in it , try the same command using two videos with Audio , it will work , am posting because I had the same problem today and rectified it using silent audio addition.
– Jeffin
Jul 10 '17 at 7:24
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
@LordNeckbeard I used your Example 2 command for merging two videos. It did worked for me and I got an output with two videos merged along with their Audios mixed. What is the command if I add a third file, say an mp3 file, and merge 2 videos as before and merge 3 audios together.
– Nasseh
Jul 31 '17 at 7:59
|
show 12 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f11552565%2fvertically-or-horizontally-stack-several-videos-using-ffmpeg%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown