obs-v4l2sink icon indicating copy to clipboard operation
obs-v4l2sink copied to clipboard

Format not support

Open dunossauro opened this issue 6 years ago • 34 comments

Sorry for generic issue, but i'm trying use but doesn't works here.

I install v4l2loopback and use Archlinux.

image

This is my return when a list formats:

~ ❯❯❯ v4l2-ctl --list-formats                                           18:42:39
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'RGB3' (emulated)
	Name        : RGB3

	Index       : 2
	Type        : Video Capture
	Pixel Format: 'BGR3' (emulated)
	Name        : BGR3

	Index       : 3
	Type        : Video Capture
	Pixel Format: 'YU12' (emulated)
	Name        : YU12

	Index       : 4
	Type        : Video Capture
	Pixel Format: 'YV12' (emulated)
	Name        : YV12

sorry for my english.

thanks :heart:

dunossauro avatar Oct 09 '18 21:10 dunossauro

All the format failed? Have you tried YUY2?

CatxFish avatar Oct 10 '18 09:10 CatxFish

Hello @CatxFish, I tryed to use YUY2 and did not succeed. But, after that i try modprobe v4l2loopback devices=2 and this works in /dev/video1.

I do not have any webcam or video device in this computer, a little strange, but maybe be another configuration in my device.

Thanks for your attention

<3

dunossauro avatar Oct 14 '18 15:10 dunossauro

I am experiencing the same problem, also using Arch Linux. The dialog says "format not support" and doesn't change when I hit "Start" for any of the formats. There are 4 options in the dialog under Video Format, YUY2, YUV420, NV12, and RGB32.

hossbeast avatar Nov 08 '18 06:11 hossbeast

@hossbeast I'm use arch too.

You tried enable more devices on v4l2loopback? I do not understand why, but for me, enable more devices in v4l2loopback works.

If you has webcam or another videos devices in your machine.

You can run:

ls /dev | grep video

and if you has more than one device you can try switch for another Device Path.

You can send me v4l2-ctl --list-formats output? Maybe ffmpeg extensions are missing.

Sorry if you've tried this, I'm just trying to help

dunossauro avatar Nov 08 '18 13:11 dunossauro

I agree with @dunossauro , you should check device format first. Usually the v4l2loopback support these formats , is there possible you mount it with forcing arguments or you have other device?

CatxFish avatar Nov 08 '18 16:11 CatxFish

139 % v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'YUYV' (YUYV 4:2:2)
	[1]: 'MJPG' (Motion-JPEG, compressed)

Tried with devices=2, no difference

hossbeast avatar Nov 09 '18 05:11 hossbeast

@hossbeast you try change device paths?

like, /dev/video1, /dev/video2, /dev/videoN

dunossauro avatar Nov 10 '18 16:11 dunossauro

I have no idea why this happened. My best guess is plugin can not set format to the device for some reason , if so the console should print "set format fail" message.

CatxFish avatar Nov 11 '18 03:11 CatxFish

In OBS, in the V4l2sinkProperties dialog box, under Video Format, I see "YUV420". However, in v4l2-ctl --list-formats, under YUYV, it says (YUYV 4:2:2).

Is the 420 vs 4:2:2 discrepancy the problem? The formats dont match up?

hossbeast avatar Nov 25 '18 23:11 hossbeast

YUYV422 is an alias name of YUY2 .

CatxFish avatar Nov 26 '18 03:11 CatxFish

format not support

OS: lubuntu 18.04

root@studiomp4:/usr/src# v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YUYV' Name : YUYV 4:2:2

Index       : 1
Type        : Video Capture
Pixel Format: 'MJPG' (compressed)
Name        : Motion-JPEG

jgomez696 avatar Dec 13 '18 12:12 jgomez696

I was having this error on Antergos (an Arch based distro), and eventually determined the root cause to be a bug in the version of v4l2loopback that I was getting from the repository. If you're on an Arch distro, remove v4l2loopback-dkms and install v4l2loopback-dkms-git. Version 0.12 or greater seems to be what you need.

Once I upgraded that I started the module with the following command and now everything works perfectly :) modprobe v4l2loopback devices=1 exclusive_caps=1

(Exclusive_caps makes the device visible to browser plugins and such; may not be necessary for all use cases)

urza9814 avatar Mar 04 '19 03:03 urza9814

I'm able to reproduce this today after re-building from source. The console output from obs is

v4l2 device getformat fail

after I ran sudo modprobe v4l2loopback video_nr=8,9 exclusive_caps=1 and started obs and tried to start the device.

qrkourier avatar Mar 08 '19 21:03 qrkourier

❯ v4l2-ctl --list-formats            
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

qrkourier avatar Mar 08 '19 21:03 qrkourier

I'm able to reproduce this today after re-building from source. The console output from obs is

v4l2 device getformat fail

after I ran sudo modprobe v4l2loopback video_nr=8,9 exclusive_caps=1 and started obs and tried to start the device.

You rebuilt v4l2sink from source or the v4l2loopback module?

I think you can check the v4l2loopback version with the below command...if it's 0.11, that may be your problem...if it's 0.12, then I've got no idea and I'll leave it to the devs :) (works for me with 0.12.1.r1.g541e3bc, but gives that error with 0.11.0) ls -ltr /var/lib/dkms/v4l2loopback

urza9814 avatar Mar 09 '19 17:03 urza9814

% ls -ltr /var/lib/dkms/v4l2loopback
total 4
drwxr-xr-x 3 root root 4096 Mar 14 20:13 0.11.0

So, perhaps this is the problem.

hossbeast avatar Mar 16 '19 00:03 hossbeast

Looks like that was the problem, at least for me. I needed to rebuild / reinstall v4l2loopback from the AUR. Whats working for me now is,

v4l2loopback 0.12.1 linux 5.0.1 OBS -> Tools -> v4l2sink -> Video Format YUY2

hossbeast avatar Mar 16 '19 00:03 hossbeast

I had the same problem (Ubuntu 18.04 LTS, 64bit). Removing the DKMS version of v4l2loopback and manually compiling and installing the module from https://github.com/umlaeute/v4l2loopback solved it. Works like a charm now.

mark-orion avatar Sep 25 '19 17:09 mark-orion

I have the same problem, but installing v4l2loopback from Github does not help. Every Format still fails with format not support I'm running Ubuntu 19.10.

v4l2-ctl --list-formats
ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'YUYV' (YUYV 4:2:2)
	[1]: 'MJPG' (Motion-JPEG, compressed)

Does anybody has an idea?

Thanks a lot and stay healthy <3

RaabeM avatar Mar 21 '20 20:03 RaabeM

This approach https://github.com/CatxFish/obs-virtual-cam/issues/17#issuecomment-514565571 worked for me on Ubuntu 19.10-based PopOS. This creates both a virtual cam and mic for which you can adjust the sync/delay.

❯ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.10
DISTRIB_CODENAME=eoan
DISTRIB_DESCRIPTION="Pop!_OS 19.10"

qrkourier avatar Mar 22 '20 13:03 qrkourier

Thank you for the answer. For an other reason in downgraded my system to Ubuntu 18.04.4 LTS and it worked as documented.

RaabeM avatar Mar 25 '20 13:03 RaabeM

Does anybody has an idea?

Are you sure you rmmod the old module and load the one you compiled?

knarrff avatar Apr 01 '20 20:04 knarrff

Hello @CatxFish, I tryed to use YUY2 and did not succeed. But, after that i try modprobe v4l2loopback devices=2 and this works in /dev/video1.

I do not have any webcam or video device in this computer, a little strange, but maybe be another configuration in my device.

Thanks for your attention

<3

This worked for me. Using Manjaro

rahatzamancse avatar Apr 03 '20 12:04 rahatzamancse

format not support

OS: lubuntu 18.04

root@studiomp4:/usr/src# v4l2-ctl --list-formats ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YUYV' Name : YUYV 4:2:2

Index       : 1
Type        : Video Capture
Pixel Format: 'MJPG' (compressed)
Name        : Motion-JPEG

Do not use apt-get for v4l2loopback. Install it from github. https://github.com/umlaeute/v4l2loopback

tinti avatar Apr 07 '20 01:04 tinti

I had the same problem. Running Ubuntu 18.04.4: Success! I did the following:

  1. Updated OBS to 25.0.7
  2. Downloaded and installed v4l2loopback-dkms_0.12.5-1 from Debian Sid: https://packages.debian.org/sid/v4l2loopback-dkms;
  3. Erased the v4l2loopback module from the kernel, and re-loaded the new v4l2loopback module; then the obs-v4l2sink plugin is working!

(Note that I am running kernel: 5.3.0-46-generic #38~18.04.1-Ubuntu SMP x86_64.)

Banellica avatar Apr 23 '20 11:04 Banellica

I also have the same problem.I think this is the main reason.

$ v4l2-ctl -d /dev/video0 --list-formats
ioctl: VIDIOC_ENUM_FMT
	Index       : 0
	Type        : Video Capture
	Pixel Format: 'YUYV'
	Name        : YUYV 4:2:2

	Index       : 1
	Type        : Video Capture
	Pixel Format: 'MJPG' (compressed)
	Name        : Motion-JPEG
v4l2-ctl -d /dev/video2 --list-formats
ioctl: VIDIOC_ENUM_FMT

OS:Ubuntu 18.04.4

Video0 is a real webcam, and video2 is my dummy device.It seems video2 does not support any formats.

bob-takuya avatar May 21 '20 01:05 bob-takuya

For the solution was to check all my listed devices to understand what was going on:

v4l2-ctl --list-devices`

The correct video device was actually on /dev/video6

Dummy video device (0x0000) (platform:v4l2loopback-000):
    /dev/video6

Dummy video device (0x0001) (platform:v4l2loopback-001):
    /dev/video7

Integrated IR Camera: Integrate (usb-0000:00:14.0-5):
    /dev/video0
    /dev/video1

Integrated Camera: Integrated C (usb-0000:00:14.0-8):
    /dev/video2
    /dev/video3

UVC Camera (046d:0825) (usb-0000:3c:00.0-1.2.1.1):
    /dev/video4

ps: my laptop has to intel cams and I have on additional external webcam.

wittich avatar Sep 23 '20 12:09 wittich

On Fedora 32 I also get this error.

v4l2-ctl --list-formats

ioctl: VIDIOC_ENUM_FMT
	Type: Video Capture

	[0]: 'YUYV' (YUYV 4:2:2)
	[1]: 'MJPG' (Motion-JPEG, compressed)

v4l2-ctl --list-devices

v4l2loopback (platform:v4l2loopback-000):
	/dev/video2

C922 Pro Stream Webcam (usb-0000:0a:00.3-2):
	/dev/video0
	/dev/video1

v4l2loopback version is 0.12.5, which appears to be the latest release.

The obs console produces:

v4l2 device getformat fail

faassen avatar Sep 29 '20 16:09 faassen

After a reboot I can actually output to /dev/video2. So disregard this information - apparently the system got wedged with something, and it does appear to work.

faassen avatar Sep 29 '20 17:09 faassen

I've tried pretty much everything here, nothing has worked. None of the mentioned formats work (YUV420, NV12, YUY2, RGB32), and I get greeted by the same message each time:

format not support

What I've tried:

I've used a precompiled version of v4l2sink which can be found here.

It seems like for most people, removing v4l2loopback-dkms and installing from the git repo v4l2loopback-dkms-git solves the issue. This doesn't work for me.

I've also tried different commands for modprobe

$ sudo modprobe v4l2loopback
$ sudo modprobe v4l2loopback exclusive_caps=1
$ sudo modprobe v4l2loopback devices=2
$ sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps=1
$ v4l2-ctl --list-formats                                                                                                                                                                ─╯
ioctl: VIDIOC_ENUM_FMT
        Type: Video Capture

        [0]: 'MJPG' (Motion-JPEG, compressed)
        [1]: 'YUYV' (YUYV 4:2:2)

System information:

  • Operating System: Manjaro Linux
  • Kernel: Linux 5.8.11-1-MANJARO
  • Architecture: x86-64

This is pretty frustrating if I am being honest.

Mohammed-Shoaib avatar Oct 03 '20 16:10 Mohammed-Shoaib