AnsweredAssumed Answered

iMX6-to-PC h.264 Video Streaming

Question asked by Dmitry Varakin on Oct 9, 2013
Latest reply on Jul 7, 2015 by Anthony Massa

Hello All,

 

I'm trying to stream video from iMX6Q SABRE-SBP board to PC with gsteamer. I'm using Linux BSP 4.1.0 from Freescale Web with all necessary codecs installed. On PC side I have VLC player. I can successfully stream h.263 @ 1080p via 'tcpserversink' but I cannot do it for h.264 @ any resolution.

 

I'm aware about the bug discussed on the link below so locally I can get both h.263 and h.264 compressed files at 1080p.

gstreamer vpuenc H.264 encoder (codec=6) output not compressed

 

Similar problem has been discussed in the topic below but it ended up with streaming trough UDP (not clear successfuly or not).

H246 Network Streaming - iMX6 SabreLite - gstreamer

 

So far for me this works:

gst-launch mfw_v4lsrc device=/dev/video1 capture-mode=0 ! queue ! vpuenc codec=h263 bitrate=1000000 ! tcpserversink host=192.168.0.1 port=5000

This is not:

gst-launch mfw_v4lsrc device=/dev/video1 capture-mode=0 ! queue ! vpuenc codec=avc bitrate=1000000 ! tcpserversink host=192.168.0.1 port=5000

 

VLC captures h.264 stream but does not recognize it:

 

vlc.PNG.png

 

Output of gst-launch with debug:

 

MFW_GST_V4LSRC_PLUGIN 3.0.7 build on Oct  8 2013 08:22:08.

Setting pipeline to PAUSED ...

[INFO]  Product Info: i.MX6Q/D/S

vpuenc versions

        plugin: 3.0.7

        wrapper: 1.0.35(VPUWRAPPER_ARM_LINUX Build on Oct  8 2013 07:45:40)

        vpulib: 5.4.16

        firmware: 2.3.10.40778

/GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

0:00:01.350511025  3936    0x17050 WARN                     bin gstbin.c:2384:gst_bin_do_latency_func:<pipeline0> failed to query latency

New clock: GstSystemClock

0:00:01.417785358  3936 0x2bc06c30 WARN                  vpuenc vpuenc.c:1391:gst_vpuenc_sink_event: Unsupport newsegment format 2

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1

/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1

/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:sink: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)640, height=(int)480, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1

[INFO]  chromaInterleave 0, mapType 0, linear2TiledEnable 0

/GstPipeline:pipeline0/GstVpuEnc:vpuenc0.GstPad:src: caps = video/x-h264, width=(int)640, height=(int)480, framerate=(fraction)30/1, framed=(boolean)true

/GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0.GstPad:sink: caps = video/x-h264, width=(int)640, height=(int)480, framerate=(fraction)30/1, framed=(boolean)true

0:00:01.464051691  3936 0x2bc06c30 WARN                basesink gstbasesink.c:3626:gst_base_sink_chain_unlocked:<tcpserversink0> warning: Internal data flow problem.

0:00:01.464184024  3936 0x2bc06c30 WARN                basesink gstbasesink.c:3626:gst_base_sink_chain_unlocked:<tcpserversink0> warning: Received buffer without a new-segment. Assuming timestamps start from 0.

WARNING: from element /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0: Internal data flow problem.

Additional debug info:

gstbasesink.c(3626): gst_base_sink_chain_unlocked (): /GstPipeline:pipeline0/GstTCPServerSink:tcpserversink0:

Received buffer without a new-segment. Assuming timestamps start from 0.

0:00:01.466439691  3936    0xaffd0 WARN                     bin gstbin.c:2380:gst_bin_do_latency_func:<pipeline0> did not really configure latency of 0:00:00.000000000

0:00:10.838372025  3936    0x19258 WARN                GST_POLL gstpoll.c:1035:gst_poll_fd_has_closed: 0x95dc8: couldn't find fd !

0:00:10.838653025  3936    0x19258 WARN                GST_POLL gstpoll.c:1084:gst_poll_fd_has_error: 0x95dc8: couldn't find fd !

0:00:10.838765358  3936    0x19258 WARN                GST_POLL gstpoll.c:1112:gst_poll_fd_can_read_unlocked: 0x95dc8: couldn't find fd !

0:00:10.838865025  3936    0x19258 WARN                GST_POLL gstpoll.c:1184:gst_poll_fd_can_write: 0x95dc8: couldn't find fd !

 

 

'videotestsrc' shows the same behavior.

 

Did someone succeed to stream h.264 to PC?

 

--

Dmitry

Outcomes