mirror of
				https://github.com/tiyn/wiki.git
				synced 2025-11-03 20:01:15 +01:00 
			
		
		
		
	v4l2 and obs: added
This commit is contained in:
		@@ -1,7 +1,8 @@
 | 
				
			|||||||
# Jellyfin
 | 
					# Jellyfin
 | 
				
			||||||
 | 
					
 | 
				
			||||||
[Jellyfin](https://jellyfin.ord) is a suite for multimedia streaming.
 | 
					[Jellyfin](https://jellyfin.ord) is a suite for multimedia streaming.
 | 
				
			||||||
It includes a web-interface and is mainly used for [video data](./video.md).
 | 
					It includes a web-interface and is mainly used for
 | 
				
			||||||
 | 
					[movies and tv shows](./movies_&_tv_shows.md).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Setup
 | 
					## Setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,3 +28,15 @@ initializing.
 | 
				
			|||||||
```txt
 | 
					```txt
 | 
				
			||||||
After=pve-guests.service
 | 
					After=pve-guests.service
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Such a service can be started by running:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					sudo systemctl start unturned
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Alternatively it can be enabled to start at every boot by running:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					sudo systemctl enable unturned
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										54
									
								
								wiki/linux/v4l2.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								wiki/linux/v4l2.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,54 @@
 | 
				
			|||||||
 | 
					# V4L2
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					V4L2 is the second version of
 | 
				
			||||||
 | 
					[Video4Linux](https://www.linuxtv.org/wiki/index.php/Main_Page).
 | 
				
			||||||
 | 
					It functions as a driver for webcams and tv tuner cards and other devices.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## v4l2loopback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The following section is based on a
 | 
				
			||||||
 | 
					[gist by ioquatix](https://gist.github.com/ioquatix/18720c80a7f7eb997c19eef8afd6901e).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					To use [v4l2loopback](https://github.com/umlaeute/v4l2loopback) an according
 | 
				
			||||||
 | 
					package needs to be installed.
 | 
				
			||||||
 | 
					Some distributions have a package named `v4l2loopback-dkms` in the package
 | 
				
			||||||
 | 
					manager, making the manual installation process unnecessary.
 | 
				
			||||||
 | 
					Afterwards v4l2loopback can be manually started by running:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					`video_nr=7` states the device path to use with v4l2loopback - in this case
 | 
				
			||||||
 | 
					`/dev/video7`.
 | 
				
			||||||
 | 
					This can be changed according to the needs.
 | 
				
			||||||
 | 
					It is important that the device is not already in use by another application.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For an automatic start at boot via [SystemD](./systemd.md) a service can be
 | 
				
			||||||
 | 
					created - as described in [the SystemD entry](./systemd.md#run-command-on-boot).
 | 
				
			||||||
 | 
					For v4l2loopback create the file `/etc/systemd/system/v4l2loopback.service`
 | 
				
			||||||
 | 
					containing the following lines:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```txt
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=V4L2 Loopback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					Type=simple
 | 
				
			||||||
 | 
					RemainAfterExit=yes
 | 
				
			||||||
 | 
					ExecStart=/bin/modprobe v4l2loopback card_label='V4L2 Loopback' video_nr=7 exclusive_caps=1
 | 
				
			||||||
 | 
					ExecStop=/bin/rmmod v4l2loopback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=default.target
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Note the line starting with `ExecStart=/bin/` is the same line described above
 | 
				
			||||||
 | 
					to change the device path.
 | 
				
			||||||
 | 
					Make sure to change it if needed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Afterwards enable the service to start at every boot process by running:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```sh
 | 
				
			||||||
 | 
					sudo systemctl enable v4l2loopback
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
# Video
 | 
					# Movies & TV Shows
 | 
				
			||||||
 | 
					
 | 
				
			||||||
It is nice to have some movies saved on your system.
 | 
					It is nice to have some movies saved on your system.
 | 
				
			||||||
There are multiple different approaches on how to get it working depending on
 | 
					There are multiple different approaches on how to get it working depending on
 | 
				
			||||||
							
								
								
									
										20
									
								
								wiki/obs.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								wiki/obs.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
				
			|||||||
 | 
					# OBS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Open Broadcaster Software](https://obsproject.com) - short OBS - is a free
 | 
				
			||||||
 | 
					and open source software for video recording and live streaming.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Virtual Camera
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					By using virtual camera the views of OBS can be used as an additional camera
 | 
				
			||||||
 | 
					output, making it possible to add effects and more to the video feed of the
 | 
				
			||||||
 | 
					camera.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					For Linux systems [V4L2](./linux/v4l2.md) needs to be set up.
 | 
				
			||||||
 | 
					This guide assumes it is set up according to the section in the
 | 
				
			||||||
 | 
					[V4L2 entry](./linux/v4l2.md#v4l2loopback).
 | 
				
			||||||
 | 
					Additionally `obs-v4l2sink` needs to be installed.
 | 
				
			||||||
 | 
					Under `Tools/v4l2sink` select the device path set up in V4L2 and the `YUV420`
 | 
				
			||||||
 | 
					video format.
 | 
				
			||||||
 | 
					Afterwards the virtual camera can be started.
 | 
				
			||||||
		Reference in New Issue
	
	Block a user