Why does omxh264enc to v4l2sink fail?

Hi,

I am trying to use a gstreamer pipeline on TX2 to convert an RTSP stream to a h264 stream using v4l2loopback. I cannot understand why there is an error when I ran the following pipeline:

gst-launch-1.0 --gst-debug-level=3  rtspsrc location=rtsp://url ! decodebin ! nvvidconv ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! v4l2sink device=/dev/video2

I looked at the sink and source pads of v4l2sink and omxh264enc and they look like they have compatible pads and I can’t figure out why is it not working.

Here is the output:

0:00:00.043281820 32408       0x5ab320 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/ubuntu/.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)
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://url
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
0:00:00.134429729 32408   0x7f88033b20 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
0:00:02.304796465 32408   0x7f6c003370 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:02.310329510 32408   0x7f6c003370 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
TVMR: cbBeginSequence: 1179: BeginSequence  1920x1088, bVPR = 0
TVMR: LowCorner Frequency = 180000 
TVMR: cbBeginSequence: 1529: DecodeBuffers = 5, pnvsi->eCodec = 4, codec = 0 
TVMR: cbBeginSequence: 1600: Display Resolution : (1920x1080) 
TVMR: cbBeginSequence: 1601: Display Aspect Ratio : (1920x1080) 
TVMR: cbBeginSequence: 1669: ColorFormat : 5 
TVMR: cbBeginSequence:1674 ColorSpace = NvColorSpace_YCbCr709_ER
TVMR: cbBeginSequence: 1809: SurfaceLayout = 3
TVMR: cbBeginSequence: 1902: NumOfSurfaces = 12, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat = 5
TVMR: cbBeginSequence: 1904: BeginSequence  ColorPrimaries = 1, TransferCharacteristics = 1, MatrixCoefficients = 1
Allocating new output: 1920x1088 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 1920, nFrameHeight = 1088 
0:00:02.718423178 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:02.718530827 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at UYVY@48x32: 0
0:00:02.718579820 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at 422P@48x32: 0
0:00:02.718624204 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YU12@48x32: 0
0:00:02.718664493 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YV12@48x32: 0
0:00:02.718709357 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at 411P@48x32: 0
0:00:02.718752750 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVU9@48x32: 0
0:00:02.718793582 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUV9@48x32: 0
0:00:02.718838446 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at JPEG@48x32: 0
0:00:02.718871151 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MJPG@48x32: 0
0:00:02.718908271 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at dvsd@48x32: 0
0:00:02.718942831 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB4@48x32: 0
0:00:02.718977840 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR4@48x32: 0
0:00:02.719013168 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB3@48x32: 0
0:00:02.719047312 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR3@48x32: 0
0:00:02.719082161 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at NV12@48x32: 0
0:00:02.719119057 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBQ@48x32: 0
0:00:02.719153937 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBP@48x32: 0
0:00:02.719192466 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBO@48x32: 0
0:00:02.719245490 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BA81@48x32: 0
0:00:02.719287539 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GBRG@48x32: 0
0:00:02.719321779 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GRBG@48x32: 0
0:00:02.719354067 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGGB@48x32: 0
0:00:02.719387252 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GREY@48x32: 0
0:00:02.719424116 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VP80@48x32: 0
0:00:02.719458356 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VC1L@48x32: 0
0:00:02.719491605 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VC1G@48x32: 0
0:00:02.719525205 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at XVID@48x32: 0
0:00:02.719557589 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG4@48x32: 0
0:00:02.719597206 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG2@48x32: 0
0:00:02.719628694 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG1@48x32: 0
0:00:02.719662134 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at H263@48x32: 0
0:00:02.719696886 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at AVC1@48x32: 0
0:00:02.719731063 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at H264@48x32: 0
0:00:02.719764055 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at Y16 @48x32: 0
0:00:02.719800823 32408   0x7f88005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVYU@48x32: 0
0:00:02.720948994 32408   0x7f88005a30 FIXME           videoencoder gstvideoencoder.c:606:gst_video_encoder_setcaps:<omxh264enc-omxh264enc0> GstVideoEncoder::reset() is deprecated
Framerate set to : 25 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
0:00:02.722269679 32408   0x7f88005a30 WARN             omxvideoenc gstomxvideoenc.c:1860:gst_omx_video_enc_set_format:<omxh264enc-omxh264enc0> Error setting temporal_tradeoff 0 : Vendor specific error (0x00000001)
0:00:02.730449501 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.730570494 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.730611838 32408   0x7f78007400 WARN                GST_PADS gstpad.c:4092:gst_pad_peer_query:<omxh264enc-omxh264enc0:src> could not send sticky events
0:00:02.730868065 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.730974370 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.731023522 32408   0x7f78007400 WARN             omxvideoenc gstomxvideoenc.c:1383:gst_omx_video_enc_loop:<omxh264enc-omxh264enc0> error: Internal data stream error.
0:00:02.731036546 32408   0x7f78007400 WARN             omxvideoenc gstomxvideoenc.c:1383:gst_omx_video_enc_loop:<omxh264enc-omxh264enc0> error: stream stopped, reason not-negotiated
0:00:02.731140515 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Internal data stream error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(1383): gst_omx_video_enc_loop (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
stream stopped, reason not-negotiated
Execution ended after 0:00:02.597225063
Setting pipeline to PAUSED ...
0:00:02.731225412 32408   0x7f78007400 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
TVMR: FrameRate = 25 
TVMR: NVDEC LowCorner Freq = (150000 * 1024) 
Setting pipeline to READY ...
0:00:02.734541667 32408   0x7f88005a30 WARN             omxvideodec gstomxvideodec.c:2904:gst_omx_video_dec_loop:<omxh264dec-omxh264dec0> error: Internal data stream error.
0:00:02.734690917 32408   0x7f88005a30 WARN             omxvideodec gstomxvideodec.c:2904:gst_omx_video_dec_loop:<omxh264dec-omxh264dec0> error: stream stopped, reason not-negotiated
0:00:02.738661675 32408       0x5b2990 WARN                 rtspsrc gstrtspsrc.c:5670:gst_rtspsrc_send:<rtspsrc0> error: Got error response: 455 (Method Not Valid in This State).
0:00:02.738743051 32408       0x5b2990 WARN                 rtspsrc gstrtspsrc.c:7550:gst_rtspsrc_pause:<rtspsrc0> error: Could not send message. (Generic error)
TVMR: TVMRFrameStatusReporting: 6132: Closing TVMR Frame Status Thread -------------
TVMR: TVMRVPRFloorSizeSettingThread: 5942: Closing TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 5982: Closing TVMR Frame Delivery Thread -------------
TVMR: NvMMLiteTVMRDecBlockClose: 7815: Done 
Setting pipeline to NULL ...
Freeing pipeline ...

Swapping v4l2sink with filesink seems to work:

gst-launch-1.0 --gst-debug-level=3  rtspsrc location=rtsp://url ! decodebin ! nvvidconv ! omxh264enc ! 'video/x-h264, streamformat=(string)byte-stream' ! filesink location=/tmp/test.h264

Help?

Please refer to
https://devtalk.nvidia.com/default/topic/1023416/jetson-tx1/error-building-v4l2loopback/post/5228430/#5228430

I removed v4l2loopback-dkms, then followed the steps mentioned in that post, reboot, ran “insmod ./v4l2loopback.ko devices=1 video_nr=1 exclusive_caps=1” then ran the same pipeline.

There are more warnings this time but it still didn’t work:

ubuntu@tegra-ubuntu:~/oba$ gst-launch-1.0 --gst-debug-level=3  rtspsrc location=rtsp://url ! decodebin ! nvvidconv ! omxh264enc ! 'video/x-h264, stream-format=(string)byte-stream' ! v4l2sink device=/dev/video1
0:00:00.043503552 23119       0x5ab2f0 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/ubuntu/.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)
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://url
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
Progress: (request) SETUP stream 0
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
0:00:00.146759776 23119   0x7f98033b20 FIXME                default gstutils.c:3766:gst_pad_create_stream_id_internal:<fakesrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
0:00:02.294142624 23119   0x7f7c003370 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7647: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
0:00:02.298174784 23119   0x7f7c003370 FIXME           videodecoder gstvideodecoder.c:946:gst_video_decoder_drain_out:<omxh264dec-omxh264dec0> Sub-class should implement drain()
TVMR: cbBeginSequence: 1179: BeginSequence  1920x1088, bVPR = 0
TVMR: LowCorner Frequency = 180000 
TVMR: cbBeginSequence: 1529: DecodeBuffers = 5, pnvsi->eCodec = 4, codec = 0 
TVMR: cbBeginSequence: 1600: Display Resolution : (1920x1080) 
TVMR: cbBeginSequence: 1601: Display Aspect Ratio : (1920x1080) 
TVMR: cbBeginSequence: 1669: ColorFormat : 5 
TVMR: cbBeginSequence:1674 ColorSpace = NvColorSpace_YCbCr709_ER
TVMR: cbBeginSequence: 1809: SurfaceLayout = 3
TVMR: cbBeginSequence: 1902: NumOfSurfaces = 12, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat = 5
TVMR: cbBeginSequence: 1904: BeginSequence  ColorPrimaries = 1, TransferCharacteristics = 1, MatrixCoefficients = 1
Allocating new output: 1920x1088 (x 12), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 1920, nFrameHeight = 1088 
0:00:02.702944032 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUYV@48x32: 0
0:00:02.703059360 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at UYVY@48x32: 0
0:00:02.703115520 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at 422P@48x32: 0
0:00:02.703168576 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YU12@48x32: 0
0:00:02.703217920 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YV12@48x32: 0
0:00:02.703256736 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at 411P@48x32: 0
0:00:02.703301696 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVU9@48x32: 0
0:00:02.703349024 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YUV9@48x32: 0
0:00:02.703390720 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at JPEG@48x32: 0
0:00:02.703424832 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MJPG@48x32: 0
0:00:02.703452256 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at dvsd@48x32: 0
0:00:02.703481792 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB4@48x32: 0
0:00:02.703514016 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR4@48x32: 0
0:00:02.703545440 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGB3@48x32: 0
0:00:02.703575616 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BGR3@48x32: 0
0:00:02.703608320 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at NV12@48x32: 0
0:00:02.703642272 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBQ@48x32: 0
0:00:02.703675232 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBP@48x32: 0
0:00:02.703711072 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGBO@48x32: 0
0:00:02.703744736 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at BA81@48x32: 0
0:00:02.703773792 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GBRG@48x32: 0
0:00:02.703802112 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GRBG@48x32: 0
0:00:02.703829824 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at RGGB@48x32: 0
0:00:02.703857920 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at GREY@48x32: 0
0:00:02.703889760 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VP80@48x32: 0
0:00:02.703921248 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VC1L@48x32: 0
0:00:02.703950880 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at VC1G@48x32: 0
0:00:02.703980992 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at XVID@48x32: 0
0:00:02.704018016 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG4@48x32: 0
0:00:02.704047648 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG2@48x32: 0
0:00:02.704075104 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at MPG1@48x32: 0
0:00:02.704103744 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at H263@48x32: 0
0:00:02.704134528 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at AVC1@48x32: 0
0:00:02.704164256 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at H264@48x32: 0
0:00:02.704196224 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at Y16 @48x32: 0
0:00:02.704237056 23119   0x7f98005a30 WARN                    v4l2 gstv4l2object.c:2389:gst_v4l2_object_probe_caps_for_format_and_size:<v4l2sink0> Unknown frame interval type at YVYU@48x32: 0
0:00:02.705271968 23119   0x7f98005a30 FIXME           videoencoder gstvideoencoder.c:606:gst_video_encoder_setcaps:<omxh264enc-omxh264enc0> GstVideoEncoder::reset() is deprecated
Framerate set to : 25 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4 
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
0:00:02.706598560 23119   0x7f98005a30 WARN             omxvideoenc gstomxvideoenc.c:1860:gst_omx_video_enc_set_format:<omxh264enc-omxh264enc0> Error setting temporal_tradeoff 0 : Vendor specific error (0x00000001)
TVMR: FrameRate = 25 
TVMR: NVDEC LowCorner Freq = (150000 * 1024) 
0:00:02.714789056 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.714901792 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.714939488 23119   0x7f88008280 WARN                GST_PADS gstpad.c:4092:gst_pad_peer_query:<omxh264enc-omxh264enc0:src> could not send sticky events
0:00:02.715118752 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.715209856 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
0:00:02.715254016 23119   0x7f88008280 WARN             omxvideoenc gstomxvideoenc.c:1383:gst_omx_video_enc_loop:<omxh264enc-omxh264enc0> error: Internal data stream error.
0:00:02.715268128 23119   0x7f88008280 WARN             omxvideoenc gstomxvideoenc.c:1383:gst_omx_video_enc_loop:<omxh264enc-omxh264enc0> error: stream stopped, reason not-negotiated
0:00:02.715367488 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Internal data stream error.
Additional debug info:
/dvs/git/dirty/git-master_linux/external/gstreamer/gst-omx/omx/gstomxvideoenc.c(1383): gst_omx_video_enc_loop (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:
stream stopped, reason not-negotiated
Execution ended after 0:00:02.569222848
0:00:02.715428864 23119   0x7f88008280 WARN           basetransform gstbasetransform.c:1414:gst_base_transform_setcaps:<capsfilter0> transform could not transform video/x-h264, alignment=(string)au, profile=(string)baseline, level=(string)4, stream-format=(string)byte-stream, width=(int)1920, height=(int)1080, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1 in anything we support
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
0:00:02.715899520 23119   0x7f98005a30 WARN             omxvideodec gstomxvideodec.c:2904:gst_omx_video_dec_loop:<omxh264dec-omxh264dec0> error: Internal data stream error.
0:00:02.715921472 23119   0x7f98005a30 WARN             omxvideodec gstomxvideodec.c:2904:gst_omx_video_dec_loop:<omxh264dec-omxh264dec0> error: stream stopped, reason not-negotiated
0:00:02.733589152 23119       0x4cdd90 WARN                 rtspsrc gstrtspsrc.c:5670:gst_rtspsrc_send:<rtspsrc0> error: Got error response: 455 (Method Not Valid in This State).
0:00:02.733677472 23119       0x4cdd90 WARN                 rtspsrc gstrtspsrc.c:7550:gst_rtspsrc_pause:<rtspsrc0> error: Could not send message. (Generic error)
TVMR: TVMRFrameStatusReporting: 6132: Closing TVMR Frame Status Thread -------------
TVMR: TVMRVPRFloorSizeSettingThread: 5942: Closing TVMRVPRFloorSizeSettingThread -------------
TVMR: TVMRFrameDelivery: 5982: Closing TVMR Frame Delivery Thread -------------
TVMR: NvMMLiteTVMRDecBlockClose: 7815: Done 
Setting pipeline to NULL ...
Freeing pipeline ...

Hi,
Does below pipeline work? It is the pipeline we have verified.

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! nvtee ! nvvidconv flip-method=2 ! 'video/x-raw, format=(string)I420, framerate=(fraction)30/1' ! tee ! v4l2sink device=/dev/video1

Yes that pipeline works for me, but I need it to be video/x-h264. Is my pipeline missing some conversion somewhere that is causing the Internal data stream error when I set my capsfilter for video/x-h264?

I get the same error using this:

gst-launch-1.0 nvcamerasrc ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)I420, framerate=(fraction)30/1' ! nvtee ! nvvidconv flip-method=2 ! omxh264enc ! 'video/x-h264, framerate=(fraction)30/1' ! v4l2sink device=/dev/video1

Hi,
It looks to be an issue in gstreamer frameworks. Without NVIDIA elements, it still cannot configure video/x-h264 to v4l2sink.

nvidia@tegra-ubuntu:~$ gst-launch-1.0 videotestsrc ! video/x-raw,format=I420 ! x264enc ! video/x-h264 ! v4l2sink device=/dev/video1
Setting pipeline to PAUSED ...
libv4l2: error getting pixformat: Invalid argument
Pipeline is PREROLLING ...
Redistribute latency...
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:
streaming task paused, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

Suggest you go to http://gstreamer-devel.966125.n4.nabble.com/