Gray Scale in gstreamer

While streaming live In H264 camera there is a Gray scale in the video for sometime how to overcome it

Our pipeline is
'appsrc name=source is-live=true block=true format=GST_FORMAT_TIME ’
'caps=video/x-raw,format=BGR,width=640,height=480,framerate=30/1 ’
'! videoconvert ! video/x-raw,format=NV12 ! x264enc speed-preset=ultrafast tune=zerolatency ’
'! rtph264pay config-interval=1 name=pay0 pt=96 ’ \

Sorry, I am unsure I correctly understand your problem. You may futher explain if it happens only when starting or during playing.

You may try these pipelines:

'appsrc name=source is-live=true block=true format=GST_FORMAT_TIME '
'caps=video/x-raw,format=BGR,width=640,height=480,framerate=30/1 '
'! videoconvert ! video/x-raw,format=NV12 '
'! x264enc speed-preset=ultrafast tune=zerolatency key-int-max=30 insert-vui=1 '
'! rtph264pay name=pay0 pt=96 ' 

Or using HW encoder:

'appsrc name=source is-live=true block=true format=GST_FORMAT_TIME '
'caps=video/x-raw,format=BGR,width=640,height=480,framerate=30/1 '
'! videoconvert ! video/x-raw,format=BGRx '
'! nvvidconv ! video/x-raw(memory:NVMM),format=NV12 '
'! nvv4l2h264enc maxperf-enable=1 insert-sps-pps=1 idrinterval=30 insert-vui=1 '
'! rtph264pay name=pay0 pt=96 '
1 Like

Hello, sorry for the Late reply
The gray scale has gone by using the above pipeline but the video gets pixelated(blurry)
and It is only received in 640,480 but we need 1920,1080

The pixelated/blurry cause may be lost UDP packets. If this is used for RTSP streaming, you may try client to request TCP transport (such as using uri rtspt:// or set protocols=tcp as property of rtspsrc in receiver).

If your app source is only framing 640x480 but you want the stream to be 1920x1080, you may use:

'appsrc name=source is-live=true block=true format=GST_FORMAT_TIME '
'caps=video/x-raw,format=BGR,width=640,height=480,framerate=30/1 '
'! videoconvert ! video/x-raw,format=BGRx '
'! nvvidconv ! video/x-raw(memory:NVMM),format=NV12,width=1920,height=1080 '
'! nvv4l2h264enc maxperf-enable=1 insert-sps-pps=1 idrinterval=30 insert-vui=1 '
'! rtph264pay name=pay0 pt=96 '
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.