psi-im / psimedia

Audio/video RTP abstraction library
GNU Lesser General Public License v2.1
25 stars 10 forks source link

Add support different video resolutions #8

Open Vitozz opened 6 years ago

Vitozz commented 6 years ago

My webcam has no support for 320x240 resolution (minimum 640x480 or 640x360) and that's why psimedia throw an error while video-call

tehnick commented 6 years ago

Show related output of gst-device-monitor-1.0 please.

tehnick commented 6 years ago

For example in my laptop:

Device found:

    name  : Integrated_Webcam_HD: Integrate
    class : Video/Source
    caps  : video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            video/x-raw, format=(string)YUY2, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1;
            image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
            image/jpeg, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
            image/jpeg, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
            image/jpeg, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)I420, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)YV12, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)BGR, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)960, height=(int)540, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)848, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)424, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)320, height=(int)180, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
            video/x-raw, format=(string)RGB, width=(int)160, height=(int)120, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1;
    properties:
        udev-probed = true
        device.bus_path = pci-0000:00:14.0-usb-0:12:1.0
        sysfs.path = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.0/video4linux/video0
        device.bus = usb
        device.subsystem = video4linux
        device.vendor.id = 0c45
        device.vendor.name = CNFFH37N037013000009Z
        device.product.id = 6a06
        device.product.name = "Integrated_Webcam_HD:\ Integrate"
        device.serial = CNFFH37N037013000009Z_Integrated_Webcam_HD
        device.capabilities = :capture:
        device.api = v4l2
        device.path = /dev/video0
        v4l2.device.driver = uvcvideo
        v4l2.device.card = "Integrated_Webcam_HD:\ Integrate"
        v4l2.device.bus_info = usb-0000:00:14.0-12
        v4l2.device.version = 265988 (0x00040f04)
        v4l2.device.capabilities = 2233466881 (0x85200001)
        v4l2.device.device_caps = 85983233 (0x05200001)
    gst-launch-1.0 v4l2src ! ...
Vitozz commented 6 years ago

my webcam name : VGA Webcam: VGA Webcam class : Video/Source caps : video/x-raw, format=(string)YUY2, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1; video/x-raw, format=(string)YUY2, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string){ 2:4:7:1 }, framerate=(fraction)30/1; video/x-raw, format=(string)I420, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)I420, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)YV12, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)YV12, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)BGR, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)BGR, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)RGB, width=(int)640, height=(int)480, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; video/x-raw, format=(string)RGB, width=(int)640, height=(int)360, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)30/1; properties: udev-probed = true device.bus_path = pci-0000:00:14.0-usb-0:7:1.0 sysfs.path = /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/video4linux/video0 device.bus = usb device.subsystem = video4linux device.vendor.id = 04f2 device.vendor.name = "Chicony\x20Electronics\x20Co.\x2cLtd." device.product.id = b47f device.product.name = "VGA\ Webcam:\ VGA\ Webcam" device.serial = Chicony_Electronics_Co._Ltd._VGA_Webcam_0x0001 device.capabilities = :capture: device.api = v4l2 device.path = /dev/video0 v4l2.device.driver = uvcvideo v4l2.device.card = "VGA\ Webcam:\ VGA\ Webcam" v4l2.device.bus_info = usb-0000:00:14.0-7 v4l2.device.version = 265753 (0x00040e19) v4l2.device.capabilities = 2233466881 (0x85200001) v4l2.device.device_caps = 85983233 (0x05200001) gst-launch-1.0 v4l2src ! ...