Video: Difference between revisions

From Achintya Rao’s Wiki
Created page with "Some pages to create to organise my thoughts and notes around video recording and streaming (including videoconferences). * OBS * DSLR"
 
Create list of steps for using OBS Cam and Canon 60 D
Line 1: Line 1:
Some pages to create to organise my thoughts and notes around video recording and streaming (including videoconferences).
(Some pages to create to organise my thoughts and notes around video recording and streaming (including videoconferences).)


* [[OBS]]
== Using OBS output device with DSLR as input device ==
* [[DSLR]]
 
Across two separate blog posts, I learnt how to use the [https://github.com/umlaeute/v4l2loopback v4l2loopback Linux kernel module] to use my [[DSLR]] as a webcam alternative and the output of [[OBS]] / OBS Studio as a fake webcam:
 
* [https://srcco.de/posts/using-obs-studio-with-v4l2-for-google-hangouts-meet.html Using OBS Studio with V4L2 for Google Meet]
** The blog post shows how to load the module once, but does not explain how to make sure it loads every time.
* [https://www.crackedthecode.co/how-to-use-your-dslr-as-a-webcam-in-linux/ How to Use Your DSLR Camera as a Webcam in Linux]
 
In order to get the kernel module to load every time I reboot, I created the following files:
 
* <code>/etc/modprobe.d/v4l2loopback.conf</code> with the following contents: <code>options v4l2loopback devices=2 video_nr=10,11 card_label="OBS Cam,Canon 60D" exclusive_caps=1 max_buffers=2</code>
** The video devices are namely <code>/dev/video10</code> for the “OBS Cam” output and <code>/dev/video11</code> for the “Canon 60D” input.
* <code>/etc/modules-load.d/v4l2loopback.conf</code> with the following contents: <code>v4l2loopback</code>
 
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 <code>60D</code> in my terminal to accept the camera’s input.

Revision as of 17:31, 12 June 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.