Link of nv_omx_h264enc and rtph264pay

There is the GStreamer examples in this URL.

http://developer.toradex.com/knowledge-base/video-playback-(linux)

This example works.

gst-launch -v filesrc location=temp.mp4 ! qtdemux name=demux demux.video_00 ! queue ! rtph264pay pt=96 ! udpsink host=localhost port=5000 demux.audio_00 ! queue ! rtpmp4apay pt=97 ! udpsink host=localhost port=5001

But I want to use camera input.

I tried this example, too.

gst-launch-0.10 -e v4l2src device="/dev/video0" ! ‘video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2’ ! nvvidconv ! ‘video/x-nvrm-yuv, format=(fourcc)I420’ ! nv_omx_h264enc ! rtph264pay pt=96 ! udpsink host=localhost port=5000

This example doesn’t works.

console logs:
root@colibri-t20:~# gst-launch-0.10 -e v4l2src device="/dev/video0" ! ‘video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2’ ! nvvidconv ! ‘video/x-nvrm-yuv, format=(fourcc)I420’ ! nv_omx_h264enc ! rtph264pay pt=96 ! udpsink host=localhost port=5000

Setting pipeline to PAUSED …

Pipeline is live and does not need PREROLL …

Setting pipeline to PLAYING …

New clock: GstSystemClock

NvMMLiteOpen : Block : BlockType = 4

NvRmPowerModuleClockControl on MOD[29] INST[0]

NvRmModuleResetWithHold deassert MOD[29] INST[0]

NvMMLiteBlockCreate : Block : BlockType = 4

+NvxVideoEncoderSetNvMMAttributes-NvxVideoEncoderSetNvMMAttributesERROR: from element /GstPipeline:pipelin[ 3582.022780] misc knvmap: nvmap_unpin_ids: gst-launch-0.10 unpinning unpinned handle cc84d2e0

e0/GstRtpH264Pay[ 3582.036307] misc knvmap: nvmap_unpin_ids: gst-launch-0.10 unpinning unpinned handle cc84d360

:rtph264pay0: Element doesn’t implement handling of this stream. Please file a bug.

Additional debug info:

/home/user1/work/oe-core/build/out-glibc/work/armv7at2hf-vfp-angstrom-linux-gnueabi/gst-plugins-base/0.10.36-r8/gst-plugins-base-0.10.36/gst-libs/gst/rtp/gstbasertppayload.c(850): gst_basertppayload_prepare_push (): /GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0:

subclass did not specify clock-rate

Execution ended after 377957000 ns.

Setting pipeline to PAUSED …

Setting pipeline to READY …

NvRmPowerModuleClockControl off MOD[29] INST[0]

Setting pipeline to NULL …

Freeing pipeline …

root@colibri-t20:~#

It is a same result even if I use "videotestsrc”.

So this isn’t camera issue.

gst-launch-0.10 -e videotestsrc ! ‘video/x-raw-yuv, width=(int)640, height=(int)480, format=(fourcc)YUY2’ ! nvvidconv ! ‘video/x-nvrm-yuv, format=(fourcc)I420’ ! nv_omx_h264enc ! rtph264pay pt=96 ! udpsink host=localhost port=5000

Is this a bug?

Best regards.

Please have a look at the following article on our developer website.

It seems that rtph264pay requires alignment=nal.
So try following pipeline
… ! nv_omx_h264enc ! ‘video/x-h264,stream-format=byte-stream,alignment=nal’ ! rtph264pay …

Thanks for your replay.

I was able to achieve a purpose with “alignment=nal”

I wish Example is modified.

Best regards.