The issue: How do I automatically remove the black border when computer drops to 1280x786 or any other non-native resolution and upscale to 1920x1080? The downstream device is fixed resolution so adjusting the downstream device (stdout) is not possible.
Background: I have a HDMI to USB converter and are pulling a 1920x1080 image/jpeg stream from the device. When there is a mismatch between the end device (computer) and the fixed resolution, the USB device adds black boarders instead of up-scaling the incoming HDMI image.
Videobox will crop based on caps or on a manual specs. How can I automate the crop to remove a black border and then resize the image to fit the caps (videoconvert can take care of this I assume if the caps are adjusted with a crop)
gst-launch-1.0 -v v4l2src device=/dev/v4l/by-id/usb-MACROSILICON_USB_Video-video-index0 ! jpegdec ! videoconvert !
videobox autocrop=true !
videoscale ! videorate !
omxh264enc !
video/x-h264,profile=baseline,height=1080,width=1920,stream-format=byte-stream,framerate=15/1 !
filesink location=/dev/stdout
