<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 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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
        {mso-style-priority:99;
        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.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {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;}
-->
</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="color:#1F497D">Bump, anyone?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-left:.5in"><b><span style="font-size:10.0pt;
font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;
font-family:"Tahoma","sans-serif""> gstreamer-devel [mailto:gstreamer-devel-bounces@lists.freedesktop.org]
<b>On Behalf Of </b>Spruyt, Randy<br>
<b>Sent:</b> Wednesday, January 14, 2015 8:43 AM<br>
<b>To:</b> gstreamer-devel@lists.freedesktop.org<br>
<b>Subject:</b> linking vaapipostproc and vaapiencode_h264?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in"><o:p> </o:p></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white">
<b><span style="font-size:9.0pt;font-family:
"Arial","sans-serif";color:#53575E">Using Ubuntu Desktop 14.04 with gstreamer 1.3.1 and VAAPI 1.5.9-2 on an IvyBridge I7<o:p></o:p></span></b></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white">
<strong><span style="font-size:9.0pt;
font-family:"Arial","sans-serif";color:#53575E">I'm trying to use gstreamer + VAAPI to decode, scale and re-encode a video stream. VAAPI works fine, connecting vaapipostproc  ! vaapisink works fine, but instead of a sink,
 I’d like to re-encode the scaled frame. Unfortunately vaapipostproc src does not seem to like the vaapiencode_h264 sink. </span></strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E"> gst-launch-1.0 -v videotestsrc ! x264enc ! vaapidecode ! vaapipostproc ! vaapiencode_h264 ! fakesink</span></strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";
color:#53575E"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E">shows does not like the negotiated frame rate: check_video_info: invalid framerate (0/1):</span></strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";
color:#53575E"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;
font-family:"Arial","sans-serif";color:#53575E">libva info: VA-API version 0.35.0<br>
libva info: va_getDriverName() returns 0<br>
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so<br>
libva info: Found init function __vaDriverInit_0_35<br>
libva info: va_openDriver() returns 0<br>
Setting pipeline to PAUSED ...<br>
Pipeline is PREROLLING ...<br>
0:00:00.091553650  5169      0x202cb20 FIXME                default gstutils.c:3643:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id<br>
Got context from element 'vaapidecode0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL;<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "video/x-raw\,\ framerate\=\(fraction\)30/1\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ format\=\(string\)I420\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "video/x-raw\,\ framerate\=\(fraction\)30/1\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ format\=\(string\)I420\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"<br>
Redistribute latency...<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = "video/x-h264\,\ codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)2\,\
 profile\=\(string\)high\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = "video/x-h264\,\ codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)2\,\
 profile\=\(string\)high\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\
 framerate\=\(fraction\)30/1"<br>
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)ENCODED\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\
 framerate\=\(fraction\)0/1"<br>
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:sink: caps = "video/x-raw\(memory:VASurface\)\,\ format\=\(string\)ENCODED\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\
 framerate\=\(fraction\)0/1"<br>
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\
 framerate\=\(fraction\)30/1"<br>
<b>0:00:00.146427631  5169 0x7f6ff8003280 ERROR                  vaapi ../../../../gst-libs/gst/vaapi/gstvaapiencoder.c:467:check_video_info: invalid framerate (0/1)</b><br>
0:00:00.146485433  5169 0x7f6ff8003280 WARN            videoencoder gstvideoencoder.c:649:gst_video_encoder_setcaps:<vaapiencodeh264-0> rejected caps video/x-raw(memory:VASurface), format=(string)ENCODED, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, framerate=(fraction)0/1<br>
0:00:00.146529377  5169 0x7f6ff8003280 WARN            videoencoder gstvideoencoder.c:1473:gst_video_encoder_chain:<vaapiencodeh264-0> error: encoder not initialized<br>
0:00:00.146610388  5169 0x7f6ff8003280 ERROR            vaapidecode ../../../gst/vaapi/gstvaapidecode.c:397:gst_vaapidecode_push_decoded_frame: video sink rejected the video buffer (error -4)<br>
ERROR: from element /GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0: GStreamer error: negotiation problem.<br>
Additional debug info:<br>
gstvideoencoder.c(1473): gst_video_encoder_chain (): /GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0:<br>
encoder not initialized<br>
ERROR: pipeline doesn't want to preroll.<br>
Setting pipeline to NULL ...<br>
/GstPipeline:pipeline0/GstVaapiEncodeH264:vaapiencodeh264-0.GstPad:sink: caps = "NULL"<br>
0:00:00.146833684  5169      0x202cb20 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.<br>
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:src: caps = "NULL"<br>
0:00:00.146853212  5169      0x202cb20 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason not-negotiated (-4)<br>
/GstPipeline:pipeline0/GstVaapiPostproc:vaapipostproc0.GstPad:sink: caps = "NULL"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = "NULL"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = "NULL"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = "NULL"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "NULL"<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "NULL"<br>
Freeing pipeline ...<o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;
font-family:"Arial","sans-serif";color:#53575E"> <o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E">but if we explicitly force the caps to use a framerate of 30/1, we still see an error</span></strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E"><o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;
font-family:"Arial","sans-serif";color:#53575E"> <o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:0in;margin-left:
.5in;margin-bottom:.0001pt;background:white;orphans: auto;text-align:start;
widows: auto;-webkit-text-stroke-width: 0px;word-spacing:0px">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E"><a href="mailto:dustin@dustin"><span style="color:#086DB6">dustin@dustin</span></a>-galaxy1:~$ gst-launch-1.0 -v videotestsrc ! x264enc ! vaapidecode ! vaapipostproc ! video/x-raw\(memory:VASurface\)\,\
 format\=\(string\)ENCODED\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1 ! vaapiencode_h264 ! fakesink<br>
libva info: VA-API version 0.35.0<br>
libva info: va_getDriverName() returns 0<br>
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so<br>
libva info: Found init function __vaDriverInit_0_35<br>
libva info: va_openDriver() returns 0<br>
Setting pipeline to PAUSED ...<br>
Pipeline is PREROLLING ...<br>
0:00:00.094210708  5204      0x1e338f0 FIXME                default gstutils.c:3643:gst_pad_create_stream_id_internal:<videotestsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "video/x-raw\,\ framerate\=\(fraction\)30/1\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ format\=\(string\)I420\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "video/x-raw\,\ framerate\=\(fraction\)30/1\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ format\=\(string\)I420\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"<br>
Got context from element 'vaapidecode0': gst.vaapi.Display=context, display=(GstVaapiDisplay)NULL;<br>
Redistribute latency...<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = "video/x-h264\,\ codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)2\,\
 profile\=\(string\)high\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = "video/x-h264\,\ codec_data\=\(buffer\)01640014ffe1001967640014acd94141fb0110000003001000000303c8f142996001000568ebecb22c\,\ stream-format\=\(string\)avc\,\ alignment\=\(string\)au\,\ level\=\(string\)2\,\
 profile\=\(string\)high\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)320\,\ height\=\(int\)240\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ colorimetry\=\(string\)bt601\,\
 framerate\=\(fraction\)30/1"<br>
0:00:00.141807770  5204      0x1e338f0 WARN           basetransform gstbasetransform.c:1397:gst_base_transform_setcaps:<vaapipostproc0> transform could not transform video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support<br>
0:00:00.141993322  5204      0x1e338f0 WARN           basetransform gstbasetransform.c:1397:gst_base_transform_setcaps:<vaapipostproc0> transform could not transform video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support<br>
0:00:00.142060597  5204      0x1e338f0 WARN                GST_PADS gstpad.c:3742:gst_pad_peer_query:<vaapidecode0:src> could not send sticky events<br>
0:00:00.145367895  5204 0x7f5484002c50 WARN           basetransform gstbasetransform.c:1397:gst_base_transform_setcaps:<vaapipostproc0> transform could not transform video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support<br>
0:00:00.145455906  5204 0x7f5484002c50 WARN           basetransform gstbasetransform.c:1397:gst_base_transform_setcaps:<vaapipostproc0> transform could not transform video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support<br>
0:00:00.145517570  5204 0x7f5484002c50 WARN           basetransform gstbasetransform.c:1397:gst_base_transform_setcaps:<vaapipostproc0> transform could not transform video/x-raw, format=(string)I420, width=(int)320, height=(int)240, pixel-aspect-ratio=(fraction)1/1,
 interlace-mode=(string)progressive, colorimetry=(string)bt601, framerate=(fraction)30/1 in anything we support<br>
<b>0:00:00.145535043  5204 0x7f5484002c50 ERROR            vaapidecode ../../../gst/vaapi/gstvaapidecode.c:397:gst_vaapidecode_push_decoded_frame: video sink rejected the video buffer (error -4)</b><br>
<b>0:00:00.145751623  5204      0x1e338f0 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<videotestsrc0> error: Internal data flow error.<br>
0:00:00.146137240  5204      0x1e338f0 WARN                 basesrc gstbasesrc.c:2933:gst_base_src_loop:<videotestsrc0> error: streaming task paused, reason not-negotiated (-4)</b><br>
ERROR: from element /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data flow error.<br>
Additional debug info:<br>
gstbasesrc.c(2933): gst_base_src_loop (): /GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0:<br>
streaming task paused, reason not-negotiated (-4)<br>
ERROR: pipeline doesn't want to preroll.<br>
Setting pipeline to NULL ...<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:src: caps = "NULL"<br>
/GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0.GstPad:sink: caps = "NULL"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:src: caps = "NULL"<br>
/GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "NULL"<br>
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "NULL"<br>
Freeing pipeline ...<br>
 <o:p></o:p></span></p>
<p style="mso-margin-top-alt:0in;margin-right:0in;margin-bottom:.25in;
margin-left:.5in;background:white;orphans: auto;text-align:start;widows: auto;
-webkit-text-stroke-width: 0px;word-spacing:0px">
<strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E">how would one take a vaapipostproc src and connect it to a vaapiencoder_h264 sink?</span></strong><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#53575E"><o:p></o:p></span></p>
<p class="MsoNormal" style="margin-left:.5in">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">Randy<o:p></o:p></p>
</div>
</body>
</html>