Trouble with setting webcam resolution

I am trying to set default resolution for my webcam to 1920x1080 with v4l2 so I am typing v4l2-ctl --get-fmt-video and I am getting this:

Format Video Capture:
	Width/Height      : 640/480
	Pixel Format      : 'YUYV' (YUYV 4:2:2)
	Field             : None
	Bytes per Line    : 1280
	Size Image        : 614400
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Limited Range)
	Flags             :      

Then I am changing it to 1920x1080 and H264 with v4l2-ctl -v width=1920,height=1080,pixelformat=H264, then I am checking again if it applied changes and output is:

Format Video Capture:
	Width/Height      : 1920/1080
	Pixel Format      : 'H264' (H.264)
	Field             : None
	Bytes per Line    : 3840
	Size Image        : 655360
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 

Everything is looking nice but then when I am going to Discord or checking it with vlc v4l2:// :v4l-vdev="/dev/video0" it changes back to default options.

I have Razer Kiyo btw.
If needed here is an output of v4l2-ctl --all

Driver Info:
	Driver name      : uvcvideo
	Card type        : Razer Kiyo
	Bus info         : usb-0000:01:00.0-5
	Driver version   : 5.8.3
	Capabilities     : 0x84a00001
		Video Capture
		Metadata Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Priority: 2
Video input : 0 (Camera 1: ok)
Format Video Capture:
	Width/Height      : 1920/1080
	Pixel Format      : 'H264' (H.264)
	Field             : None
	Bytes per Line    : 3840
	Size Image        : 655360
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
Crop Capability Video Capture:
	Bounds      : Left 0, Top 0, Width 1920, Height 1080
	Default     : Left 0, Top 0, Width 1920, Height 1080
	Pixel Aspect: 1/1
Selection Video Capture: crop_default, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1920, Height 1080, Flags: 
Streaming Parameters Video Capture:
	Capabilities     : timeperframe
	Frames per second: 30.000 (30/1)
	Read buffers     : 0
                     brightness 0x00980900 (int)    : min=0 max=255 step=1 default=128 value=128
                       contrast 0x00980901 (int)    : min=0 max=255 step=1 default=128 value=118
                     saturation 0x00980902 (int)    : min=0 max=255 step=1 default=128 value=136
 white_balance_temperature_auto 0x0098090c (bool)   : default=1 value=1
                           gain 0x00980913 (int)    : min=0 max=255 step=1 default=0 value=63
           power_line_frequency 0x00980918 (menu)   : min=0 max=2 default=2 value=2
				0: Disabled
				1: 50 Hz
				2: 60 Hz
      white_balance_temperature 0x0098091a (int)    : min=2000 max=7500 step=10 default=4000 value=4350 flags=inactive
                      sharpness 0x0098091b (int)    : min=0 max=255 step=1 default=128 value=128
         backlight_compensation 0x0098091c (int)    : min=0 max=1 step=1 default=0 value=1
                  exposure_auto 0x009a0901 (menu)   : min=0 max=3 default=3 value=1
				1: Manual Mode
				3: Aperture Priority Mode
              exposure_absolute 0x009a0902 (int)    : min=3 max=2047 step=1 default=127 value=3
         exposure_auto_priority 0x009a0903 (bool)   : default=0 value=1
                   pan_absolute 0x009a0908 (int)    : min=-36000 max=36000 step=3600 default=0 value=0
                  tilt_absolute 0x009a0909 (int)    : min=-36000 max=36000 step=3600 default=0 value=0
                 focus_absolute 0x009a090a (int)    : min=0 max=255 step=1 default=0 value=46 flags=inactive
                     focus_auto 0x009a090c (bool)   : default=1 value=1
                  zoom_absolute 0x009a090d (int)    : min=100 max=140 step=10 default=100 value=100

Could it be Discord itself which is forcing that resolution? Reason I ask is Skype forces my Bluetooth headphones or speakers to connect in “Headset Mode” (telephone quality) when it is active. I then have to change it back to A2DP in my Plasma settings. Note that this also disables the headset or speaker microphone; need to use the inbuilt one.

Maybe try Webcamoid?

Similar thing happens with Webcamoid. The only exception is that it changes PIxel format to MJPG not to YUYV like discord and vlc did, which is good because my webcam can’t do any better than 640/480 in YUYV, but the resolution stays no matter what…

Have you tried what happens with obs-studio?

In OBS you can everything about your webcam and it works, it just seems like programs like Discord or Webcamoid don’t change anything and defaults it to lows possible.
If only there was a possibility to like disable unwanted options so these programs could only see higher resolutions.

As told to me in the past by Paulo Assis, maintainer of guvcview, V4L doesn’t really store with persistence any configuration of the webcam. It just exposes the hardware as it is.

So the software itself should be capable itself of managing those configurations.

Nevertheless perhaps some of the following solutions will help, although it’s not something I would use myself cause it’s too manual: