<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>One quick thing I can suggest is to try to specify the CAPS before the autovideoconvert element.<br>
</p>
<p>Otherwise there might be problems with the negotiation and starting of the pipeline<br>
</p>
<p>something like:<br>
</p>
<p><br>
</p>
<p>appsrc ! <strong>video/x-raw,format=YUY2,width=320,height=240,framerate=30/1</strong> !  v4l2video1h264enc  ....<br>
</p>
<p><br>
</p>
<p>Or whatever format you're getting the videoframes  in from the appsrc, try to specify as many details as possible<br>
</p>
<p><br>
</p>
<p>Cheers<br>
</p>
<p>Martin<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> gstreamer-devel <gstreamer-devel-bounces@lists.freedesktop.org> on behalf of simo zz <simon.zz@yahoo.com><br>
<b>Sent:</b> Friday, August 25, 2017 10:58 AM<br>
<b>To:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Subject:</b> Gstreamer pipeline through OpenCV for H264 encoded video file</font>
<div> </div>
</div>
<div>
<div style="color:#000; background-color:#fff; font-family:標楷體,dfkai-sb; font-size:16px">
<div id="yui_3_16_0_ym19_1_1503645999210_17294"><font id="yui_3_16_0_ym19_1_1503645999210_17639" face="verdana, helvetica, sans-serif" size="2">Hi all,</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_33994"><font id="yui_3_16_0_ym19_1_1503645999210_17639" face="verdana, helvetica, sans-serif" size="2"><br>
</font></div>
<div dir="ltr" id="yui_3_16_0_ym19_1_1503645999210_17512"><font id="yui_3_16_0_ym19_1_1503645999210_17642" face="verdana, helvetica, sans-serif" size="2">I am working on an IP application working with OpenCV and I need to generate an H264 encoded videos.</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_18104" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18283" face="verdana, helvetica, sans-serif" size="2">OpenCV uses GStramer to for this task, initializing the OpenCV
<b id="yui_3_16_0_ym19_1_1503645999210_33730">VideoWriter</b> object with a </font>
<font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">GStramer pipeline. In turns it should passthe frames GStramer which should write the video..<br>
</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_26378" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1503645999210_26380" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">The actual pipeline I am using for this task:</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_33595" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1503645999210_33597" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">"<b id="yui_3_16_0_ym19_1_1503645999210_33727">appsrc ! autovideoconvert ! v4l2video1h264enc extra-controls=\"encode,h264_level=10,h264_profile=4,frame_level_rate_control_enable=1,video_bitrate=2000000\"
 ! h264parse ! rtph264pay config-interval=1 pt=96 ! filesink location=file.pm4</b>"<br>
</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_26208" dir="ltr"><br>
</div>
<div id="yui_3_16_0_ym19_1_1503645999210_33888" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">But it's neither generating the video. I tried many pipelines without successful results..</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_33998" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">What is the correct pipeline I must use ?</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_34061" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2"><br>
</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_34000" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">Thank you in advance,</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_34002" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">Regards,</font></div>
<div id="yui_3_16_0_ym19_1_1503645999210_34004" dir="ltr"><font id="yui_3_16_0_ym19_1_1503645999210_18284" face="verdana, helvetica, sans-serif" size="2">Simon<br>
</font></div>
</div>
</div>
</div>
</body>
</html>