Sony A7 III Using the A7III as a V4L video device on linux, have you tried ?

tcoquelin

Active Member
Site Supporter
Site Supporter
Followers
0
Following
0
Joined
Aug 29, 2020
Posts
38
Likes Received
35
Hello,

Have you tried using your A7III as a webcam ?
If not, give it try,
if yes, did you follow the gphoto2 exemple as I did or have you found a smarter way ?
Let's share on this !

I'm using my A7III as a V4L device on Linux so that any software can use it as a standard webcam.
I'm using gphoto2, ffmpeg and V4Lloopback
The stack I use:
* V4L (Video4Linux) is the standard framework for video streaming devices (tv tuners, webcams, video acquisition cards, ...) on Linux
* V4Lloopback is a kernel module that mirrors a video stream sent to it and make it appear as a regular source device with a V4L interface
* gphoto2 is a tool for controlling a camera over USB
* ffmeg is a general purpose audio/video encoding/decoding software

The command line I use :
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0

What is does :
* gphoto2 --stdout --capture-movie : spams the preview function about 30times per seconds and outputs a stream of jpegs
* ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 : takes the stream of jpegs (it's autodetected as mjpeg), transcode it as a raw yuv video and pushes it into the loopback device as if it was a recording hardware

Now any software capable of using a webcam will see a new webcam and will be able to use it.
Caveat: you need to load the v4l2loopback with exclusive_caps=1 for dumb V4L implentations like chrome to accept to use it.
 
I recently tried using my A7III in Windows as a webcam using Sony's own proprietary software and I was slightly disappointed, but this was probably because of limitations with the Sony software.
I'd like to try it in Linux - which version did you use? I have a desktop with Ubuntu gathering dust that could be useful.
One thing I'd be interested in is what the highest resolution you could stream to the PC from the A7III. It seems 1080p is the best with Windows.

Thanks,

Gareth
 
I'd like to try it in Linux - which version did you use? I have a desktop with Ubuntu gathering dust that could be useful.
One thing I'd be interested in is what the highest resolution you could stream to the PC from the A7III. It seems 1080p is the best with Windows.
I'm using Gentoo but any modern linux would do the job.
Resolution is 720p with current setup.
When I have more time I'll see if I can get better image with rapid memory only shots (using low res jpegs) but I'll need to write some code to drive the gphoto2 lib the way I want. If I succeed I could easily get 4k out ...
 
Back
Top