[vlc-devel] Green areas in the video when using vlc streaming

Jean-Paul Saman jean-paul.saman at planet.nl
Mon Jul 30 19:42:03 CEST 2007

Herman Schultz wrote:
> On 7/20/07, Jean-Paul Saman <jean-paul.saman at planet.nl> wrote:
>> Herman Schultz wrote:
>>> Hi,
>>> I am using VLC streaming (as a boardcaster) to Darwin.
>>> But when I use a video client (e.g. quicktime/vlc) to watch that stream
>> by
>>> hitting Darwin, I see a lot of green rectangles in the video in the
>>> beginning. (see attached screen shot).
>>> Can you please tell me what is wrong? And how can i fix it?
>> I suspect this is due to a missing key frame. The decoder just fills in
>> the blank in that case. Which of course when missing the first keyframe
>> can produce strange effects.
> Jean-Paul,
> I am seeing the same 'green area' issue in the result mp4 file when  I use
> VLC to transcode a flv file. Here is the parameter that I used for
> transcoding:
>   ./vlc -vvv -I dummy ~/Desktop/video.flv --sout
> '#transcode{vcodec=mp4v,vb=400,acodec=mpga,ab=128,audo-sync}:standard{access=file,
> mux=mp4, dst=/home/herman/genvlc.mp4}'
> I think you are right in saying the 'green area' problem is caused by a
> missing key frame.  I put
> more debug print statement in my ffmpge+vlc code. And it did say 'first
> frame is no keyframe' and i notice that the first frame passed to
> MPV_frame_start is type 2 ( FF_P_TYPE , not 1 (FF_I_TYPE) that I expected).

The only thing you can do is to get rid of the green area is to make 
sure the first frame is a key-frame (I_TYPE). In your case that would 
mean to dump all frames until the first key-frame is found.

You could try to force this by modifying packetizer/mpeg4video.c to take 
an option "force-start-on-keyframe" (or something like that).

Jean-Paul Saman.
vlc-devel mailing list
vlc-devel at videolan.org

More information about the vlc-devel mailing list