[MPlayer-users] Green flash on playback

Steven M. Schultz sms at 2BSD.COM
Tue Sep 28 02:10:44 CEST 2004


Hi -

	For a long time I've seen a brief 'green flash' when running
	mplayer to play a movie.   Anyone else see something like that?

	It turns out that 'mplayer' sometimes generates EXTRA frames 
	consisting of all 0s.  All 0s in YUV is a bright green.

	It's not just when showing the movie on the screen - it's happening
	with "-vo yuv4mpeg" and "-vo png" as well.  Those are the only other
	video output drivers I've tested in addition to the "-vo quartz" or
	"xv".  All 0s in a .png show up as black so it's not as eye-popping
	as bright green ;)

	If I do this:

mplayer -vo yuv4mpeg ta1s1c1.mpg

	in stream.yuv I see:

0000000   Y   U   V   4   M   P   E   G   2       W   7   2   0       H
0000020   4   8   0       F   2   9   9   6   9   9   9   9   :   1   0
0000040   0   0   0   0   0       I   p       A   0   :   0  \n   F   R
0000060   A   M   E  \n  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
0000100  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
1764460  \0  \0  \0  \0   F   R   A   M   E  \n  \0  \0  \0  \0  \0  \0
1764500  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0
*
3751060  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   F   R   A   M   E  \n
3751100  \0 001 003 006  \n  \r 017 021 025 025 025 025 025 025 025 025
3751120 025 025 025 024 025 024 025 025 025 025 025 025 025 025 025 025

	TWO extra frames of all 0s  (be nice if the frame rate were
	30000:1001 instead but that's another story :)).   The worst case
	I've seen is 4 all zero frames but most of the time just 2 all 0
	frames are produced.

	If I use one of the utilities from mjpegtools and the mpeg2dec
	(decoder):

mpeg2dec -s -o pgmpipe ta1s1c1.mpg | pgmtoy4m | od -c | more

	the result is:

0000000    Y   U   V   4   M   P   E   G   2       W   7   0   4       H
0000020    4   8   0       F   3   0   0   0   0   :   1   0   0   1    
0000040    I   t       A   1   0   :   1   1       C   4   2   0   m   p
0000060    e   g   2  \n   F   R   A   M   E  \n 027 027 026 025 024 024
0000100  023 023 024 024 023 023 023 023 024 024 024 024 024 023 024 023
0000120  024 024 024 024 024 024 024 024 024 024 024 024 024 024 024 024

	no extra 0 frames.

	I haven't looked into the audio output.  If extra audio data is
	being written then A/V sync will be maintained but the video will
	flash green.  One "workaround" (at least for -vo yuv4mpeg) would
	be to check for all 0 and substitute 16,128,128 (pure black) - that
	would be a lot less noticeable than green.

	Any ideas where the extra frames are coming from and how to not
	emit them?

	Cheers,
	Steven Schultz




More information about the MPlayer-users mailing list