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

Herman Schultz herman.schultz at gmail.com
Mon Jul 30 07:51:45 CEST 2007


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).


[00000298] stream_out_transcode private debug:  transcode_video_process
calling pf_decode_video
[00000399] ffmpeg decoder debug: DecodeVideo!

[00000399] ffmpeg decoder debug: p_sys->i_buffer: 201

[00000399] ffmpeg decoder warning: MPV_frame_start  2

[00000399] ffmpeg decoder warning: warning: first frame is no keyframe

Can you please provide me some more pointers about how can I troble-shoot
this problem from this point?
For example
* where in the code to determine the frame type ? I did a grep and step
breakpoints in those code, but it never breaks there...
* why the first frame can be type P_TYPE, instead of I_TYPE?
* why the first i_buffer is only 201 bytes? It is kind of small for a frame?

Thank you in advance for any help/pointers.

A more complete log is here:

[00000315] ffmpeg demuxer debug: detected format: flv
[flv @ 0x857ce28]MPV_frame_start  1
[00000295] main input debug: selecting program id=0
[00000315] ffmpeg demuxer debug: adding es: video codec = FLV1
[00000315] ffmpeg demuxer debug: adding es: audio codec = mp3
[00000315] ffmpeg demuxer debug: AVFormat supported stream
[00000315] ffmpeg demuxer debug:     - format = flv (flv format)
[00000315] ffmpeg demuxer debug:     - start time = 0
[00000315] ffmpeg demuxer debug:     - duration = 300042000
[00000315] main demuxer debug: using demux2 module "ffmpeg"
[00000295] main input debug: looking for a subtitle file in
/home/herman/Desktop/
[00000358] main packetizer debug: looking for packetizer module: 17
candidates
[00000358] main packetizer debug: using packetizer module "packetizer_copy"
[00000295] main input debug: stream out mode -> no decoder thread
[00000389] main packetizer debug: looking for packetizer module: 17
candidates
[00000389] main packetizer debug: using packetizer module "packetizer_copy"
[00000295] main input debug: stream out mode -> no decoder thread
[00000295] main input debug: starting in async mode
[00000295] main input debug: `/home/herman/Desktop/video.flv' successfully
opened
[00000389] packetizer_copy packetizer debug: need dts > 0
[00000358] packetizer_copy packetizer debug: need dts > 0
[00000297] main stream output debug: adding a new input
[00000298] stream_out_transcode private debug: creating audio transcoding
from fcc=`mp3 ' to fcc=`mpga'
[00000390] main decoder debug: looking for decoder module: 25 candidates
[00000390] ffmpeg decoder debug: libavcodec initialized (interface 3352580 )
[00000390] ffmpeg decoder debug: ffmpeg codec (MPEG Audio layer 1/2/3)
started
[00000390] main decoder debug: using decoder module "ffmpeg"
[00000391] main encoder debug: looking for encoder module: 7 candidates
[00000391] ffmpeg encoder debug: libavcodec already initialized
[00000391] ffmpeg encoder debug: found encoder MPEG Audio layer 1/2
[00000391] main encoder debug: using encoder module "ffmpeg"
[00000298] stream_out_transcode private debug: Sam: open output stream 0-0
[00000305] main private debug: adding a new input
[00000305] main private debug: calling pf_addstream start
[00000305] mux_mp4 private debug: adding input
[00000305] main private debug: calling pf_addstream end
[00000298] stream_out_transcode private debug: Sam: open output stream 0-4
[00000297] main stream output debug: adding a new input
[00000298] stream_out_transcode private debug: creating video transcoding
from fcc=`FLV1' to fcc=`mp4v'
[00000399] main decoder debug: looking for decoder module: 25 candidates
[00000399] ffmpeg decoder debug: libavcodec already initialized
[00000399] ffmpeg decoder debug: postprocessing disabled
[00000399] ffmpeg decoder debug: using direct rendering
[00000399] ffmpeg decoder debug: ffmpeg codec (Flash Video) started
[00000399] main decoder debug: using decoder module "ffmpeg"
[00000400] main encoder debug: looking for encoder module: 7 candidates
[00000400] ffmpeg encoder debug: libavcodec already initialized
[00000400] ffmpeg encoder debug: found encoder MPEG-4 Video
[00000400] main encoder debug: using encoder module "ffmpeg"
[00000400] main encoder debug: removing module "ffmpeg"
[00000298] stream_out_transcode private debug:  end creating video
transcoding from fcc
[00000298] stream_out_transcode private debug:  transcode_video_process
calling pf_decode_video
[00000399] ffmpeg decoder debug: DecodeVideo!

[00000399] ffmpeg decoder debug: p_sys->i_buffer: 201

[00000399] ffmpeg decoder warning: MPV_frame_start  2

[00000399] ffmpeg decoder warning: warning: first frame is no keyframe

[00000298] stream_out_transcode private debug: decoder aspect is
576000:432000
[00000298] stream_out_transcode private debug: source pixel aspect is
1.000000:1
[00000298] stream_out_transcode private debug: scaled pixel aspect is
1.000000:1
[00000298] stream_out_transcode private debug: source 320x240, crop 320x240,
destination 320x240, padding 320x240






Gtz,
> Jean-Paul Saman.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070730/31c50864/attachment.html>
-------------- next part --------------
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list