Hi,
I am trying to up-scale the video input (2504x1438) to match the native display resolution (3840x2160) while maintaining the aspect-ratio. For this purpose, I use the following GStreamer pipeline:
sudo gst-launch-1.0 -e nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), format=(string)BGRx, width=(int)2504, height=(int)1438, framerate=(fraction)30/1' ! nvvidconv ! 'video/x-raw(memory:NVMM), format=(string)RGBA' ! videoscale add-borders=true ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160' ! nvdrmvideosink set-mode=1 color-range=1
This pipeline generates the following output:
Setting pipeline to PAUSED ...
Using VT number 1
/dev/tty1 is in graphics mode
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)2504, height=(int)1438, format=(string)BGRx, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)2504, height=(int)1438, format=(string)BGRx, interlace-mode=(string)progressive, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)2504, height=(int)1438, format=(string)BGRx, interlace-mode=(string)progressive, framerate=(fraction)30/1
ERROR: from element /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstNvV4l2CameraSrc:nvv4l2camerasrc0:
streaming stopped, reason not-negotiated (-4)
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
It turns out every scaling attempt fails. Only when keeping the input resolution, the pipeline executes successfully. I also used nvvidconv
for scaling according to NVIDIA Jetson Linux Driver Package Software Features with nvdrmvideosink
but ended up with the same error.
Therefore, I simplified the pipeline to research the error and realized that scaling doesn’t work when setting the option set-mode=1
. But we need to set the color range and therefore this option has to be set.
So, the questions are:
- Is there a way to use
videoscale
withnvdrmvideosink set-mode=1 color-range=1
? - Is there another way to change the color range (X11 Window System deactivated)?
Best regards
Bruno