flyer
February 13, 2011, 21:30:56
EDIT: Please read 2nd and 3rd post first!
A “new” (at least to me) solution for Debayering .avi files has emerged from discussions on the VideoHelp site. Full credit goes to Jagabo for his contributions and great help. See: http://forum.videohelp.com/threads/331647-YUY2-vs-RGB24-vs-Y800?p=2055741#post2055741 The original thread has all of what follows below. I’ve tried to reorganize it to be easier to follow.
The solution allows one to start with Y800 video (grayscale with color info) and convert it into an RGB color .avi with no compression. The resulting .avi will be ca. 3x larger than the Y800 original .avi file, though there is a way to get a smaller file size using the lagarith codec (a so-called lossless codec).
In order to do the Debayering you need the following programs:
1. AviSynth - http://www.videohelp.com/tools/Avisynth
2. AviSynth Debayering filter - http://moodub.free.fr/video/Avisynth_DebayerFilter.zip
(Install AviSynth, then place the Debayering filter in the plugins folder)
3. If not installed, install ffdshow http://www.videohelp.com/tools/ffdshow
Configure as follows:
a. Use Start -> All Programs -> ffdshow -> VFW Configuration
b. Set codec RAW (very bottom) to “all supported.”
c. In column on left highlight “output” and make sure that YV12, YUY2, RGB32, and RGB24 are enabled in the right side. The Debayer filter requires YV12.
d. If ffdshow was installed as part of a codec pack the VFW configuration settings are probably located in a different place. Don’t confuse “VFW” with “DirectShow” settings! The settings look similar.
4. Install VirtualDub - http://www.videohelp.com/tools/Virtualdub
5. AviSynth is frame server. If you have not used it before it can seem complicated, but it is very powerful. It creates a “bridge” between the original file and either a player or encoder. Once the program is installed you set the script in AviSynth by using a text file (either .txt or wordpad) and rename it with the file extension .avs. The .avs file can be loaded directly into many players or encoders as if it were the original video file.
This is the script that can be used to Debayer. Simply copy it to a txt file putting the exact location and name of the .avi file right after AviSource. (The example uses the location on my computer. Obviously, substitute your file’s location and name!)
AviSource("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
(there should be no spaces in the word Horizontal. I can't eliminate it in this post)
On my computer I could not get “AviSource” to work. It was suggested that I try the following which worked for me:
DirectShowSource("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
This might also work:
ffVideoSource().("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
Rename the .txt file to .avs and try to open the file in a video player that accepts AviSynth. (GOM Player does, as does MediaPlayer Classic.
If you want to save a copy of the Debayered avi file open the .avs file in VirtualDub.
a. Go to the drop down menu under “video” and select “direct stream copy.”
b. Then under “file” select “Save as AVI.”
If you want to experiment with different codecs, for example HuffyYUV or Lagarith, first install these codecs. Open VirtualDub, and then from the down menu under video select “full processing mode.” Then select “compression” and select the codec. Save the .avi file as in “b” above.
If anyone experiments with this, I'd like to know how you feel this method compares to using Registax or Ninox for Debayering.
EDIT: I may have been a little hasty in posting this but I was excited to find out about this method. It works for me with 1024x768 output from my DFK31AU.03.AS. However, I tried it on a cropped avi capture (picture dimensions of 392x288) and it generated an error saying Debayer Filter "image pitch and width doesn't match." I'm not sure what this means exactly or if there is a solution with this Debayer filter.
A “new” (at least to me) solution for Debayering .avi files has emerged from discussions on the VideoHelp site. Full credit goes to Jagabo for his contributions and great help. See: http://forum.videohelp.com/threads/331647-YUY2-vs-RGB24-vs-Y800?p=2055741#post2055741 The original thread has all of what follows below. I’ve tried to reorganize it to be easier to follow.
The solution allows one to start with Y800 video (grayscale with color info) and convert it into an RGB color .avi with no compression. The resulting .avi will be ca. 3x larger than the Y800 original .avi file, though there is a way to get a smaller file size using the lagarith codec (a so-called lossless codec).
In order to do the Debayering you need the following programs:
1. AviSynth - http://www.videohelp.com/tools/Avisynth
2. AviSynth Debayering filter - http://moodub.free.fr/video/Avisynth_DebayerFilter.zip
(Install AviSynth, then place the Debayering filter in the plugins folder)
3. If not installed, install ffdshow http://www.videohelp.com/tools/ffdshow
Configure as follows:
a. Use Start -> All Programs -> ffdshow -> VFW Configuration
b. Set codec RAW (very bottom) to “all supported.”
c. In column on left highlight “output” and make sure that YV12, YUY2, RGB32, and RGB24 are enabled in the right side. The Debayer filter requires YV12.
d. If ffdshow was installed as part of a codec pack the VFW configuration settings are probably located in a different place. Don’t confuse “VFW” with “DirectShow” settings! The settings look similar.
4. Install VirtualDub - http://www.videohelp.com/tools/Virtualdub
5. AviSynth is frame server. If you have not used it before it can seem complicated, but it is very powerful. It creates a “bridge” between the original file and either a player or encoder. Once the program is installed you set the script in AviSynth by using a text file (either .txt or wordpad) and rename it with the file extension .avs. The .avs file can be loaded directly into many players or encoders as if it were the original video file.
This is the script that can be used to Debayer. Simply copy it to a txt file putting the exact location and name of the .avi file right after AviSource. (The example uses the location on my computer. Obviously, substitute your file’s location and name!)
AviSource("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
(there should be no spaces in the word Horizontal. I can't eliminate it in this post)
On my computer I could not get “AviSource” to work. It was suggested that I try the following which worked for me:
DirectShowSource("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
This might also work:
ffVideoSource().("H:\test\Y800.avi").FlipVertical()FlipHorizontal()DebayerFilter(swap =0)FlipHorizontal()
Rename the .txt file to .avs and try to open the file in a video player that accepts AviSynth. (GOM Player does, as does MediaPlayer Classic.
If you want to save a copy of the Debayered avi file open the .avs file in VirtualDub.
a. Go to the drop down menu under “video” and select “direct stream copy.”
b. Then under “file” select “Save as AVI.”
If you want to experiment with different codecs, for example HuffyYUV or Lagarith, first install these codecs. Open VirtualDub, and then from the down menu under video select “full processing mode.” Then select “compression” and select the codec. Save the .avi file as in “b” above.
If anyone experiments with this, I'd like to know how you feel this method compares to using Registax or Ninox for Debayering.
EDIT: I may have been a little hasty in posting this but I was excited to find out about this method. It works for me with 1024x768 output from my DFK31AU.03.AS. However, I tried it on a cropped avi capture (picture dimensions of 392x288) and it generated an error saying Debayer Filter "image pitch and width doesn't match." I'm not sure what this means exactly or if there is a solution with this Debayer filter.