omxh264enc with gst-rtsp-server-1.8.3.tar.xz

Hello everyone!
I want to transmit rtsp stream,coded by omxh264enc.

GST_DEBUG=2 ./test-launch “v4l2src device=/dev/video2 ! nvvidconv ! video/x-raw(memory:NVMM), width=1280, height=720, frametate=25/1, format=NV12 ! omxh264enc bitrate=10000000 ! rtph264pay name=pay0 pt=96”

When I open the link rtsp://192.168.1.125:8554/test on VLC,it didn’t work.and I got the message.

0:00:02.793541056 10543 0x60e8a0 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/nvidia/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:02.912809280 10543 0x7f9800ead0 WARN v4l2src gstv4l2src.c:578:gst_v4l2src_query: Can’t give latency since framerate isn’t fixated !
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:03.315704544 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:03.315857728 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:03.316090656 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:03.317614592 10543 0x7f7c002770 ERROR omx gstomx.c:256:gst_omx_component_handle_messages: encoder port 0 was not flushing
0:00:03.317771232 10543 0x7f7c002770 ERROR omx gstomx.c:256:gst_omx_component_handle_messages: encoder port 1 was not flushing
0:00:03.317843488 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:03.318043040 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:03.318143776 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:03.318311616 10543 0x7f9001dc00 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:capsfilter0:src could not send sticky events
0:00:03.325127904 10543 0x7f9001dc00 WARN v4l2bufferpool gstv4l2bufferpool.c:748:gst_v4l2_buffer_pool_start:v4l2src0:pool:src Uncertain or not enough buffers, enabling copy threshold
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:03.991369760 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:03.991442240 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:03.991480224 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:03.999601760 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:03.999665280 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:03.999699744 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:03.999879552 10543 0x7f9001dc00 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop: error: Internal data flow error.
0:00:03.999919232 10543 0x7f9001dc00 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop: error: streaming task paused, reason not-negotiated (-4)
0:00:04.000166496 10543 0x7f9800ead0 WARN rtspmedia rtsp-server/rtsp-media.c:2278:default_handle_message: 0x7f9805d1b0: got error Internal data flow error. (gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:media-pipeline/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4))
0:00:04.000303392 10543 0x60e8a0 WARN rtspmedia rtsp-server/rtsp-media.c:2573:wait_preroll: failed to preroll pipeline
0:00:04.000349408 10543 0x60e8a0 WARN rtspmedia rtsp-server/rtsp-media.c:2877:gst_rtsp_media_prepare: failed to preroll pipeline
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:04.001623520 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:04.001679904 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:04.001716096 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:04.002499744 10543 0x7f9001dc00 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:04.002555840 10543 0x7f9001dc00 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:04.002588640 10543 0x7f9001dc00 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:04.021991072 10543 0x60e8a0 ERROR rtspclient rtsp-server/rtsp-client.c:763:find_media: client 0x65f0d0: can’t prepare media
0:00:04.022746144 10543 0x60e8a0 ERROR rtspclient rtsp-server/rtsp-client.c:2288:handle_describe_request: client 0x65f0d0: no media
0:00:06.530970176 10543 0x7f9001dca0 WARN v4l2src gstv4l2src.c:578:gst_v4l2src_query: Can’t give latency since framerate isn’t fixated !
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:06.933399232 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:06.933544960 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:06.933632096 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:06.935466272 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:06.935585216 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:06.935660000 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:06.935821696 10543 0x7f9004e230 WARN GST_PADS gstpad.c:4092:gst_pad_peer_query:capsfilter1:src could not send sticky events
0:00:06.942309024 10543 0x7f9004e230 WARN v4l2bufferpool gstv4l2bufferpool.c:748:gst_v4l2_buffer_pool_start:v4l2src1:pool:src Uncertain or not enough buffers, enabling copy threshold
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:07.608947296 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:07.609021248 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:07.609059936 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:07.617062304 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:07.617124608 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:07.617163136 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:07.617294560 10543 0x7f9004e230 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop: error: Internal data flow error.
0:00:07.617331200 10543 0x7f9004e230 WARN basesrc gstbasesrc.c:2948:gst_base_src_loop: error: streaming task paused, reason not-negotiated (-4)
0:00:07.617510848 10543 0x7f9001dca0 WARN rtspmedia rtsp-server/rtsp-media.c:2278:default_handle_message: 0x7f8c00c180: got error Internal data flow error. (gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:media-pipeline/GstPipeline:pipeline1/GstV4l2Src:v4l2src1:
streaming task paused, reason not-negotiated (-4))
0:00:07.617633088 10543 0x7f90004630 WARN rtspmedia rtsp-server/rtsp-media.c:2573:wait_preroll: failed to preroll pipeline
0:00:07.617682528 10543 0x7f90004630 WARN rtspmedia rtsp-server/rtsp-media.c:2877:gst_rtsp_media_prepare: failed to preroll pipeline
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:07.618185536 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:07.618243296 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:07.618278976 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
Framerate set to : 10 at NvxVideoEncoderSetParameter0:00:07.618954336 10543 0x7f9004e230 ERROR omxh264enc gstomxh264enc.c:429:gst_omx_h264_enc_set_format: Unsupported profile constrained-baseline
0:00:07.619006912 10543 0x7f9004e230 ERROR omxvideoenc gstomxvideoenc.c:1815:gst_omx_video_enc_set_format: Subclass failed to set the new format
0:00:07.619038144 10543 0x7f9004e230 WARN videoencoder gstvideoencoder.c:623:gst_video_encoder_setcaps: rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, framerate=(fraction)10/1, frametate=(fraction)25/1, format=(string)NV12
0:00:07.638185280 10543 0x7f90004630 ERROR rtspclient rtsp-server/rtsp-client.c:763:find_media: client 0x65f1c0: can’t prepare media
0:00:07.638863520 10543 0x7f90004630 ERROR rtspclient rtsp-server/rtsp-client.c:2049:handle_setup_request: client 0x65f1c0: media ‘/test’ not found

How to solve it? Thank you in advance!

Hi,
Can you run the pipeline via gst-launch-1.0?

$ gst-launch-1.0 v4l2src device=/dev/video2 ! nvvidconv ! video/x-raw(memory:NVMM), width=1280, height=720, frametate=25/1, format=NV12 ! omxh264enc bitrate=10000000 ! rtph264pay name=pay0 pt=96 ! fakesink

You may also try to add baseline profile into omxh264enc output caps. Check this post and adjust bitrate for your case.

Hi,Honey_Patouceul.
Thank you for your help, I solved my problem.

./test-launch “v4l2src device=/dev/video2 ! nvvidconv ! video/x-raw(memory:NVMM),width=1280,height=720,frametate=25/1,format=NV12 ! omxh264enc bitrate=20000000 ! video/x-h264, profile=baseline ! rtph264pay name=pay0 pt=96”