On Thu, Apr 06, 2006 at 04:54:55PM -0700, Steven M. Schultz wrote:
>
> On Fri, 7 Apr 2006, Nicolas wrote:
>
> > Huh? It's written in the manpage of mplex:
> > -V|--vbr
> > Set variable bit rate multiplexing. This is needed to multiplex
> > variable bit-rate video streams correctly.
>
> Right - but '-f 8' implies VBR ;)
>
> > I don't apply any filter. I spent 2 evenings trying to find good
>
> Ok - that's the cause (at least indirectly) of the problems. The
> encoder's spending too many bits on preserving noise :(
>
> > settings to denoise the video without any success. Each time the result
> > was blur. There was far less details on the pictures...
>
> > There's a lot of camera shake, and the video comes from an analog
>
> I know that will drive up the bitrate.
>
> > camcorder. It's noisy indeed, and some scenes are shot in a forrest (lot
> > of details in the background). The edges are blacken using yuvscaler.
>
> Ah, good - the junk in the edges (especially the bottom) will waste
> a lot of bits. 'y4mshift -b' can also be used to blacken the borders.
> y4mshift can also center (using -n and -N) the image within the frame
> (useful if the black borders are much larger on one side than the
> other side).
>
> > In fact, I'm archiving old Hi8 cassettes shot around 10 years ago.
>
> Using a MJPEG (is this the DC30+ that's been mentioned or have I
> confused this thread with a different one) card?
>
> > > There's something about the source that's creating files that
> > > are right on the edge of being usable.
> >
> > You probably guess right... The video is really noisy. But I really did
> > not find any correct solution to remove the noise without softening very
> > much the video. The last thing I tried was that :
>
> Several things that might help:
>
> 1. A mild lowpass filter. Yes, y4mspatialfilter can soften the image
> if the parameters are too low but a MILD application of a spatial
> filter can reduce the noise without losing too much detail
>
> y4mspatialfilter -L 5,0.92,5,0.92
>
> will only reduce the luma bandwidth 8% - could remove a lot some
> noise but not a lot of detail.
>
> 2. Filter only the chroma. Chroma coming from old analog tapes is
> quite dirty from what I've seen can be aggressively filtered.
>
> > 0 -I ACTIVE_702x560+8+8 -M BICUBIC | yuvdenoise -s 2,6,6 -g 0,0,0 -t
> > 4,5,5 | /usr/bin/yuvmedianfilter -t 0 | /usr/bin/y4munsharp -L 1.0,0.2,0
>
> One thing that you will notice, if you do upgrade to the cvs version
> is that 'yuvdenoise' no longer has the -s and -g options. Those
> options offered a lot of flexibility that I miss now.
>
> While you still have the old yuvdenoise you might try the milder
> settings of "-s 1,2,2 -g 0,0,0 -t 2,4,4". That should lose almost
> no detail but still remove a lot of the noise.
>
> 3. heavy center pixel weighting median filter. Maybe something like
> "yuvmedianfilter -f -R 1 -r 1 -w 16" will be effective.
>
> But I would avoid 'y4munsharp' if the source is noisy.
>
> y4munsharp sharpens the NOISE which makes it look even worse and raises
> the bitrate needed even more :(
>
> 4. y4mdenoise is slow but effective. Have you tried that filter?
>
> > > Maybe adding -E to the encoding parameters will help lower the peak rate.
> > >
> >
> > I fear that could reduce the video quality. It really need to be
>
> Ah, so you haven't tried it ;) It's not a "filter" in the same
> way as you might be thinking ("yuvdenoise").
>
> There are some items that the eye can not see but the encoder will
> spend a lot of bits on because they're very hard to encode. -E
> can help the encoder save bits in certain cases (it's not a constant
> "filter" like yuvdenoise!).
>
> I think a new slogan is needed: "invisible quality is wasted bits" :)
>
> But if you're that serious about having these precious videos being
> playable 20 years from now I'm surprised you haven't invested in
> some higher-end capture equipment and software... ;) There are some
> fantastic plugins available for FinalCutPro that could be quite useful.
>
> The other thing I 've noticed when processing (old) analog tapes is
> that they deteriorate over time - almost every single one I've looked at
> (with the software scopes) has had a color cast problem. Color
> correction and black level adjustment can do wonders for a video (a
> slight lowering of the black level, also known as "crushing the
> blacks", can improve the perceived contrast and richness of the
> video). Then too desaturating the lows (dark) can improve the
> appearance and lower the bitrate (slightly).
>
> Good Luck with your latest encoding run.
>
> Cheers,
> Steven Schultz
Steven,
I'm now running some tests with the filters on, and the parameters you
suggested. The result is nice. I mean, the video isn't very blurry, and
the noise is reduced.
You asked me why I don't use FinalCutPro? Well, probably because
Open-Source is my philosophy. I don't want to use Windows or Mac.
As regards to the color correction, I know I can modify the histogram of
the pictures in Cinelerra. However, do you know of any automated method
of doing the correction you talk about? A command I could include in the
mjpegtools pipe for example. ;-)
Sometimes in the past, I made an error with color correction. I
corrected the histogram of one video, and the only thing I used as the
reference was what was displayed on my monitor. Unfortunately, the video
looked really different when displayed on a TV. I then discovered the
way the luminance is displayed on a monitor and a TV is really
different... :-/
Nicolas.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mjpeg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mjpeg-users