Ok so here is my setup. I have a camera connected to my computer via USB. I have a script I run that uses gphoto2 to access the camera and pipes that to ffmpeg that streams that to /dev/video1
I can open OBS and create a Video Capture Device (V4L2) using /dev/video1 no problem.
Now I'm trying to create a PipeWire stream.
I have another script that I use, that uses GStreamer, reads from /dev/video1, and creates a PipeWire stream called `EOS`.
This also works.
The issue is when I open OBS and try to create a Video Capture Devie (PipeWire), it fails and kills the PipeWire stream.
When I try to create the Video Capture Devie (PipeWire), under Device I can see the list of devices: `EOS` and `Canon EOS M200 (V4L2)`
If I select EOS immediately the PipeWire stream that GStreamer created gets killed.
Has anyone successfully connected a video device using PipeWire with OBS?
Here is the output from Gstreamer:
Appreciate any help.
I can open OBS and create a Video Capture Device (V4L2) using /dev/video1 no problem.
Now I'm trying to create a PipeWire stream.
I have another script that I use, that uses GStreamer, reads from /dev/video1, and creates a PipeWire stream called `EOS`.
This also works.
The issue is when I open OBS and try to create a Video Capture Devie (PipeWire), it fails and kills the PipeWire stream.
When I try to create the Video Capture Devie (PipeWire), under Device I can see the list of devices: `EOS` and `Canon EOS M200 (V4L2)`
If I select EOS immediately the PipeWire stream that GStreamer created gets killed.
Has anyone successfully connected a video device using PipeWire with OBS?
Here is the output from Gstreamer:
Here is what I get when running OBS:Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
0:00:00.020866098 124730 0x7f9124000d90 WARN v4l2 gstv4l2object.c:4687:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: pipewireclock0
0:00:00.021825099 124730 0x7f9124000b90 DEBUG pipewiresink gstpipewiresink.c:554:on_state_changed:<pipewiresink0> got stream state "connecting" (1)
0:00:00.022237700 124730 0x7f911000a060 DEBUG pipewiresink gstpipewiresink.c:554:on_state_changed:<pipewiresink0> got stream state "paused" (2)
0:00:00.022294090 124730 0x7f9124000d90 WARN v4l2 gstv4l2object.c:4687:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
0:00:00.022371330 124730 0x7f9124000d90 WARN v4l2allocator gstv4l2allocator.c:276:gst_v4l2_memory_group_new:<v4l2src0:pool0:src:allocator> Driver pretends buffer 0 is queued even if freshly created, th
is indicates a bug in the driver.
0:00:00.022377080 124730 0x7f9124000d90 WARN v4l2allocator gstv4l2allocator.c:276:gst_v4l2_memory_group_new:<v4l2src0:pool0:src:allocator> Driver pretends buffer 1 is queued even if freshly created, th
is indicates a bug in the driver.
Redistribute latency...
0:00:00.022932881 124730 0x7f9124000f90 WARN bufferpool gstbufferpool.c:1429:gst_buffer_pool_set_flushing:<pipewirepool0> can't change flushing state of inactive pool
0:00:00.029142252 124730 0x7f9124000d90 WARN v4l2src gstv4l2src.c:1344:gst_v4l2src_create:<v4l2src0> lost frames detected: count = 269344 - ts: 0:00:00.008219615
0:00:00.075819065 124730 0x7f9124000b90 DEBUG pipewiresink gstpipewiresink.c:299:pool_activated:<pipewirepool0> activated
0:02:08.180025174 124730 0x7f911000a060 DEBUG pipewiresink gstpipewiresink.c:554:on_state_changed:<pipewiresink0> got stream state "error" (-1)
0:02:08.180039384 124730 0x7f911000a060 DEBUG pipewiresink gstpipewiresink.c:554:on_state_changed:<pipewiresink0> got stream state "error" (-1)
0:02:08.180044724 124730 0x7f911000a060 WARN pipewiresink gstpipewiresink.c:572:on_state_changed:<pipewiresink0> error: stream error: no more input formats
ERROR: from element /GstPipeline:pipeline0/GstPipeWireSink:pipewiresink0: stream error: no more input formats
Additional debug info:
../src/gst/gstpipewiresink.c(572): on_state_changed (): /GstPipeline:pipeline0/GstPipeWireSink:pipewiresink0
Execution ended after 0:02:08.159215546
Setting pipeline to NULL ...
0:02:08.180609525 124730 0x555665a638f0 DEBUG pipewiresink gstpipewiresink.c:554:on_state_changed:<pipewiresink0> got stream state "unconnected" (0)
Freeing pipeline ...
debug: Found portal inhibitor
debug: Attempted path: /usr/bin/../share/obs/obs-studio/locale/en-US.ini
debug: Attempted path: /usr/bin/../share/obs/obs-studio/locale.ini
debug: Attempted path: /usr/bin/../share/obs/obs-studio/themes
debug: Attempted path: /usr/bin/../share/obs/obs-studio/themes/
warning: ReadOne on org.freedesktop.portal.Settings returned an invalid reply
info: Platform: Wayland
info: CPU Name: AMD Ryzen 7 8700G w/ Radeon 780M Graphics
info: CPU Speed: 3879.429MHz
info: Physical Cores: 8, Logical Cores: 16
info: Physical Memory: 31224MB Total, 18401MB Free
info: Kernel Version: Linux 6.11.10-300.fc41.x86_64
info: Distribution: "Fedora Linux" 41
info: Desktop Environment: KDE (KDE)
info: Session Type: wayland
info: Qt Version: 6.8.0 (runtime), 6.8.0 (compiled)
info: Portable mode: false
info: OBS 31.0.0-rc1 (linux)
info: ---------------------------------
info: ---------------------------------
info: audio settings reset:
samples per sec: 48000
speakers: 2
max buffering: 960 milliseconds
buffering type: dynamically increasing
info: ---------------------------------
info: Initializing OpenGL...
info: Using EGL/Wayland
info: Initialized EGL 1.5
info: Loading up OpenGL on adapter AMD AMD Radeon Graphics (radeonsi, gfx1103_r1, LLVM 19.1.0, DRM 3.59, 6.11.10-300.fc41.x86_64)
info: OpenGL loaded successfully, version 4.6 (Core Profile) Mesa 24.2.8, shading language 4.60
info: ---------------------------------
info: video settings reset:
base resolution: 1920x1080
output resolution: 1920x1080
downscale filter: Bicubic
fps: 30/1
format: NV12
YUV mode: Rec. 709/Partial
info: NV12 texture support enabled
info: P010 texture support not available
info: Audio monitoring device:
name: Rembrandt Radeon High Definition Audio Controller Digital Stereo (HDMI)
id: alsa_output.pci-0000_10_00.1.hdmi-stereo
info: ---------------------------------
warning: Failed to load 'en-US' text for module: 'decklink-captions.so'
warning: Failed to load 'en-US' text for module: 'decklink-output-ui.so'
libDeckLinkAPI.so: cannot open shared object file: No such file or directory
warning: A DeckLink iterator could not be created. The DeckLink drivers may not be installed
warning: Failed to initialize module 'decklink.so'
info: [pipewire] Available capture sources:
info: [pipewire] - Monitor source
info: [pipewire] - Window source
info: VAAPI: API version 1.22
info: FFmpeg VAAPI H264 encoding supported
info: FFmpeg VAAPI AV1 encoding supported
info: FFmpeg VAAPI HEVC encoding supported
error: os_dlopen(libnvidia-encode.so.1->libnvidia-encode.so.1): libnvidia-encode.so.1: cannot open shared object file: No such file or directory
info: NVENC not supported
warning: Failed to initialize module 'obs-nvenc.so'
info: [obs-websocket] [obs_module_load] you can haz websockets (Version: 5.5.4 | RPC Version: 1)
info: [obs-websocket] [obs_module_load] Qt version (compile-time): 6.8.0 | Qt version (run-time): 6.8.0
info: [obs-websocket] [obs_module_load] Linked ASIO Version: 103002
warning: DEPRECATION: obs_frontend_get_global_config is deprecated. Read from global or user configuration explicitly instead.
info: [obs-websocket] [obs_module_load] Module loaded.
info: ---------------------------------
info: Loaded Modules:
info: text-freetype2.so
info: rtmp-services.so
info: obs-x264.so
info: obs-websocket.so
info: obs-webrtc.so
info: obs-webkitgtk.so
info: obs-vst.so
info: obs-transitions.so
info: obs-qsv11.so
info: obs-outputs.so
info: obs-libfdk.so
info: obs-filters.so
info: obs-ffmpeg.so
info: linux-v4l2.so
info: linux-pulseaudio.so
info: linux-pipewire.so
info: linux-jack.so
info: linux-capture.so
info: linux-alsa.so
info: image-source.so
info: frontend-tools.so
info: decklink-output-ui.so
info: decklink-captions.so
info: ---------------------------------
info: ---------------------------------
info: Available Encoders:
info: Video Encoders:
info: - ffmpeg_openh264 (OpenH264)
info: - ffmpeg_svt_av1 (SVT-AV1)
info: - ffmpeg_aom_av1 (AOM AV1)
info: - ffmpeg_vaapi_tex (FFmpeg VAAPI H.264)
info: - av1_ffmpeg_vaapi_tex (FFmpeg VAAPI AV1)
info: - hevc_ffmpeg_vaapi_tex (FFmpeg VAAPI HEVC)
info: - obs_x264 (x264)
info: Audio Encoders:
info: - ffmpeg_aac (FFmpeg AAC)
info: - ffmpeg_opus (FFmpeg Opus)
info: - ffmpeg_pcm_s16le (FFmpeg PCM (16-bit))
info: - ffmpeg_pcm_s24le (FFmpeg PCM (24-bit))
info: - ffmpeg_pcm_f32le (FFmpeg PCM (32-bit float))
info: - ffmpeg_alac (FFmpeg ALAC (24-bit))
info: - ffmpeg_flac (FFmpeg FLAC (16-bit))
info: - libfdk_aac (libfdk AAC)
info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.2.7) 15.0.0'
info: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.usb-Blue_Microphones_Yeti_Stereo_Microphone_LT_190923214456F39900DF_111000-00.analog-stereo.monitor' (default)
info: [Loaded global audio device]: 'Desktop Audio'
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.2.7) 15.0.0'
info: pulse-input: Audio format: s16le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.usb-Blue_Microphones_Yeti_Stereo_Microphone_LT_190923214456F39900DF_111000-00.analog-stereo'
info: [Loaded global audio device]: 'Mic/Aux'
info: - filter: 'Noise Suppression' (noise_suppress_filter_v2)
info: - filter: 'Noise Gate' (noise_gate_filter)
info: - filter: 'Compressor' (compressor_filter)
info: - filter: 'Limiter' (limiter_filter)
info: pulse-input: Server name: 'PulseAudio (on PipeWire 1.2.7) 15.0.0'
info: pulse-input: Audio format: s32le, 48000 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_input.pci-0000_10_00.6.analog-stereo'
info: [Loaded global audio device]: 'Mic/Aux 2'
info: - filter: 'Noise Suppression' (noise_suppress_filter_v2)
info: v4l2-input: Start capture from /dev/video1
info: v4l2-input: Input: 0
info: v4l2-input: Resolution: 1920x1080
info: v4l2-input: Pixelformat: YU12
info: v4l2-input: Linesize: 1920 Bytes
info: v4l2-input: Framerate: 30.00 fps
info: v4l2-input: /dev/video1: select timeout set to 166666 (5x frame periods)
libv4l2: error turning on stream: Device or resource busy
error: v4l2-helpers: unable to start stream
info: PipeWire initialized
info: PipeWire initialized
error: obs-data.c: [obs_data_create_from_json] Failed reading json string (1): '[' or '{' expected near end of file
error: obs-data.c: [obs_data_create_from_json] Failed reading json string (1): '[' or '{' expected near end of file
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info: - source: 'EOS M200' (v4l2_input)
info: - source: 'Right Screen Capture (PipeWire) 2' (pipewire-desktop-capture-source)
info: - source: 'Left Screen Capture (PipeWire)' (pipewire-desktop-capture-source)
info: - source: 'Video Capture Device (PipeWire) (BETA)' (pipewire-camera-source)
info: - scene 'Canon M200':
info: - source: 'EOS M200' (v4l2_input)
info: ------------------------------------------------
info: [camera-portal] Successfully accessed cameras
info: [pipewire] Screencast session created
info: [pipewire] Screencast session created
info: [pipewire] Asking for monitor
info: [pipewire] Asking for monitor
info: [pipewire] Server version: 1.2.7
info: [pipewire] Library version: 1.2.7
info: [pipewire] Header version: 1.2.6
info: [pipewire] Created registry 0x565452cfdc50
info: [camera-portal] Found device v4l2_input._sys_devices_virtual_video4linux_video1
info: [camera-portal] Found device EOS
info: [pipewire] source selected, setting up screencast
info: [pipewire] source selected, setting up screencast
info: [pipewire] Server version: 1.2.7
info: [pipewire] Library version: 1.2.7
info: [pipewire] Header version: 1.2.6
info: [pipewire] Created stream 0x565452d1eb70
info: [pipewire] Stream 0x565452d1eb70 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x565452d1eb70
info: [pipewire] Stream 0x565452d1eb70 state: "paused" (error: none)
info: [pipewire] Server version: 1.2.7
info: [pipewire] Library version: 1.2.7
info: [pipewire] Header version: 1.2.6
info: [pipewire] Created stream 0x565452d4d660
info: [pipewire] Stream 0x565452d4d660 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x565452d4d660
info: [pipewire] Stream 0x565452d4d660 state: "paused" (error: none)
info: [pipewire] Negotiated format:
info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA)
info: [pipewire] Modifier: 0x0
info: [pipewire] Size: 1920x1200
info: [pipewire] Framerate: 0/1
info: [pipewire] Negotiated format:
info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA)
info: [pipewire] Modifier: 0x20000001046bb04
info: [pipewire] Size: 1920x1200
info: [pipewire] Framerate: 0/1
info: [pipewire] Negotiated format:
info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA)
info: [pipewire] Modifier: 0x0
info: [pipewire] Size: 1920x1200
info: [pipewire] Framerate: 0/1
info: [pipewire] Stream 0x565452d1eb70 state: "streaming" (error: none)
info: [pipewire] Negotiated format:
info: [pipewire] Format: 12 (Spa:Enum:VideoFormat:BGRA)
info: [pipewire] Modifier: 0x20000001046bb04
info: [pipewire] Size: 1920x1200
info: [pipewire] Framerate: 0/1
info: [pipewire] Stream 0x565452d4d660 state: "streaming" (error: none)
info: adding 21 milliseconds of audio buffering, total audio buffering is now 21 milliseconds (source: Desktop Audio)
info: adding 21 milliseconds of audio buffering, total audio buffering is now 42 milliseconds (source: Mic/Aux)
info: [camera-portal] Selected resolution for ''
info: [camera-portal] Selected format for ''
info: [camera-portal] selected camera ''
info: [camera-portal] selected camera 'EOS'
info: [camera-portal] streaming camera 'EOS'
info: [pipewire] Created stream 0x565452f37350
info: [pipewire] Stream 0x565452f37350 state: "connecting" (error: none)
info: [pipewire] Playing stream 0x565452f37350
info: [camera-portal] Updating pixel formats
info: [camera-portal] Selected format for 'EOS'
info: [pipewire] Stream 0x565452f37350 state: "paused" (error: none)
info: [pipewire] Stream 0x565452f37350 state: "error" (error: no more input formats)
error: [pipewire] Error id:5 seq:21 res:-32 (Broken pipe): no more input formats
info: [pipewire-camera] Removed device EOS
info: [camera-portal] Selected resolution for 'EOS'
info: [camera-portal] Selected format for 'EOS'
info: [camera-portal] selected camera 'EOS'
info: [camera-portal] Updating device EOS
info: [pipewire] Stream 0x565452f37350 state: "error" (error: no more input formats)
error: [pipewire] Error id:5 seq:21 res:-32 (Broken pipe): no more input formats
Appreciate any help.