Hi Kalileo,<div><br></div><div>please consider that file as a "test" I used to understand how to properly rebuild a mp4 + h264 file, so there are several aspects that have to be fixed.</div><div>One is surely the use of two packets, instead of using just the first one. </div>
<div>I followed that (non optimized) approach because I was trying to figure out what parameters were actually needed in order to setup a "new" packet.</div><div>I suppose that the method you propose should work as well.</div>
<div><br></div><div>Alessandro<br><br><div class="gmail_quote">Il giorno 02 marzo 2012 11:45, Kalileo <span dir="ltr"><<a href="mailto:kalileo@universalx.net" target="_blank">kalileo@universalx.net</a>></span> ha scritto:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br><div><div>On Mar 2, 2012, at 16:00 , ALESSANDRO PAGANELLI wrote:</div>
<br><blockquote type="cite">Andrey, I finally managed to solve the issue! Thanks a lot :) <div><br></div><div>Here, I briefly report what I did (the complete code can be found in the attached source file).</div></blockquote>
<br></div></div><div>Alessandro, in the source code which you attached you copy the frame which you read to a new frame which you write afterwards. </div><div><br></div><div>Is this copying really required? Why not use the same packet, like this?</div>
<div><br></div><div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">returnCode = av_read_frame(g_inputFormatContext, &readPacket);</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">
…</div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;font:normal normal normal 11px/normal Menlo">returnCode = av_write_frame(g_outputFormatContext, &readPacket);</div><div><br></div></div>
<div><br></div><div> </div></div><br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>______________________________________________<br><br>Ing. Alessandro Paganelli, Ph. D. Student, 25th Cycle<br><br>Department of Information Engineering<br>
University of Modena and Reggio Emilia<br>via Vignolese 905, 41125 Modena (MO), ITALY<br><br>E-mail: <a href="mailto:alessandro.paganelli@unimore.it" target="_blank">alessandro.paganelli@unimore.it</a><br>
</div>