<p>Just use <a href="https://ffmpeg.org/ffmpeg-filters.html#hstack" rel="nofollow noreferrer">hstack</a>:</p>

<pre><code>ffmpeg -i video.avi -i video2.avi -filter_complex "[0:v] setpts=PTS-STARTPTS, scale=360x288 [left]; [1:v] setpts=PTS-STARTPTS, scale=360x288 [right]; [left][right]hstack=inputs=2" -c:v libx264 -f flv rtmp://192.168.1.1/live/videocrop
</code></pre>

CC BY-SA 4.0
2019-05-08T11:22:14.593Z
thanks that works,  Now just run into this problem lol
https://trac.ffmpeg.org/ticket/7547
rodreguous smith
CC BY-SA 4.0
2019-05-08T17:15:11.037Z
@rodreguoussmith I'm assuming your build uses `--enable-librtmp`. The native FFmpeg RTMP implementation apparently is not affected by that bug. You may have to re-complile without `--enable-librtmp` to be able to use the native RTMP.
llogan
CC BY-SA 4.0
2019-05-08T20:52:43.777Z
thanks  yeah seems that annoying bug is doing it,   are there any other protocols that could do the same job besides RTMP
rodreguous smith
CC BY-SA 4.0
2019-05-08T21:47:00.047Z
@rodreguoussmith I'm not sure. I never got interested in streaming protocols. I suggest trying the native RTMP implementation before anything else.
llogan
CC BY-SA 4.0
2019-05-07T17:42:52.817Z
2019-05-07T17:42:52.817Z
llogan
<p>Im trying to get two 1080p videos side by side,  Wanting the two scaled to 720p and combined both as 1080p </p>

<p>ive tried using the below code . it works fine when using the lower resolution but when i try to make it go higher it gets all mixed up</p>

<p>any tips </p>

<p><code>ffmpeg -i video.avi -i video2.avi -filter_complex "nullsrc=size=720x288 [base]; [0:v] setpts=PTS-STARTPTS, scale=360x288 [left]; [1:v] setpts=PTS-STARTPTS, scale=360x288 [right]; [base][left] overlay=shortest=1 [tmp1]; [tmp1][right] overlay=shortest=1:x=360:y=0" -c:v libx264 -f flv "rtmp://192.168.1.1/live/videocrop"</code></p>

CC BY-SA 4.0
2019-05-07T12:59:15.870Z
*when i try to make it go higher it gets all mixed up* --> how do you change the command?
Gyan
CC BY-SA 4.0
2019-05-07T13:10:24.360Z
by changing nullsrc=size=720x288 and the two scale=360x288 but guessing im doing it wrong lol  any ideas how to get it higher resolution per video
rodreguous smith
CC BY-SA 4.0
2019-05-07T13:15:12.997Z
Eg. ffmpeg -i video.avi -i video2.avi -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=1280x720 [left]; [1:v] setpts=PTS-STARTPTS, scale=1280x720 [right]; [base][left] overlay=shortest=1 [tmp1]; [tmp1][right] overlay=shortest=1:x=360:y=0" -c:v libx264 -f flv "rtmp://192.168.1.1/live/videocrop"
rodreguous smith
<ffmpeg>
ffmpeg side by side video
rodreguous smith
# ffmpeg side by side video

(Asked by: username_0 on 2019-05-07)

Im trying to get two 1080p videos side by side, Wanting the two scaled to 720p and combined both as 1080p

ive tried using the below code . it works fine when using the lower resolution but when i try to make it go higher it gets all mixed up

any tips

`ffmpeg -i video.avi -i video2.avi -filter_complex "nullsrc=size=720x288 [base]; [0:v] setpts=PTS-STARTPTS, scale=360x288 [left]; [1:v] setpts=PTS-STARTPTS, scale=360x288 [right]; [base][left] overlay=shortest=1 [tmp1]; [tmp1][right] overlay=shortest=1:x=360:y=0" -c:v libx264 -f flv "rtmp://192.168.1.1/live/videocrop"`

**Tags:** ffmpeg

> **Comments:**
> **username_1**: *when i try to make it go higher it gets all mixed up* --> how do you change the command?  
> **username_0**: by changing nullsrc=size=720x288 and the two scale=360x288 but guessing im doing it wrong lol  any ideas how to get it higher resolution per video  
> **username_0**: Eg. ffmpeg -i video.avi -i video2.avi -filter_complex "nullsrc=size=1920x1080 [base]; [0:v] setpts=PTS-STARTPTS, scale=1280x720 [left]; [1:v] setpts=PTS-STARTPTS, scale=1280x720 [right]; [base][left] overlay=shortest=1 [tmp1]; [tmp1][right] overlay=shortest=1:x=360:y=0" -c:v libx264 -f flv "rtmp://192.168.1.1/live/videocrop"  

---

## 1 answers

### Answer by username_2 on 2019-05-07. Score: 1

Just use hstack:
ffmpeg -i video.avi -i video2.avi -filter_complex "[0:v] setpts=PTS-STARTPTS, scale=360x288 [left]; [1:v] setpts=PTS-STARTPTS, scale=360x288 [right]; [left][right]hstack=inputs=2" -c:v libx264 -f flv rtmp://192.168.1.1/live/videocrop

> **Comments:**
> **username_0**: thanks that works,  Now just run into this problem lol https://trac.ffmpeg.org/ticket/7547  
> **username_2**: @rodreguoussmith I'm assuming your build uses `--enable-librtmp`. The native FFmpeg RTMP implementation apparently is not affected by that bug. You may have to re-complile without `--enable-librtmp` to be able to use the native RTMP.  
> **username_0**: thanks  yeah seems that annoying bug is doing it,   are there any other protocols that could do the same job besides RTMP  
> **username_2**: @rodreguoussmith I'm not sure. I never got interested in streaming protocols. I suggest trying the native RTMP implementation before anything else.  

---

