[MPlayer-users] Greyscale "tricks"

Meino Christian Cramer Meino.Cramer at gmx.de
Thu Jul 15 06:00:09 CEST 2004


From: "Matthew W. Miller" <mwmiller at columbus.rr.com>
Subject: Re: [MPlayer-users] Greyscale "tricks"
Date: Wed, 14 Jul 2004 22:58:36 -0400

> On Wed, Jul 14, 2004 at 08:24:58PM +0200, Meino Christian Cramer wrote:
> > I have a video stream witch is black and white (grayscaled).
> >
> > "From the physical point of view" one would only need one "color"
> > instead of three to encode the video stream in greyscale but as I
> > understood the documentation all available colorspaces are "three
> > dimensional" (but may be I am wrong).
> 
> Pretty much any MPEG4-based encoded video uses a luma channel which
> describes lightness/darkness, and one or more chroma channels which
> describe colouration.  The most common by far is YCbCr (sometimes called
> YUV); the Y channel is luma, Cb (Chroma blue) describes yellow<->blue,
> Cr (Chroma red) describes cyan<->red.  Greenness depends on all three. 
> See DOCS/tech/colorspaces.txt for further detail on this.

  Yes, I know :)
  I read this before I posted to the mailinglist.
  My impression was, that there is no kind of colorspace which offers
  only one channel for brightness and not only have set the rest two
  channels set constantly set to zero but simply does not store these
  bunch of zeroes to the file.

  But I was not sure whether my impression was correct...
 
> So I guess what you want to know is how to devote more bits to the Y
> channel, which is the only one that's really important for grayscale
> video, and fewer to the unimportant colour channels.  libavcodec
> *should* do that automatically, really, as part of the encoding.

  No (see above).
  I am already using the "grayscale" option and want to know, whether
  this not only set the not used channels to zero but simply does not
  store them on disk.
  And I want to know, whether there are other options in general,
  which are useful to be used while encoding grayscaled videos. For me
  as a beginner it is sometimes difficult to decide which options are
  senseless when used with other option (or what options are mutual
  exclusive). Especially "tricks" I dont know as a beginner.

  Docus on the net, which do not come from the mplayer/mencoder source
  tree directly are often very outdated (my impression...)

> If you're getting too much colour noise, you could use mencoder with one
> of the blurring video filters (see mplayer manual page under section
> "VIDEO FILTERS"), and specify that it should affect only the chroma
> channels, not luma.  unsharp can be made to do this, for example
> ('unsharp=c11x11:-1.0'), and so can denoise3d/hqdn3d
> ('denoise3d=0:254:0' or 'hqdn3d=0:254:0').

  hrrrmmm...my intention was to _avoid_ noise and to raise the PSNR as
  high as possible...;)
  Or do I understand something wrong here.

  Currently I am fighting agains blcok artefacts and against another
  effect, from which I dont know, whether it is a bug (mine or one of
  mencoder/mplayer) or whether it is a feature:

  When adjusting -- for example -- the volume I get "bars" as an osd
  display. When finished adjsuting, this bar remains blurred on the
  screen and will be "taken" by the underlaying movie -- be more and
  more blurred. When the scene changes completly the effect vanished.
  I am using the XV driver on XFree 4.4.0 on a Radeon RV200 QW [Radeon
  7500] video card.

> And of course, there's always the lavc encoding option 'grayscale' which 
> throws away the chroma channels entirely. =)

  I use this.

> Matthew W. Miller <mwmiller at columbus.rr.com>      MPlayer does not suck.
> 
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
> 

Meino




More information about the MPlayer-users mailing list