Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Format not support #5

Open
dunossauro opened this issue Oct 9, 2018 · 34 comments
Open

Format not support #5

dunossauro opened this issue Oct 9, 2018 · 34 comments

Comments

@dunossauro
Copy link

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 ❤️

@CatxFish
Copy link
Owner

All the format failed? Have you tried YUY2?

@dunossauro
Copy link
Author

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

@hossbeast
Copy link

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.

@dunossauro
Copy link
Author

@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

@CatxFish
Copy link
Owner

CatxFish commented Nov 8, 2018

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?

@hossbeast
Copy link

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

@dunossauro
Copy link
Author

@hossbeast you try change device paths?

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

@CatxFish
Copy link
Owner

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.

@hossbeast
Copy link

hossbeast commented Nov 25, 2018

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?

@CatxFish
Copy link
Owner

YUYV422 is an alias name of YUY2 .

@jgomez696
Copy link

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

@urza9814
Copy link

urza9814 commented Mar 4, 2019

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)

@qrkourier
Copy link

qrkourier commented Mar 8, 2019

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
Copy link

qrkourier commented Mar 8, 2019

❯ 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

@urza9814
Copy link

urza9814 commented Mar 9, 2019

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

@hossbeast
Copy link

% 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
Copy link

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

@mark-orion
Copy link

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.

@RaabeM
Copy link

RaabeM commented Mar 21, 2020

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

@qrkourier
Copy link

This approach CatxFish/obs-virtual-cam#17 (comment) 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"

@RaabeM
Copy link

RaabeM commented Mar 25, 2020

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

@knarrff
Copy link

knarrff commented Apr 1, 2020

Does anybody has an idea?

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

@rahatzamancse
Copy link

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

@tinti
Copy link

tinti commented Apr 7, 2020

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

@Banellica
Copy link

Banellica commented Apr 23, 2020

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.)

@bob-takuya
Copy link

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.

@wittich
Copy link

wittich commented Sep 23, 2020

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.

@faassen
Copy link

faassen commented Sep 29, 2020

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
Copy link

faassen commented Sep 29, 2020

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.

@Mohammed-Shoaib
Copy link

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.

@edurenye
Copy link

Same to me in Ubuntu 20.04, I couldn't make it work, always this error, I'm tired of trying things.

@HishamLadha
Copy link

@edurenye Yeah same man. I've just given up lmao

@ochen1
Copy link

ochen1 commented Nov 12, 2020

idk it works for me

try this AFTER YOU ENABLE V4L2LOOPBACK :
ls /dev/video*
And then try each one of them.

there should be a videoX file named what you specified when modprobeing v4l2loopback

For example, if your v4l2loopback modprobe/insmod command is
sudo modprobe v4l2loopback video_nr=30 card_label="Virtual Camera" exclusive_caps=1,
then you should specify the device path to be /dev/video30.

I chose a really high number so I could be sure not to conflict with any number assigned by default (real webcams).

I think what would stump most people would be that they forget to modprobe/insmod the kernel module (v4l2loopback) after installing it, or that the command fails because they try to use a videoX file that is already taken by a webcam.

Another common reasong why the modprobe/insmod command fails (and usually goes unnoticed somehow) is that they forgot to update the cache. sudo depmod -a

@marcelo-lara
Copy link

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.)

I had the same problem, this also works on Ubuntu 20.04

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests