user29423: I'm using ffmpeg to create several single splitscreen videos out of 2 separate videos. The 2 videos have audio so I want to extract the 2 video's audio streams as 2 separate mp3s and also create a thumbnail out of the finished splitscreen video. Is it possible to do these 3 actions in one pass?
Here is the code I'd use to create the splitscreen video:
ffmpeg -i input0.mov -i input1.mov  -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[v0][v1] xstack=inputs=2:layout=0_0|w0_0|[v]" -map "[v]" -an output.mp4
Here is the code I'd use to create the thumbnail of the resultant splitscreen video:
ffmpeg -y -i input.mp4 -vframes 1  OUTPUT.jpg
Here is the code I'd use to create one mp3
ffmpeg -i input0.mov output0.mp3

user1760: Combined command:
ffmpeg -i input0.mov -i input1.mov -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[v0][v1]hstack,split[video][image]" -map "[video]" output.mp4 -map 0:a audio0.mp3 -map 1:a audio1.mp3 -map "[image]" -frames:v 1 image.jpg

For a 4 videos into a 2x2 layout:
ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[2]scale=640x360[v2];[3]scale=640x360[v3];[v0][v1][v2][v3]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0,split[video][image]" -map "[video]" output.mp4 -map 0:a audio0.mp3 -map 1:a audio1.mp3 -map 2:a audio2.mp3 -map 3:a audio3.mp3 -map "[image]" -frames:v 1 image.jpg


29423: <p>I'm using ffmpeg to create several single splitscreen videos out of 2 separate videos. The 2 videos have audio so I want to extract the 2 video's audio streams as 2 separate mp3s and also create a thumbnail out of the finished splitscreen video. Is it possible to do these 3 actions in one pass?</p>

<p>Here is the code I'd use to create the splitscreen video:</p>

<p><code>ffmpeg -i input0.mov -i input1.mov  -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[v0][v1] xstack=inputs=2:layout=0_0|w0_0|[v]" -map "[v]" -an output.mp4</code></p>

<p>Here is the code I'd use to create the thumbnail of the resultant splitscreen video:</p>

<p><code>ffmpeg -y -i input.mp4 -vframes 1  OUTPUT.jpg</code></p>

<p>Here is the code I'd use to create one mp3</p>

<p><code>ffmpeg -i input0.mov output0.mp3</code></p>
 1760: <p>Combined command:</p>

<pre><code>ffmpeg -i input0.mov -i input1.mov -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[v0][v1]hstack,split[video][image]" -map "[video]" output.mp4 -map 0:a audio0.mp3 -map 1:a audio1.mp3 -map "[image]" -frames:v 1 image.jpg
</code></pre>

<p>For a 4 videos into a 2x2 layout:</p>

<pre><code>ffmpeg -i input0.mov -i input1.mov -i input2.mov -i input3.mov -filter_complex "[0]scale=640x360[v0];[1]scale=640x360[v1];[2]scale=640x360[v2];[3]scale=640x360[v3];[v0][v1][v2][v3]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0,split[video][image]" -map "[video]" output.mp4 -map 0:a audio0.mp3 -map 1:a audio1.mp3 -map 2:a audio2.mp3 -map 3:a audio3.mp3 -map "[image]" -frames:v 1 image.jpg
</code></pre>
