<div dir="ltr">Hi all<div><br></div><div>I'm tryng to retrieve a MxPEG stream from a mobotix camera. I'm using ffmpeg 2.0.2.</div><div><br></div><div>If i try:</div><div><br></div><div>
./ffmpeg -f mxg -i "<a href="http://192.168.0.78/control/faststream.jpg?stream=MxPEG" target="_blank">http://192.168.0.78/control/faststream.jpg?stream=MxPEG</a>" -y pipas.avi<br></div><div><br></div><div>i have no problem. If i write my own sample code</div>
<div><br></div><div>AVFormatContext formatContext;</div><div>
<pre style="margin-top:0px;margin-bottom:0px"><span style>avformat_open_input</span><span style>(</span><span style="color:rgb(192,192,192)"> </span><span style>&</span><span style>formatContext</span><span style>,</span><span style="color:rgb(192,192,192)"> </span><font color="#000080">"<a href="http://192.168.0.78/control/faststream.jpg?stream=MxPEG&fps=6" target="_blank">http://192.168.0.78/control/faststream.jpg?stream=MxPEG&fps=6</a>"</font><span style>,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">NULL</span><span style>,</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(0,0,128)">NULL</span><span style="color:rgb(192,192,192)"> </span><span style>)</span><span style="color:rgb(192,192,192)"> </span><span style>!=</span><span style="color:rgb(0,0,128)">0</span><span style="color:rgb(192,192,192)"> </span><span style>)</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><span style>always return 0 without message. </span><span style="font-family:arial">How can I force the value of format to "mxg"?</span></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="font-family:arial"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial">I try:</font></pre><pre style="margin-top:0px;margin-bottom:0px">
<font face="arial"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial"> AVFormatContext *formatContext = avformat_alloc_context();
formatContext->video_codec_id = AV_CODEC_ID_MXPEG;<br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial">but it doesn't work</font></pre>
<pre style="margin-top:0px;margin-bottom:0px"><font face="arial"><br></font></pre><pre style="margin-top:0px;margin-bottom:0px"><font face="arial">Thanks in advance</font></pre></div></div>