x264enc on imx8m cannot be decoded

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

x264enc on imx8m cannot be decoded

1,162 Views
greeranjunk
Contributor III

i am trying to transmit the camera via udp with x264 encoding. on my computer i am receiving data but no video window is opened. when i try the same with jpeg it works fine

transmit command

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! videoconvert ! x264enc ! rtph264pay ! udpsink host=1.1.1.21 port=1223

receive command (ubuntu 18.04)

gst-launch-1.0 udpsrc port=1223 ! application/x-rtp, media=video, encoding-name=H264, payload=26 ! rtph264depay ! avdec_h264 ! xvimagesink sync=0

does anyone know why its not working?

thanks

Tags (2)
0 Kudos
3 Replies

1,029 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi ran,

Try to run the VPU element I think you can not run rtph264pay:

gst-inspect-1.0 vpudec

Regards
0 Kudos

1,029 Views
greeranjunk
Contributor III

hi Bio

i am trying to encode from the imx8m (that doesn't support vpu encoding)  to another computer that does not have a vpu so i don't understand your response.

thanks

Ran

0 Kudos

1,029 Views
greeranjunk
Contributor III

i am adding the commands with verbos

transmit

gst-launch-1.0 -vv v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! videoconvert ! x264enc ! rtph264pay ! udpsink host=172.20.20.5 port=1223
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)Y42B, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
Redistribute latency...
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)Y42B, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)30/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)bt709, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = video/x-h264, codec_data=(buffer)017a001fffe1001c677a001fbcd9405005bb016a02020280000003008000001e478c18cb01000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high-4:2:2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)7a001f, sprop-parameter-sets=(string)"Z3oAH7zZQFAFuwFqAgICgAAAAwCAAAAeR4wYyw\=\=\,aOvssiw\=", payload=(int)96, ssrc=(uint)2128043081, timestamp-offset=(uint)3746831021, seqnum-offset=(uint)8847, a-framerate=(string)30
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)7a001f, sprop-parameter-sets=(string)"Z3oAH7zZQFAFuwFqAgICgAAAAwCAAAAeR4wYyw\=\=\,aOvssiw\=", payload=(int)96, ssrc=(uint)2128043081, timestamp-offset=(uint)3746831021, seqnum-offset=(uint)8847, a-framerate=(string)30
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, codec_data=(buffer)017a001fffe1001c677a001fbcd9405005bb016a02020280000003008000001e478c18cb01000568ebecb22c, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high-4:2:2, width=(int)1280, height=(int)720, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)30/1, interlace-mode=(string)progressive, colorimetry=(string)bt709, chroma-site=(string)mpeg2
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 3746903712
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 8847

receive

gst-launch-1.0 -vv udpsrc port=1223 ! application/x-rtp, media=video, encoding-name=H264, payload=26 ! rtph264depay ! avdec_h264 ! xvimagesink sync=0
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)26, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, encoding-name=(string)H264, payload=(int)26, clock-rate=(int)90000
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)017a001fffe1001c677a001fbcd9405005bb016a02020280000003008000001e478c18cb01000568ebecb22c, level=(string)3.1, profile=(string)high-4:2:2
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, codec_data=(buffer)017a001fffe1001c677a001fbcd9405005bb016a02020280000003008000001e478c18cb01000568ebecb22c, level=(string)3.1, profile=(string)high-4:2:2
/GstPipeline:pipeline0/avdec_h264:avdec_h264-0.GstPad:src: caps = video/x-raw, format=(string)Y42B, width=(int)1280, height=(int)720, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, chroma-site=(string)mpeg2, colorimetry=(string)bt709, framerate=(fraction)30/1
Redistribute latency...

0 Kudos