Video: Difference between revisions

From Achintya Rao’s Wiki
Create list of steps for using OBS Cam and Canon 60 D
m Add category
Line 20: Line 20:


This way, I need to type <code>60D</code> in my terminal to accept the camera’s input.
This way, I need to type <code>60D</code> in my terminal to accept the camera’s input.
[[Category:Video]]

Revision as of 02:13, 22 December 2020

(Some pages to create to organise my thoughts and notes around video recording and streaming (including videoconferences).)

Using OBS output device with DSLR as input device

Across two separate blog posts, I learnt how to use the v4l2loopback Linux kernel module to use my DSLR as a webcam alternative and the output of OBS / OBS Studio as a fake webcam:

In order to get the kernel module to load every time I reboot, I created the following files:

  • /etc/modprobe.d/v4l2loopback.conf with the following contents: options v4l2loopback devices=2 video_nr=10,11 card_label="OBS Cam,Canon 60D" exclusive_caps=1 max_buffers=2
    • The video devices are namely /dev/video10 for the “OBS Cam” output and /dev/video11 for the “Canon 60D” input.
  • /etc/modules-load.d/v4l2loopback.conf with the following contents: v4l2loopback

I also created an alias in my .bash_aliases file to activate the DSLR as an input device:

alias 60D='gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video11'

This way, I need to type 60D in my terminal to accept the camera’s input.