I want to directly put 2 ffmpeg
outut side by side in order to output a video that has both videos.
The recording ares
a 640x480
webcam recording with:
ffmpeg -f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 webcam.mkv
a desktop recording video of 1600x900
with
ffmpeg -f x11grab -r 100 -s 1600x900 -i :0.0 -acodec pcm_s16le -vcodec libx264 -preset ultrafast -threads 3 desktop.mkv
---------------
| |
|----------| desktop |
| webcam | |
--------------------------
ffmpeg \
-f v4l2 -framerate 25 -video_size 640x480 -i /dev/video0 \
-f x11grab -framerate 100 -video_size 1600x900 -i :0.0 \
-filter_complex "[0:v]pad=iw:900:0:(oh-ih)/2[left];[left][1:v]hstack" \
output
-framerate
instead of -r
and -video_size
instead of -s
for x11grab.-framerate 100
seems high and may not be sustainable.이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다