LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-19-2021, 05:16 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Question How to aggregate two webcams side by side into a single video device ?


Hi,

I'd like to mix the video streams from two webcams (same model) into one single stream, i.e. having two 800x600 /dev/video0 and /dev/video1, create a fake 1600x600 /dev/video2 that I can use like a normal webcam.
I searched for a v4l way to do that, but without success.

Regards.
 
Old 07-19-2021, 06:56 AM   #2
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Nowt but Puppies....
Posts: 660

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Are we talking here about the two 'streams' displaying side-by-side?

If you're looking for a command-line solution involving v4l/v4l2/ffmpeg, etc, I can't help with that. Hate using the terminal, except for troubleshooting.....always been more of a GUI man myself.

The only software I know of that will allow this kind of thing is webcam/security monitoring stuff. Take a look at Xeoma; the free version will allow display of up to 4 streams simultaneously.

May help, may not. Others can doubtless help with the command-line stuff; I expect there IS a way to do what you want.


Mike.

Last edited by Mike_Walsh; 07-19-2021 at 07:51 AM.
 
Old 07-19-2021, 07:46 AM   #3
teckk
LQ Guru
 
Registered: Oct 2004
Distribution: Arch
Posts: 5,137
Blog Entries: 6

Rep: Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826Reputation: 1826
Quote:
I'd like to mix the video streams from two webcams
Vertical stack
Code:
ffplay -f lavfi -i "movie=file1.mp4,crop=800:600:0:0[v0];movie=file2.mp4,scale=800:-1,crop=800:600:0:0[v1];[v0][v1]vstack"
Horizontal stack
Code:
ffplay -f lavfi -i "movie=file1.mp4,crop=800:600:0:0[h0];movie=file2.mp4,scale=800:-1,crop=800:600:0:0[h1];[h0][h1]hstack"
And I am going to do a little test to see if that works ok. I'll use a video that I happen to have here.
Code:
ffmpeg -ss 00:03:00 -t 00:03:30 -i MyVid.mp4 -c:a copy -c:v copy test1.mp4
ffmpeg -ss 00:06:00 -t 00:06:30 -i MyVid.mp4 -c:a copy -c:v copy test2.mp4
Play both videos, in the same window.
Code:
ffplay -f lavfi -i "movie=test1.mp4,crop=1920:1080:0:0[v0];movie=test2.mp4,scale=1920:-1,crop=1920:1080:0:0[v1];[v0][v1]vstack"

ffplay -f lavfi -i "movie=test1.mp4,crop=1920:1080:0:0[h0];movie=test2.mp4,scale=1920:-1,crop=1920:1080:0:0[h1];[h0][h1]hstack"
Screenshots of videos playing.
Code:
curl -F'file=@shot1.jpg' https://0x0.st
https://0x0.st/-VuN.jpg

curl -F'file=@shot2.jpg' https://0x0.st
https://0x0.st/-Vuq.jpg
https://0x0.st/-VuN.jpg
https://0x0.st/-Vuq.jpg
 
Old 07-19-2021, 08:31 AM   #4
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Thanks, but I'd like to export two webcams in a /dev/videoX in order to use it in some videoconferencing software.
 
Old 07-19-2021, 09:09 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
A quick read suggests that Snowmix might do what you're looking for: https://snowmix.sourceforge.io/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Browse Websites Side by Side Using Side View Feature on Mozilla Firefox Web Browser | Test Pilot LXer Syndicated Linux News 0 06-08-2018 06:05 PM
[SOLVED] Using Montage to place two images side by side as a single image julianvb Linux - Software 6 10-26-2017 01:04 AM
Quickly aggregate 4 different web pages into one? szboardstretcher Linux - Software 3 07-11-2014 09:35 AM
Avidemux: create a side to side video out of two videos assasukasse Linux - Software 0 10-10-2011 06:07 AM
Running two USB webcams/Linux compatible IR sensitive webcams doctorelectron Linux - Hardware 1 06-07-2006 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration