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

tcoquelin

Member
Original poster
Pro Member
Pro Member
Followers
0
Following
0
38
29
Aug 29, 2020
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.
 

garethjv

New member
Pro Member
Pro Member
Followers
0
Following
0
6
2
Dec 9, 2020
Name
Gareth
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
 

tcoquelin

Member
Original poster
Pro Member
Pro Member
Followers
0
Following
0
38
29
Aug 29, 2020
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 ...
 

Pro Membership Upgrade

  • If you'd like to support this community you can easily do so by becoming a Pro Member and unlocking the following benefits:

    ✓ No Adverts in the Forums
    ✓ Pro Member Competitions
    ✓ Sell Items in the Marketplace
    ✓ Unlimited Gallery Uploads
    ✓ Higher Resolution Gallery Uploads
    ✓ Forum Profile Signature
    ✓ Custom Profile Cover Photo
    ✓ Advertise Your Photography Workshops

    Pro Member Upgrade

Shopping Links

You can also support this site by purchasing gear through the following affiliate links:
Although I would recommend supporting your local camera store if you have one.

User Menu

alpha shooters text logo

© 2020 Alpha Shooters. All Rights Reserved.
Disclaimer: Alpha Shooters is an independently run website and is not affiliated with Sony.com
As an Amazon Associate I earn from qualifying purchases.