Gstreamer Pipeline having problems while trying to encode a stream using vaapiencode_h264 plugin

Hi all !

I am working on an app that accepts Opencv frames (originated via opencv camera Api) and tries to send those frames into the network after encoding them to H264 frames.

For this project I was asked to perform the encoding via hardware.

I used the below pipeline to do the encoding bit of the transmitter:

gst-launch-1.0 appsrc name=applicationSource ! videoconvert !
video/x-raw,width=640,format=I420,height=480,framerate=15/1 !
vaapiencode_h264 ! vaapiparse_h264 config-interval=1 ! rtph264pay
config-interval=1 ! gdppay ! tcpserversink host=127.0.0.1 port=5002
sync=false"

The Caps for my Appsrc are :
"video/x-raw",
"format"“RGB”,
"width"640,"height"480,
"framerate", 15, 1,
"pixel-aspect-ratio" 1, 1,

This pipeline however gives me the below error when i try to run it:

libva info: VA-API version 0.37.0
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_37
libva info: va_openDriver() returns 0

0:00:04.597696251 23508 0x7f724003f940 WARN GST_PADS
gstpad.c:3739:gst_pad_peer_query: could not send sticky events

0:00:05.030818739 23508 0x7f724003f940 WARN basesrc
gstbasesrc.c:2933:gst_base_src_loop: error: Internal data flow error.

0:00:05.030864404 23508 0x7f724003f940 WARN basesrc
gstbasesrc.c:2933:gst_base_src_loop: error**: streaming task paused,
reason not-negotiated (-4)**

Error : Internal data flow error.

0:00:05.032763231 23508 0x7f724003f940 WARN baseparse
gstbaseparse.c:1155:gst_base_parse_sink_event_default: error: No valid
frames found before end of stream

Error : No valid frames found before end of stream

As I have highlighted, the pipeline does not start due to negotiation issues

I have tested my Appsrc and it seems to be working (receiving data).

Could anyone suggest any other additions to pipeline/new pipeline to overcome this ??

PS: I had tried this pipeline with a camera v4l2src plugin and the pipeline seems to be working in good condition !

Any help would be nice !

Thanks !

-V

Had this Fixed today … Was an issue due to unmatching caps in Appsrc…
However, I still have issues of getting a bluish tinge in my video. :confused:

I am using a Vaapi pipeline SET as below :

Sender side
appsrc name=applicationSource ! videoconvert !
video/x-raw,width=640,format=I420,height=480,framerate=15/1 !
vaapiencode_h264 ! vaapiparse_h264 config-interval=1 ! rtph264pay
config-interval=1 ! gdppay ! tcpserversink host=127.0.0.1 port=5002
sync=false"

Receiver Side:
tcpclientsrc host=<> port=5002 ! gdpdepay ! rtph264depay ! h264parse ! vaapidecode ! vaapisink sync=false

Is there any reason that We are getting a bluish tinge in the video… ??

Thanks,
Varun