<br><br><div><span class="gmail_quote">On 7/30/07, <b class="gmail_sendername">Jean-Paul Saman</b> <<a href="mailto:jean-paul.saman@planet.nl">jean-paul.saman@planet.nl</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Herman Schultz wrote:<br>> On 7/20/07, Jean-Paul Saman <<a href="mailto:jean-paul.saman@planet.nl">jean-paul.saman@planet.nl</a>> wrote:<br>>> Herman Schultz wrote:<br>>>> Hi,<br>>>><br>>>> I am using VLC streaming (as a boardcaster) to Darwin.
<br>>>><br>>>> But when I use a video client (e.g. quicktime/vlc) to watch that stream<br>>> by<br>>>> hitting Darwin, I see a lot of green rectangles in the video in the<br>>>> beginning. (see attached screen shot).
<br>>>><br>>>> Can you please tell me what is wrong? And how can i fix it?<br>>> I suspect this is due to a missing key frame. The decoder just fills in<br>>> the blank in that case. Which of course when missing the first keyframe
<br>>> can produce strange effects.<br>><br>><br>> Jean-Paul,<br>><br>> I am seeing the same 'green area' issue in the result mp4 file when  I use<br>> VLC to transcode a flv file. Here is the parameter that I used for
<br>> transcoding:<br>><br>>   ./vlc -vvv -I dummy ~/Desktop/video.flv --sout<br>> '#transcode{vcodec=mp4v,vb=400,acodec=mpga,ab=128,audo-sync}:standard{access=file,<br>> mux=mp4, dst=/home/herman/genvlc.mp4}'
<br>><br>> I think you are right in saying the 'green area' problem is caused by a<br>> missing key frame.  I put<br>> more debug print statement in my ffmpge+vlc code. And it did say 'first<br>> frame is no keyframe' and i notice that the first frame passed to
<br>> MPV_frame_start is type 2 ( FF_P_TYPE , not 1 (FF_I_TYPE) that I expected).<br><br>The only thing you can do is to get rid of the green area is to make<br>sure the first frame is a key-frame (I_TYPE). In your case that would
<br>mean to dump all frames until the first key-frame is found.<br><br>You could try to force this by modifying packetizer/mpeg4video.c to take<br>an option "force-start-on-keyframe" (or something like that).</blockquote>
<div><br><br>Jean-Paul,<br><br>After going thru the code more, I find out where in the vlc code drop the first key frame.<br><br>It is dropped in this method:<br>Packetize ( decoder_t *p_dec, block_t **pp_block )<br><br>of the module/packetizer/copy.c
<br><br>the reason it gets dropped is beause 'p_block->i_dts = 0' and the code in Packetize() is like this:<br><br>   if( p_block->i_dts <= 0 )<br>    {<br>      msg_Dbg( p_dec, "need dts > 0 %d %d\n", p_block->i_dts, p_block->i_buffer  );
<br>        block_Release( p_block );<br><br>    msg_Dbg( p_dec, "done call packetize 2\n" );<br>        return NULL;<br>    }<br><br>Can you please tell me how can i fix this, or what causes the packet (p_block)'s i_dts to be 0?
<br><br>Thank you.<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Gtz,<br>Jean-Paul Saman.<br></blockquote></div><br>