nhope
10th April 2008, 11:49
I'm making x264 MP4 videos from HDV source to embed in Flash Players.
I'm frameserving from Sony Vegas Pro 8 with Debugmode Frameserver, running through AviSynth, and encoding in MeGUI.
My AviSynth script looks like this (I'm halving the height of the videos to 540 lines, hence the blunt deinterlace method):
AviSource("d:\fs.avi")
SeparateFields()
SelectEven()
ConvertToYV12()
LanczosResize(960,540)
In MeGUI I'm using the CE-QuickTime profile but with the bitrate raised to 1500 kbps. I'm using this profile because I want to provide download links for my mp4 files and I don't want Quicktime to choke on them.
However I'm noticing a change in luminance in the resulting mp4 file compared to the original footage. It's generally paler than the originals when viewed in VLC Player or Quicktime or similar, whereas Xvid (done in VirtualDub) for example stays almost exactly the same.
I suspected that I needed to add a levels filter to my AviSynth script so I added this line:
ColorYUV(levels="TV->PC")
which apparently does the same as this line:
Levels(16, 1, 235, 0, 255, coring=false)
But the result is still generally more pale than the original footage.
I then tried x264 in an AVI wrapper done at default x264 settings in VirtualDub and the result of that is identical in luminance to the original. I could do it that way and put the AVIs in MP4 wrappers but I would rather use the up-to-date method, not x264VfW.
Another strange thing is that when the "pale" x264 video is played back in a Flash Player online it seems darker and more faithful to the original. The Flash 9 Player uses a MainConcept decoder doesn't it?
Can anyone explain what's happening? At which stage of the workflow is the luminance getting changed? How might I fix this short of just tweaking the levels in AviSynth?
Thanks!
I'm frameserving from Sony Vegas Pro 8 with Debugmode Frameserver, running through AviSynth, and encoding in MeGUI.
My AviSynth script looks like this (I'm halving the height of the videos to 540 lines, hence the blunt deinterlace method):
AviSource("d:\fs.avi")
SeparateFields()
SelectEven()
ConvertToYV12()
LanczosResize(960,540)
In MeGUI I'm using the CE-QuickTime profile but with the bitrate raised to 1500 kbps. I'm using this profile because I want to provide download links for my mp4 files and I don't want Quicktime to choke on them.
However I'm noticing a change in luminance in the resulting mp4 file compared to the original footage. It's generally paler than the originals when viewed in VLC Player or Quicktime or similar, whereas Xvid (done in VirtualDub) for example stays almost exactly the same.
I suspected that I needed to add a levels filter to my AviSynth script so I added this line:
ColorYUV(levels="TV->PC")
which apparently does the same as this line:
Levels(16, 1, 235, 0, 255, coring=false)
But the result is still generally more pale than the original footage.
I then tried x264 in an AVI wrapper done at default x264 settings in VirtualDub and the result of that is identical in luminance to the original. I could do it that way and put the AVIs in MP4 wrappers but I would rather use the up-to-date method, not x264VfW.
Another strange thing is that when the "pale" x264 video is played back in a Flash Player online it seems darker and more faithful to the original. The Flash 9 Player uses a MainConcept decoder doesn't it?
Can anyone explain what's happening? At which stage of the workflow is the luminance getting changed? How might I fix this short of just tweaking the levels in AviSynth?
Thanks!