<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Helvetica;
panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"New serif";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
h2
{mso-style-priority:9;
mso-style-link:"Heading 2 Char";
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:18.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.Heading2Char
{mso-style-name:"Heading 2 Char";
mso-style-priority:9;
mso-style-link:"Heading 2";
font-family:"Calibri Light",sans-serif;
color:#2E74B5;}
p.yiv9593203778ydp8a39d818card-description, li.yiv9593203778ydp8a39d818card-description, div.yiv9593203778ydp8a39d818card-description
{mso-style-name:yiv9593203778ydp8a39d818card-description;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv9593203778msonormal, li.yiv9593203778msonormal, div.yiv9593203778msonormal
{mso-style-name:yiv9593203778msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv9593203778msochpdefault, li.yiv9593203778msochpdefault, div.yiv9593203778msochpdefault
{mso-style-name:yiv9593203778msochpdefault;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv9593203778msonormal1, li.yiv9593203778msonormal1, div.yiv9593203778msonormal1
{mso-style-name:yiv9593203778msonormal1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv9593203778msochpdefault1, li.yiv9593203778msochpdefault1, div.yiv9593203778msochpdefault1
{mso-style-name:yiv9593203778msochpdefault1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.yiv9593203778msohyperlink
{mso-style-name:yiv9593203778msohyperlink;}
span.yiv9593203778msohyperlinkfollowed
{mso-style-name:yiv9593203778msohyperlinkfollowed;}
span.yiv9593203778heading2char
{mso-style-name:yiv9593203778heading2char;}
span.yiv9593203778msohyperlink1
{mso-style-name:yiv9593203778msohyperlink1;}
span.yiv9593203778msohyperlinkfollowed1
{mso-style-name:yiv9593203778msohyperlinkfollowed1;}
span.yiv9593203778emailstyle171
{mso-style-name:yiv9593203778emailstyle171;}
span.yiv9593203778emailstyle29
{mso-style-name:yiv9593203778emailstyle29;}
p.yiv9593203778msonormal2, li.yiv9593203778msonormal2, div.yiv9593203778msonormal2
{mso-style-name:yiv9593203778msonormal2;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"New serif",serif;}
span.yiv9593203778msohyperlink2
{mso-style-name:yiv9593203778msohyperlink2;
color:blue;
text-decoration:underline;}
span.yiv9593203778msohyperlinkfollowed2
{mso-style-name:yiv9593203778msohyperlinkfollowed2;
color:purple;
text-decoration:underline;}
span.yiv9593203778heading2char1
{mso-style-name:yiv9593203778heading2char1;
font-family:"Arial",sans-serif;
color:#2E74B5;}
p.yiv9593203778ydp8a39d818card-description1, li.yiv9593203778ydp8a39d818card-description1, div.yiv9593203778ydp8a39d818card-description1
{mso-style-name:yiv9593203778ydp8a39d818card-description1;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"New serif",serif;}
p.yiv9593203778msonormal3, li.yiv9593203778msonormal3, div.yiv9593203778msonormal3
{mso-style-name:yiv9593203778msonormal3;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"New serif",serif;}
p.yiv9593203778msochpdefault2, li.yiv9593203778msochpdefault2, div.yiv9593203778msochpdefault2
{mso-style-name:yiv9593203778msochpdefault2;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"New serif",serif;}
p.yiv9593203778msonormal11, li.yiv9593203778msonormal11, div.yiv9593203778msonormal11
{mso-style-name:yiv9593203778msonormal11;
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.yiv9593203778msochpdefault11, li.yiv9593203778msochpdefault11, div.yiv9593203778msochpdefault11
{mso-style-name:yiv9593203778msochpdefault11;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:10.0pt;
font-family:"New serif",serif;}
span.yiv9593203778msohyperlink11
{mso-style-name:yiv9593203778msohyperlink11;
color:#0563C1;
text-decoration:underline;}
span.yiv9593203778msohyperlinkfollowed11
{mso-style-name:yiv9593203778msohyperlinkfollowed11;
color:#954F72;
text-decoration:underline;}
span.yiv9593203778emailstyle1711
{mso-style-name:yiv9593203778emailstyle1711;
font-family:"Arial",sans-serif;
color:#1F497D;}
span.yiv9593203778emailstyle291
{mso-style-name:yiv9593203778emailstyle291;
font-family:"Arial",sans-serif;
color:#1F497D;}
span.EmailStyle43
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1053313122;
mso-list-type:hybrid;
mso-list-template-ids:1258177990 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
{mso-level-text:"%1\)";
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level2
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level3
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level4
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level5
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level6
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
@list l0:level7
{mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level8
{mso-level-number-format:alpha-lower;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;}
@list l0:level9
{mso-level-number-format:roman-lower;
mso-level-tab-stop:none;
mso-level-number-position:right;
text-indent:-9.0pt;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hello,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I just wanted to comment on this pipeline:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>sudo gst-launch-1.0 -e v4l2src device=/dev/video3 ! videoconvert! video/x-raw,width=1920,height=1080 ! tee name=t ! queue ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=2000000;" ! h264parse ! mp4mux ! filesink location=video.mp4 t. ! queue ! multifilesink location=file%1d.raw<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>This is a rather complicated pipeline with a couple potential bottlenecks. The main bottleneck I would worry about is the file system.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Beyond potential bottleneck issues, I would say the following.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I don’t know exactly what you are expecting as far as what you call raw video. The pipeline has a videoconvert element in it. To me this would mean you would not be capturing raw video but rather the output of videoconvert.<o:p></o:p></span></p><p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><span style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If I understand the pipeline, the video saved by the multifilesink is not using the h264 encoder. This is because the tee comes before the h264 encoder. The video in the filesink element is getting the output of the h264 encoder. Your original email was asking about whether or not gstreamer was using the hardware encoder. Based on the pipeline above, it appears to me that in one case gstreamer would use the hardware encoder and in the other case it would not.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Rand<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> gstreamer-devel [mailto:gstreamer-devel-bounces@lists.freedesktop.org] <b>On Behalf Of </b>simon.zz@yahoo.com<br><b>Sent:</b> Wednesday, April 25, 2018 5:11 PM<br><b>To:</b> Discussion of the Development of and With GStreamer <gstreamer-devel@lists.freedesktop.org><br><b>Subject:</b> Re: RE: RE: How do gstreamer interfaces with H264 hardware encoders and creates videos ?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>Hello Rand,<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>Yes I recompiled the libs as 96boards suggests.<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>The pipeline I use is:<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>gst-launch-1.0 -v -e v4l2src device=/dev/video3 ! videoconvert! video/x-raw,width=1920,height=1080 ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=2000000;" ! h264parse ! mp4mux ! filesink location=video.mp4</span></b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>and this pipeline creates a quiet good video..<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>In this case the output is:<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p></div></div></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>Otherwise, If I use the following pipeline to extract raw frames while I am recording the video<o:p></o:p></span></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>sudo gst-launch-1.0 -e v4l2src device=/dev/video3 ! videoconvert! video/x-raw,width=1920,height=1080 ! tee name=t ! queue ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=2000000;" ! h264parse ! mp4mux ! filesink location=video.mp4 t. ! queue ! multifilesink location=file%1d.raw</span></b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>the resulting video is quiet crappy, not all frames are being recorded and the sequence remains locked on a single frame for a few seconds. It's obvious that the extracting frames task is not good while recording a video. If gstreamer should be using the h264 encoder, why it gives this problems in this case ?<br>I doubt about it because my C/C++ code doesn't generate a bad video as in this case.<o:p></o:p></span></p></div><div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p> </o:p></span></p><div><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>>> </span></b><b><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif'>It is then using a parser and a muxer and a filesink to create an mp4 file. </span></b><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><o:p></o:p></span></p></div></div><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'>This is an interesting point. In this case gstreamer should use a mp4 library using the h264 encoded data ? <br>This makes sense to me.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif'><br>Simon<o:p></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div id="yahoo_quoted_5638251742"><div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Il mercoledì 25 aprile 2018, 23:49:53 CEST, Rand Graham <<a href="mailto:rand.graham@zenith.com">rand.graham@zenith.com</a>> ha scritto: <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p> </o:p></span></p></div><div><div id=yiv9593203778><div><div><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Hello,</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Did you recompile according to the release notes? Are you using the pipeline shown in the release notes?</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>To know what is being done by gstreamer, you should copy paste the exact pipeline you are using.</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>The release notes show this pipeline</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>gst-launch-1.0 -e v4l2src device=/dev/video3 ! video/x-raw,format=NV12,width=1280,height=960 ! v4l2h264enc extra-controls="controls,h264_profile=4,video_bitrate=2000000;" ! h264parse ! mp4mux ! filesink location=video.mp4</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>It looks like this pipeline is using v4l2h264enc to do the h.264 encoding.</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>It is then using a parser and a muxer and a filesink to create an mp4 file. What this does is use an mp4 container that contains an h264 video track.</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>It looks like the h264 encoder takes some parameters. You may be able to get better video quality by adjusting the parameters of the h264 encoder. For example, there is typically a “high” setting that can be used for h264 quality. You might also try increasing the bitrate to see if that improves quality. (The height and width dimensions seem odd to me. I would expect something like 1280x720 or 1920x1080)</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Regards,</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Rand</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> </span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p><div id=yiv9593203778yqt01183><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=yiv9593203778msonormal><b><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>From:</span></b><span style='font-size:11.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> gstreamer-devel [<a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org">mailto:gstreamer-devel-bounces@lists.freedesktop.org</a>] <b>On Behalf Of </b><a href="mailto:simon.zz@yahoo.com">simon.zz@yahoo.com</a><br><b>Sent:</b> Wednesday, April 25, 2018 4:33 PM<br><b>To:</b> Discussion of the Development of and With GStreamer <<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>><br><b>Subject:</b> Re: RE: How do gstreamer interfaces with H264 hardware encoders and creates videos ?</span><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><o:p></o:p></span></p></div></div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p><div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Hello Rand,<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>You are right. The board is a Dragonboard 410c by 96boards.<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><a href="https://developer.qualcomm.com/hardware/snapdragon-410/tools" target="_blank">https://developer.qualcomm.com/hardware/snapdragon-410/tools</a><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>96boards in their release notes<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><a href="http://releases.linaro.org/96boards/dragonboard410c/linaro/debian/latest/" target="_blank">http://releases.linaro.org/96boards/dragonboard410c/linaro/debian/latest/</a><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>write that the gstreamer pipeline uses the video encoder.<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>But as I said before, I noticed notable differences in video results, which make me doubt that gstreamer really uses the encoder..<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>The C/C++ code I am using is based on this one:<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'><a href="https://git.linaro.org/people/stanimir.varbanov/v4l2-decode.git/tree" target="_blank">stanimir.varbanov/v4l2-decode.git - Unnamed repository</a><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div id="yiv9593203778ydp8a39d818enhancr_card_4929569402"><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0><tr><td width=400 style='width:300.0pt;padding:0in 0in 0in 0in'><table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;border:solid #E0E4E9 1.0pt'><tr><td style='border:none;padding:0in 0in 0in 0in'><table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width="100%" style='width:100.0%;background:white;border:none;border-top:solid #E0E4E9 1.0pt'><tr><td valign=top style='border:none;padding:12.0pt 0in 12.0pt 9.0pt'></td><td width="99%" style='width:99.0%;border:none;padding:9.0pt .25in 12.0pt 9.0pt;border-radius:0 0 2px 0'><h2 style='margin-bottom:4.5pt;line-height:14.25pt'><span style='font-size:10.5pt'>stanimir.varbanov/v4l2-decode.git - Unnamed repository</span><o:p></o:p></h2></td></tr></table></td></tr></table></td></tr></table></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>I basically changed the Varbanov's code to catch the camera frames and feed the encoder, my code works in the sense I can record an h264 video (not mp4 as gstreamer does), but I noticed the results I commented in my previous mail.<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>So what additional processing gstreamer applies to the video hardware encoding ?<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Regards,<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Simon<o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div id="yiv9593203778yahoo_quoted_4802334363"><div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'>Il mercoledì 25 aprile 2018, 22:49:38 CEST, Rand Graham <<a href="mailto:rand.graham@zenith.com" target="_blank">rand.graham@zenith.com</a>> ha scritto: <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal><span style='font-size:10.0pt;font-family:"Helvetica",sans-serif;color:#26282A'> <o:p></o:p></span></p></div><div><div id=yiv9593203778><div><div><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'>Hello,</span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'>It might help if you mention which embedded board you are using.</span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'>In order to use custom hardware from a vendor such as nVidia, you would compile gstreamer plugins provided by the vendor and then specify them in your pipeline.</span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'>Regards,</span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'>Rand</span><span style='color:#26282A'><o:p></o:p></span></p><p class=yiv9593203778msonormal3><span style='font-size:11.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p><div id=yiv9593203778yqt02964><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=yiv9593203778msonormal3><b><span style='font-size:11.0pt;color:#26282A'>From:</span></b><span style='font-size:11.0pt;color:#26282A'> gstreamer-devel [</span><span style='color:#26282A'><a href="mailto:gstreamer-devel-bounces@lists.freedesktop.org" target="_blank"><span style='font-size:11.0pt'>mailto:gstreamer-devel-bounces@lists.freedesktop.org</span></a></span><span style='font-size:11.0pt;color:#26282A'>] <b>On Behalf Of </b></span><span style='color:#26282A'><a href="mailto:simon.zz@yahoo.com" target="_blank"><span style='font-size:11.0pt'>simon.zz@yahoo.com</span></a></span><span style='font-size:11.0pt;color:#26282A'><br><b>Sent:</b> Wednesday, April 25, 2018 1:01 PM<br><b>To:</b> </span><span style='color:#26282A'><a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank"><span style='font-size:11.0pt'>gstreamer-devel@lists.freedesktop.org</span></a></span><span style='font-size:11.0pt;color:#26282A'><br><b>Subject:</b> How do gstreamer interfaces with H264 hardware encoders and creates videos ?</span><span style='color:#26282A'><o:p></o:p></span></p></div></div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p><div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>Hello,</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>I am using an embedded board which has an hardware H264 encoder and I am testing video generation both with gst-launch and with a C++ code wrote by my self.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>Comparing my code results to the gst-launch results, it is clear and obvious that gstreamer applies additional processing compared to what I get from the hardware encoder buffer.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>The first obvious processing is that it generates an mp4 video, while I can only generate an h264 video, but I am not using additional mp4 demux in my code.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>For example, the gst-launch resulting video image's quality it's quiet better, the video has the correct framerate rather than the video I obtain which results slightly "accelerated", and in addtition, the time-stap (minutes - seconds) is present while in the video I obtain from my C++ code it's not.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>So I suspect that gstreamer doesn't use the hardware encoder.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>How can I be sure that gstreamer uses the hardware encoder instead of a h264 software library and how can I know in real time what are the V4L2 settings that gstreamer applies to the encoder ?</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>Thanks.</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>Regards,</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'>Simon</span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div><div><p class=yiv9593203778msonormal3><span style='font-size:10.0pt;color:#26282A'> </span><span style='color:#26282A'><o:p></o:p></span></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></body></html>