PDA

View Full Version : Getting proper TV levels out of ffdshow's MJPG VFW decoder


Blue_MiSfit
9th October 2009, 21:27
Help!

I've got lots of MOV sources that contain MJPG at standard TV range (16-235).

If I load these MOVs into AviSynth with QTInput's normal modes, I get proper TV levels, so no problems there.

However, If I remux these MOVs to AVI (to get around some other unrelated issues), and use ffdshow's VFW MJPG decoder, I get a bad expansion to PC levels! It's reversible with ColorYUV or SmoothLevels, but of course it's not the same as the source!

I've played around in the output options tabs in ffdshow, and can't seem to get any combination of settings to output 16-235 levels as-is.

Any ideas?

~MiSfit

poisondeathray
9th October 2009, 21:34
In the ffdshow VFW configuration, RGB conversion , decoder tab, it's set to 0-255 as "output levels" for default. Are you saying changing that to 16-235 does not work? If so , maybe you can report that in the ffdshow thread?

Blue_MiSfit
9th October 2009, 21:49
That's correct.

If I output RGB, then I can set the levels accordingly, and everything is fine. Changing these settings while outputting YUY2 makes no difference.

But, my source is YUY2, and will be encoded as YV12, so I'd like to avoid colorspace conversions :)

~MiSfit

poisondeathray
9th October 2009, 21:52
What about using another source filter / decoder ? e.g. ffms2

7ekno
10th October 2009, 03:08
What were the issues with QTInput?!? And what version?!? There are a few versions floating around, the latest alpha is far more multi-instance friendly ...

7ek

scharfis_brain
10th October 2009, 10:07
I found out that all digital still cameras that output MJPEG DO NOT output tv levels at all.
They all put out PC levels. This means that qtsource() will to the compression from PC to TV for you.

If you got an AVI with MJPG you need to use levels(0,1,255,16,235, coring=false) to squeeze it to TV levels.
That is pretty normal.

This means you'll get the unaltered output only with AVISource!