<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.E-MailFormatvorlage17
        {mso-style-type:personal-compose;
        font-family:"Arial",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Hi, I’m having difficulties setting up a streaming pipeline on an imx6 running the mainline kernel and gstreamer 1.14.1.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">The following pipelines work as required
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">This streaming pipeline withot dma buffers and using openh264 drops lots of frames<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">./test-launch "( v4l2src min-buffers=16 device=/dev/v4l/by-path/platform-capture-subsystem-video-index4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60000/1001,interlace-mode=progressive,colorimetry=bt709
 ! videorate drop-only=true skip-to-first=true !videoconvert ! video/x-raw,framerate=30/1 ! openh264enc  ! video/x-h264,profile=baseline ! queue ! h264parse ! rtph264pay name=pay0<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">pt=96 )"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">This recording pipeline using dma buffers and v4l2h264enc storing to file also works<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">gst-launch-1.0 v4l2src min-buffers=10 num-buffers=150 device=/dev/v4l/by-path/platform-capture-subsystem-video-index4 io-mode=dmabuf ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60000/1001
 ! v4l2h264enc output-io-mode=dmabuf-import extra-controls=cid,video_bitrate=12000000,video_gop_size=30 ! h264parse ! qtmux ! filesink location=ZNB_30fps_2.mp4<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">but streaming using v4l2h264enc and dma buffers doesn’t work<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">./test-launch "( v4l2src min-buffers=10 device=/dev/v4l/by-path/platform-capture-subsystem-video-index4 io-mode=4 ! video/x-raw,format=NV12,width=1920,height=1080,framerate=60000/1001,interlace-mode=progressive,colorimetry=bt709
 ! v4l2h264enc output-io-mode=5 output-min-buffers=6 ! video/x-h264,profile=baseline ! rtph264pay name=pay0 pt=96 )"<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">The following log is produced<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.327381335   634 0x74f0f2f0 WARN          v4l2bufferpool gstv4l2bufferpool.c:804:gst_v4l2_buffer_pool_start:<v4l2h264enc0:pool:src> Uncertain or not enough
 buffers, enabling copy threshold<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.582559335   634 0x74f0f2f0 WARN            v4l2videoenc gstv4l2videoenc.c:782:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Failed to allocate required
 memory.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.582796001   634 0x74f0f2f0 WARN            v4l2videoenc gstv4l2videoenc.c:782:gst_v4l2_video_enc_handle_frame:<v4l2h264enc0> error: Buffer pool activation
 failed<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.583304001   634 0x74f0f2f0 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.583435001   634 0x74f0f2f0 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason error (-5)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.583347335   634 0x75c0e860 WARN               rtspmedia rtsp-media.c:2720:default_handle_message: 0x75c1ce18: got error Failed to allocate required memory.
 (gstv4l2videoenc.c(782): gst_v4l2_video_enc_handle_frame (): /GstPipeline:media-pipeline/GstBin:bin0/v4l2h264enc:v4l2h264enc0:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Buffer pool activation failed)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.583797668   634  0x10adc90 WARN               rtspmedia rtsp-media.c:2989:wait_preroll: failed to preroll pipeline<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.583841335   634 0x75c0e860 WARN               rtspmedia rtsp-media.c:2720:default_handle_message: 0x75c1ce18: got error Internal data stream error. (gstbasesrc.c(3055):
 gst_base_src_loop (): /GstPipeline:media-pipeline/GstBin:bin0/GstV4l2Src:v4l2src0:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">streaming stopped, reason error (-5))<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.584003001   634  0x10adc90 WARN               rtspmedia rtsp-media.c:3293:gst_rtsp_media_prepare: failed to preroll pipeline<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.601349335   634  0x10adc90 ERROR             rtspclient rtsp-client.c:1044:find_media: client 0x10b8898: can't prepare media<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">0:00:07.603700001   634  0x10adc90 ERROR             rtspclient rtsp-client.c:2898:handle_describe_request: client 0x10b8898: no media<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Maybe someone has an explanation as to what is wrong with the last pipeline. I can’t explain why it doesn’t work<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">It also makes no difference if I reduce the framerate using videorate.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.0pt;font-family:"Arial",sans-serif">Thanks for any replies<o:p></o:p></span></p>
</div>
</body>
</html>