[FFmpeg-user] Sending 2 camera outputs side by side to loopback device

Jim Ruxton jim.ruxton at gmail.com
Fri Nov 25 09:02:55 EET 2022


I am on Ubuntu 22.04 and trying to combine 2 cameras into one stream that
is being sent to a loopback device. The command appears to work but I can't
see the stream in any way. I've tried VLC Cheese ffplay guvcview and none
of them work. The command I am using is
:
*ffmpeg -f v4l2 -vcodec rawvideo -i /dev/video0 -f v4l2 -vcodec rawvideo -i
/dev/video2 -filter_complex hstack,"scale=iw*.5:ih*1" -f v4l2 -vcodec mjpeg
/dev/video4 *

This should give me a combined output of 1280x720 and the following output
of ffmpeg shows that it is. Any idea what I am doing wrong? Ultimately I
want to send this combined output to Zoom. Thanks .Relevant output of the
ffmpeg command follows:

Input #0, video4linux2,v4l2, from '/dev/video0':
  Duration: N/A, start: 10914.045895, bitrate: 147456 kb/s
  Stream #0:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Input #1, video4linux2,v4l2, from '/dev/video2':
  Duration: N/A, start: 10915.081944, bitrate: 147456 kb/s
  Stream #1:0: Video: rawvideo (YUY2 / 0x32595559), yuyv422, 1280x720,
147456 kb/s, 10 fps, 10 tbr, 1000k tbn, 1000k tbc
Stream mapping:
  Stream #0:0 (rawvideo) -> hstack:input0
  Stream #1:0 (rawvideo) -> hstack:input1
  scale -> Stream #0:0 (mjpeg)
Press [q] to stop, [?] for help
[swscaler @ 0x55a69b913440] deprecated pixel format used, make sure you did
set range correctly
Output #0, video4linux2,v4l2, to '/dev/video4':
  Metadata:
    encoder         : Lavf58.76.100
  Stream #0:0: Video: mjpeg, yuvj422p(pc, progressive), 1280x720, q=2-31,
200 kb/s, 10 fps, 10 tbn (default)
    Metadata:
      encoder         : Lavc58.134.100 mjpeg
    Side data:
      cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: N/A
[video4linux2,v4l2 @ 0x55a69b8fa900] Thread message queue blocking;
consider raising the thread_queue_size option (current value: 8)


More information about the ffmpeg-user mailing list