<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I just found it, is was a simple typo … god damn copy and paste code.<div>Sorry for the disturbance.</div><div><br><div><div>On 11 Jul 2014, at 13:23, Info || Non-Lethal Applications <<a href="mailto:info@non-lethal-applications.com">info@non-lethal-applications.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hey guys,<div><br></div><div>I want to use the V210 encoder now to prepare data for playout.</div><div>However, I’m getting a bug I don’t understand. </div><div>Maybe someone can help, here’s the code:</div><div><br></div><div><div style="margin: 0px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #4f8187">AVCodec* _pV210Codec</span><span style=""> = </span>avcodec_find_encoder<span style="">(</span>AV_CODEC_ID_V210<span style="">);</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(79, 129, 135);">AVCodecContext* _pV210CodecCtx<span style=""> = </span><span style="color: #3d1d81">avcodec_alloc_context3</span><span style="">(</span>_pV210Codec<span style="">);</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #4f8187">_pV210CodecCtx</span><span style="">-></span><span style="color: #703daa">codec_type</span><span style=""> = </span>AVMEDIA_TYPE_VIDEO<span style="">;</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #4f8187">_pV210CodecCtx</span><span style="">-></span><span style="color: #703daa">codec_id</span><span style=""> = </span>AV_CODEC_ID_V210<span style="">;</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(112, 61, 170);"><span style="color: #4f8187">_pV210CodecCtx</span><span style="">-></span>bits_per_raw_sample<span style=""> = </span><span style="color: #272ad8">10</span><span style="">;</span></div><div style="margin: 0px; font-family: Menlo;"><span style="color: #4f8187">_pV210CodecCtx</span>-><span style="color: #703daa">width</span> = <span style="color: #272ad8">1920</span>;</div><div style="margin: 0px; font-family: Menlo; color: rgb(79, 129, 135);">_pVideoCodecCtx<span style="">-></span><span style="color: #703daa">height</span><span style=""> = </span><span style="color: #272ad8">1080</span><span style="">;</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(61, 29, 129);"><span style="color: #4f8187">_pV210CodecCtx</span><span style="">-></span><span style="color: #703daa">pix_fmt</span><span style=""> = </span>AV_PIX_FMT_YUV422P10LE<span style="">;</span></div><div style="margin: 0px; font-family: Menlo;"><span style="color: #4f8187">_pV210CodecCtx</span>-><span style="color: #703daa">gop_size</span> = <span style="color: #272ad8">1</span>;</div><div style="margin: 0px; font-family: Menlo;"><span style="color: #4f8187">_pV210CodecCtx</span>-><span style="color: #703daa">time_base</span>.<span style="color: #703daa">den</span> = <span style="color: #272ad8">24</span>;</div><div style="margin: 0px; font-family: Menlo;"><span style="color: #4f8187">_pV210CodecCtx</span>-><span style="color: #703daa">time_base</span>.<span style="color: #703daa">num</span> = <span style="color: #272ad8">1</span>;</div><div style="margin: 0px; font-family: Menlo; min-height: 14px;"><br></div><div style="margin: 0px; font-family: Menlo; min-height: 14px;"><span style="color: rgb(0, 132, 0);">// Open codec</span></div><div style="margin: 0px; font-family: Menlo; color: rgb(79, 129, 135);"><span style="color: #c7289c">if</span><span style="">(</span><span style="color: #3d1d81">avcodec_open2</span><span style="">(</span>_pV210CodecCtx<span style="">, </span>_pV210Codec<span style="">,</span><span style="color: #c7289c">NULL</span><span style="">)<</span><span style="color: #272ad8">0</span><span style="">)</span></div><div style="margin: 0px; font-family: Menlo;">{</div><div style="margin: 0px; font-family: Menlo; color: rgb(209, 47, 27);"><span style="">    </span><span style="color: #3d1d81">printf</span><span style="">(</span>"ERROR: Could not open codec!\n"<span style="">);</span></div><div style="margin: 0px; font-family: Menlo;">    <span style="color: #3d1d81">exit</span>(<span style="color: #272ad8">105</span>);</div><div style="margin: 0px; font-family: Menlo;">}</div></div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px;">The error I’m getting is:</div><div style="margin: 0px; font-family: Menlo;"><br></div><div style="margin: 0px;"><div style="font-family: Menlo; margin: 0px; font-size: 11px;"><b>[NULL @ 0x11a800000] [IMGUTILS @ 0x7fff5fbff2a0] Picture size 0x0 is invalid</b></div><div style="font-family: Menlo; margin: 0px; font-size: 11px;"><b>[NULL @ 0x11a800000] Ignoring invalid width/height values</b></div><div style="font-family: Menlo; margin: 0px; font-size: 11px;"><b>[NULL @ 0x11a800000] [IMGUTILS @ 0x7fff5fbff2a0] Picture size 0x0 is invalid</b></div><div style="font-family: Menlo; margin: 0px; font-size: 11px;"><b>[v210 @ 0x11a800000] dimensions not set</b></div><div style="font-family: Menlo;"><b><br></b></div><div>I already tried to not set the resolution but then it also fails.</div><div>I don’t see why the width/height values would not be valid.</div></div><div><br></div><div>Thanks!</div></div>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>http://ffmpeg.org/mailman/listinfo/libav-user<br></blockquote></div><br><div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">---------------------------------------------------------------------------------------------------------</div><span style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br class="Apple-interchange-newline"><span><img height="35" width="366" apple-inline="yes" id="7416FAA5-2984-4D64-B862-01C8505D18F8" apple-width="yes" apple-height="yes" src="cid:AD5C0090-A2B9-4A42-A912-B84D1EDDDABD@fritz.box"></span><span style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: 15px; "><br class="Apple-interchange-newline">Non-Lethal Applications</span><span style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; "> </span><span style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; ">- high quality multimedia software</span><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; "><br></span></div><div style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span style="color: rgb(0, 0, 0); font-family: Helvetica;  font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; display: inline !important; float: none; "><div>Flo Loferer / Developer, Owner</div><div><br></div><div><a href="https://twitter.com/nonlethalapp">Follow us on Twitter</a></div><div><a href="https://www.facebook.com/NonLethalApplications">Friend us on Facebook</a></div></span></div>
</span></div>
<br></div></body></html>