Params to get Interlaced signal from SDI (v4l2src plugin)
Signal from SDI capture card:
# mwcap-info -i /dev/video1
Input specific
Signal status .......................... Valid
Type ................................... HD
Scanning type .......................... Interlaced
Color depth ............................ 10 Bits
Sampling struct ........................ Y/Cb/Cr, 4:2:2
ST352 payloadID ........................ 16778629
gst-launch-1.0 v4l2src shown options for SDI capture card:
# gst-launch-1.0 --gst-debug=v4l2src:5 v4l2src device=/dev/video1 ! fakesink 2>&1 | sed -une '/caps of src/ s/[:;] /\n/gp'
...
video/x-raw, format=(string)I420, width=(int)[ 48, 2048 ], height=(int)[ 32, 2160 ], framerate=(fraction)[ 1/1, 5000000/83333 ]
video/x-raw(format:Interlaced), format=(string)I420, width=(int)[ 48, 2048 ], height=(int)[ 32, 2160 ], framerate=(fraction)[ 1/1, 5000000/83333 ], interlace-mode=(string)alternate
...
command for get NDI from SDI:
gst-launch-1.0 -e v4l2src device="/dev/video1" do-timestamp=true pixel-aspect-ratio=1 ! video/x-raw, format=I420, width=1920, height=1080, framerate=50/1, interlace-mode=interlaced ! queue ! ndisinkcombiner name=combiner alsasrc device="hw:CARD=SDI_1,DEV=0" do-timestamp=true ! audio/x-raw, rate=96000, channels=2 ! queue ! audioconvert ! combiner.audio combiner. ! ndisink ndi-name="video1"
i think that something wrong with interlace-mode= option, because my
tests results is follow:
-
without option interlace-mode= - NDI Studio Monitor shown - 1080 50p
-
interlace-mode=Interlaced / interlace-mode=interlaced - NDI Studio Monitor shown - 1080 50p
-
interlace-mode=alternate - ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Invalid caps Additional debug info: ../sys/v4l2/gstv4l2object.c(4078): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Can't parse caps video/x-raw, format=(string)I420, width=(int)1920, height=(int)1080, framerate=(fraction)50/1, interlace-mode=(string)alternate, pixel-aspect-ratio=(fraction)1/1 ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
-
interlace-mode=interleaved - ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video1' has no supported format
I have found this link: gstreamer.freedesktop.org - raw-video-media-types
with options: [progressive, interleaved, mixed, fields, alternate]
and this link: gstreamer.freedesktop.org - GstDeinterlaceModes
with options: [auto, interlaced, disabled, auto-strict]
Which one i need to use in for parse caps?
Maybe i need to use escape symbols for correct parse video/x-raw(format:Interlaced) ?
Problem, that i split signat to NDI and RTSP and final stream - rtsp://...:8554/video1 shown 50 fps progressive, but i need 25 fps progressive for get less redundancy
ffprobe.exe rtsp://...:8554/video1 Input #0, rtsp, from 'rtsp://...:8554/video1': Metadata: title : Stream Duration: N/A, start: 0.101708, bitrate: N/A Stream #0:0: Audio: opus, 48000 Hz, stereo, fltp Stream #0:1: Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 50 fps, 50 tbr, 90k tbn
What i need to get 1080 50i for NDI (approximately as a RAW signal), at same time i use this signal for deinterlace it as 25p to RTSP