View Full Version : Avisynth QT Output - colors gone bad! gamma levels
tomerb
28th June 2007, 13:48
Hey all,
Again, I turn to you after a problem my friend google could not help me with.
I use qtoutput to output files to QuicktimeDV
looking at the input and output video, it seems like something gone bad during the conversion
The output video's gamma levels seem a bit high, the entire video seems a bit more bright than the original
Like i've added a white layer with 5% opacity
the input is QT Reference (QT DV)
any idea would be much appreciated
Blue_MiSfit
30th June 2007, 07:16
Yeah, that happens with Apple's QuickTime DV codec. It applies a gamma correction, whether you like it or not :rolleyes:
I would suggest using the Avid DV codec for output. It's free, google is your friend.
Avid's codec maintains color levels, and is a bit better overall IMO.
Be forewarned, that using the QTSource plugin has its caveats. For example, your timecode track? Gone. Also, QTOutput can't output audio :)
It's an awesome tool, and its the only reliable way to get QuickTime video into AviSynth, and make QuickTime video FROM AviSynth.
Good luck..
~MiSfit
tomerb
1st July 2007, 10:03
dear Blue_MiSfit,
thanks for your reply
I've tried setting AVIDDV codec manually and QTOutput'ed it successfully
loading the original file , the quicktimedv and aviddv and comparing between them - it looks like the quicktimedv's gamma is higher, but it seems like the avid dv affects the Contrast
I'm quite aware of qtsource's advantages and disadavantages
could you recommend perhaps of another codec that has less/none affect on the video colors?
Blue_MiSfit
1st July 2007, 19:00
Well, if you need a DV codec, then no - not really.
Tell me more about your workflow. What are you trying to achieve. Why is QuickTime involved? Why is AviSynth involved? These are important questions and if I know the answers to them I can make some suggestions :)
I'm assuming you are trying to process a DV file in AviSynth, and then export it back out to DV, so that you can use it in Final Cut or some other non linear editor. If this is the case, then the Apple DV codec or the Avid DV codec may be your best options.
If you are trying to do something else, let me know, and we can think of oter workflows. A frequently used codec for getting intermediates between applications is the Apple Animation codec. It's a simple RLE lossless codec that offers some compression over uncompressed, but it's mathematically lossless. It's mostly designed for animated material, but it's better than nothing for intermediates. Unfortunately, it converts anything to RGB, which isn't the best when you're dealing with DV's 4:1:1 or 4:2:0 YUV format.
~MiSfit
tomerb
2nd July 2007, 10:34
Ok, I'm trying to make a little app to burn subtitles on a quicktime
I export qt ref from our editing rooms (Avid NewsCutters)
I use a gui I wrote to add subtitles and time them and use avisynth to take the qt movie, add subtitles using TextSub and output it back to quicktime for quick import back to NewsCutter
I lay the video on a new video track and use the current sound track so the lack of audio output is not an issue
The problem is that when importing the video back the video's gamma looks higher... I don't want to touch the video's colors, only add subtitles on to it.
Blue_MiSfit
3rd July 2007, 00:41
Yeah, I figured an NLE was involved.
That's tricky. I think the problems arise in the many colorspace conversions that happen when we introduce AviSynth into the workflow.
So your DV is either 4:1:1 or 4:2:0 depending on your country. This gets decoded as YUY2 4:2:2 when you use QTInput. Then when you re-encode using QTOutput, depending on the codec you chose, it has to go back to 4:2:0 or 4:1:1, possibly with an RGB intermediate. I'm not sure how QuickTime operates..
It may be impossible given the current software to maintain all the levels. I used to (wince) sort of get around the issue by applying a negative gamma correction before using QTOutput to offset the Apple DV codec's positive gamma correction. Evil I know, but it worked pretty well..
Now if only we could use Cedocida to encode perfect DV to AVI, and then mencoder / ffmpeg to mux to a QuickTime compliant MOV masquerading as Apple DV. I'll have to try that..
~MiSfit
tomerb
3rd July 2007, 11:45
Dear Blue_MiSfit
as render time is a big problem I would like to decrease the render time and avoid re-encoding with too many appz,
I would like to give the "offsetting the gamma" idea a chance, could you please explain which filter you used and the gamma values you used (I guess it's supposed to be pretty much the same) so that I could give it a try?
Thanks alot.
tateu
2nd October 2007, 06:20
I realize this thread is really old, but I just now read it for the 1st time...
Now if only we could use Cedocida to encode perfect DV to AVI, and then mencoder / ffmpeg to mux to a QuickTime compliant MOV masquerading as Apple DV. I'll have to try that..
Something like:
ffmpeg.exe -i "original.mov" -vcodec copy -acodec pcm_s16le -vtag "dvsd" "copy.avi"
Process "copy.avi" with Avisynth -> VirtualDub -> "processed.avi"
ffmpeg.exe -i "processed.avi" -vcodec copy -acodec pcm_s16le -vtag "dvc " "new.mov"
Substitute the correct DV fourcc codes for your region with -vtag (PAL quicktime is "dvcp". I am not sure what PAL avi is).
I only spent a few minutes on this...I first tried "-acodec copy" expecting it to work. It did not and I didn't feel like spending any real time on it so I just used "-acodec pcm_s16le." This should give you the general idea, though.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.