Video not capturing at 16:9 for 1280x720

AA
Anthony Alba
Fri, Feb 2, 2018 1:17 PM

Using pjsua2/linux with v4l2 usb webcam, the video always seems to be
captured at 4:3 aspect ratio even with a codec size set to 1280x720.

If I specify a codec size of 1280x720, the picture is captured as 4:3
and stretched to fill the window. This on pjsip 2.7.1+openh264 1.6.

The webcam supports 16:9  capture. In v4l2_get_supported_size()
1280x720 is one of the sizes that succeeds. With v4l2-ctl the web cam
shows

YUV
Size: Discrete 1280x720
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)
M-JPEG
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.042s (24.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.133s (7.500 fps)
Interval: Discrete 0.200s (5.000 fps)

Tried a simple capture with cheese at 16:9 1280x720 and it works.

Any idea how to debug why pjsua capture is not occurring at 16:9?

Anthony Alba

Using pjsua2/linux with v4l2 usb webcam, the video always seems to be captured at 4:3 aspect ratio even with a codec size set to 1280x720. If I specify a codec size of 1280x720, the picture is captured as 4:3 and stretched to fill the window. This on pjsip 2.7.1+openh264 1.6. The webcam supports 16:9 capture. In v4l2_get_supported_size() 1280x720 is one of the sizes that succeeds. With v4l2-ctl the web cam shows YUV Size: Discrete 1280x720 Interval: Discrete 0.100s (10.000 fps) Interval: Discrete 0.133s (7.500 fps) Interval: Discrete 0.200s (5.000 fps) M-JPEG Size: Discrete 1280x720 Interval: Discrete 0.033s (30.000 fps) Interval: Discrete 0.042s (24.000 fps) Interval: Discrete 0.050s (20.000 fps) Interval: Discrete 0.067s (15.000 fps) Interval: Discrete 0.100s (10.000 fps) Interval: Discrete 0.133s (7.500 fps) Interval: Discrete 0.200s (5.000 fps) Tried a simple capture with cheese at 16:9 1280x720 and it works. Any idea how to debug why pjsua capture is not occurring at 16:9? Anthony Alba