<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=iso-8859-1"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
@font-face
        {font-family:Webdings;
        panose-1:5 3 1 2 1 5 9 6 7 3;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
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:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Testo fumetto Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        mso-fareast-language:EN-US;}
span.StileMessaggioDiPostaElettronica17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.TestofumettoCarattere
        {mso-style-name:"Testo fumetto Carattere";
        mso-style-priority:99;
        mso-style-link:"Testo fumetto";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
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=IT link=blue vlink=purple><div class=WordSection1><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Hello I am Daniele Colasante,<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'><o:p> </o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>I would like to understand how to use API ffmpeg to capture a vnc stream and create the output video file.<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'><br>I tried from vnc2mpg.c (from <a href="http://libvncserver.sourceforge.net/doc/html/vnc2mpg_8c-example.html">http://libvncserver.sourceforge.net/doc/html/vnc2mpg_8c-example.html</a> ) and muxing.c (from <a href="http://www.ffmpeg.org/doxygen/trunk/doc_2examples_2muxing_8c-example.html">http://www.ffmpeg.org/doxygen/trunk/doc_2examples_2muxing_8c-example.html</a> ) but I got poor results.<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline;outline: 0px;orphans: auto;text-align:start;widows: auto;-webkit-text-stroke-width: 0px;background-position:initial initial;background-repeat:initial initial;word-spacing:0px'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Has anyone ever done this? Any suggestion is welcome. Thanks to all for your attention and sorry for my English.<o:p></o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'><o:p> </o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Attached my code, video.c, when I run: ./video -o video.avi -t 30 ip_address:port vncpassword  the results are:<o:p></o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Output #0, avi, to 'video.avi':<o:p></o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Stream #0:0: Video: mpeg4, yuv420p, 1680x1050, q=2-31, 400 kb/s, 90k tbn, 25 tbc<o:p></o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>[avi @ 0x1ec4060] Application provided invalid, non monotonically increasing dts to muxer in stream 33754816: 269628272584 >= 0<o:p></o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>Error while writing video frame: Invalid argument<o:p></o:p></span></p><p style='line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'><o:p> </o:p></span></p><p style='margin:0cm;margin-bottom:.0001pt;line-height:13.5pt;background:white;vertical-align:baseline'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555'>RUN FINISHED; exit value 1; real time: 1s; user: 570ms; system: 90ms<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:IT'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:IT'><o:p> </o:p></span></p><p class=MsoNormal><a href="http://www.resi.it/"><span style='color:windowtext;mso-fareast-language:IT;text-decoration:none'><img border=0 width=158 height=38 id="Immagine_x0020_1" src="cid:image001.gif@01CF23EA.E410A810" alt="Descrizione: cid:image001.gif@01C9DD69.C5A5ECE0"></span></a><span style='mso-fareast-language:IT'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:IT'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#003366;mso-fareast-language:IT'>Daniele Colasante</span></b><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:silver;mso-fareast-language:IT'> </span></b><i><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:maroon;mso-fareast-language:IT'><br></span></i><i><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#C00000;mso-fareast-language:IT'>System Engineering<o:p></o:p></span></i></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#003366;mso-fareast-language:IT'>RESI Informatica S.p.A.<b><br></b>Via Pontina Km 44,044<br>04011 Aprilia (LT) - Italy<br><b>Tel:</b></span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT'> +39 06 92710398<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#17365D;mso-fareast-language:IT'>Mobile:</span></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT'> <br></span><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#003366;mso-fareast-language:IT'>Fax:</span></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT'> +39 06 92710208<br></span><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#003366;mso-fareast-language:IT'>Email:</span></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT'> </span><span style='mso-fareast-language:IT'><a href="mailto:d.colasante@resi.it"><span style='font-size:9.0pt;font-family:"Book Antiqua","serif";color:blue'>d.colasante@resi.it</span></a></span><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:navy;mso-fareast-language:IT'><br></span><b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#003366;mso-fareast-language:IT'>Web:</span></b><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT'> </span><span style='mso-fareast-language:IT'><a href="http://www.resi.it/" title="blocked::http://www.resi.it/"><span style='font-size:9.0pt;font-family:"Book Antiqua","serif";color:blue'>www.resi.it</span></a></span><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:silver;mso-fareast-language:IT'><o:p></o:p></span></b></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:silver;mso-fareast-language:IT'><o:p> </o:p></span></b></p><p class=MsoNormal><a href="http://www.resi-group.com/"><span style='font-size:9.0pt;font-family:"Arial","sans-serif";color:#333333;mso-fareast-language:IT;text-decoration:none'><img border=0 width=86 height=30 id="Immagine_x0020_2" src="cid:image002.gif@01CF23EA.E410A810" alt="Descrizione: cid:image002.gif@01C9DD69.C5A5ECE0"></span></a><span style='mso-fareast-language:IT'><o:p></o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:IT'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-family:"Arial","sans-serif";color:silver;mso-fareast-language:IT'>_ _ _ _ _ _ _ _ _ _ _ _</span><span style='mso-fareast-language:IT'><o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#999999;mso-fareast-language:IT'>Nota di riservatezza:</span></b><span style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#999999;mso-fareast-language:IT'> Ai sensi del Decreto Legislativo n. 196/2003, "Codice in materia di Protezione dei dati personali", si precisa che le informazioni contenute in questo messaggio e negli eventuali allegati sono riservate e per uso esclusivo del destinatario. Persone diverse dallo stesso non possono copiare o distribuire il messaggio a terzi. Chiunque riceva questo messaggio per errore è pregato di distruggerlo e di informare immediatamente il mittente. </span><span lang=EN-GB style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#999999;mso-fareast-language:IT'>Grazie.<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span lang=EN-GB style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#999999;mso-fareast-language:IT'><br><b>Confidentiality Notice:</b> Accordingly to Italian legislative decree n. 196/2003 concerning privacy, the information contained in this e-mail is intended for the named recipients only. It may contain privileged and confidential information and if you are not an intended recipient, you must not copy, distribute or take any action in reliance on it. If you have received this e-mail in error, please notify the sender by e-mail and delete the e-mail and any copies of it. Thank you.<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><span lang=NL style='font-size:10.0pt;font-family:Webdings;color:green;mso-fareast-language:IT'>P</span></b><b><span lang=NL style='font-size:10.0pt;font-family:"Arial","sans-serif";color:green;mso-fareast-language:IT'> </span></b><b><span lang=NL style='font-size:6.0pt;font-family:"Arial","sans-serif";color:green;mso-fareast-language:IT'> </span></b><span lang=EN style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#339966;mso-fareast-language:IT'>Please consider the environment before printing this mail</span><span lang=EN-GB style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:IT'>. </span><span style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#339966;mso-fareast-language:IT'>Rispettate l’ambiente e stampate questa email solo in caso di reale necessità</span><span style='font-size:6.0pt;font-family:"Arial","sans-serif";color:#1F497D;mso-fareast-language:IT'><o:p></o:p></span></p><table class=MsoNormalTable border=0 cellpadding=0><tr><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=center style='mso-margin-top-alt:12.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;text-align:center;line-height:150%'><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><img border=0 width=79 height=18 id="Immagine_x0020_3" src="cid:image003.jpg@01CF23EA.E410A810" alt="Descrizione: Descrizione: https://rb1itspoint001/images/stories/RESI.png"></span><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><o:p></o:p></span></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal align=center style='mso-margin-top-alt:12.0pt;margin-right:0cm;margin-bottom:12.0pt;margin-left:0cm;text-align:center;line-height:150%'><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><img border=0 width=79 height=18 id="Immagine_x0020_4" src="cid:image004.jpg@01CF23EA.E410A810" alt="Descrizione: Descrizione: https://rb1itspoint001/images/stories/IPS.png"></span><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><o:p></o:p></span></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal style='line-height:150%'><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><img border=0 width=79 height=18 id="Immagine_x0020_5" src="cid:image005.jpg@01CF23EA.E410A810" alt="Descrizione: Descrizione: https://rb1itspoint001/images/stories/SMETANA.png"></span><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><o:p></o:p></span></p></td><td style='padding:.75pt .75pt .75pt .75pt'><p class=MsoNormal style='line-height:150%'><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><img border=0 width=120 height=25 id="Immagine_x0020_6" src="cid:image006.png@01CF23EA.E410A810" alt="Descrizione: Descrizione: https://rb1itspoint001/images/stories/ItaliaMobile.png"></span><span style='font-size:12.0pt;line-height:150%;font-family:"Arial","sans-serif";color:black;mso-fareast-language:IT'><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='mso-fareast-language:IT'><o:p> </o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>