|
|||||||||
|
Thread Tools | Search this Thread |
May 31st, 2010, 08:21 PM | #1 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
Producing 3D files in AviSynth
A while ago Pavel mentioned he had no tool to produce HDMI v.1.4a 3D files which consist of the left view on the top, the right view at the bottom, and a 45-line gap in-between.
I said I would add the ability of creating such files in Bororo 3D if I could find a reasonable way of doing that in a Sony Vegas plug-in. Well, to this day I have not found such a way. Then I noticed people on the DVInfo Vegas forum talking about their use of AviSynth for things they cannot get done in Vegas. So I started writing an AviSynth plug-in to create the HDMI format files. This worked but some of it did not work right with MPEG files. And these days most of our videos are in the MPEG format. A week later I learned more about AviSynth and realized I could accomplish the same result, but without the problems, by writing AviSynth scripts rather than plug-ins. So, I got to work, and today, another week later, got finished. I created a file called Pantarheon3D.avsi, which is a collection of AviSynth functions for creating 3D files. It can do things such as: - Create classical, red/cyan, green/magenta, and yellow/blue anaglyphs; - Create full and half-width left/right and cross-eyed files, including yt3d files. - Create full and half-width top/down and down/top files. - Create the aforementioned HDMI v.1.4a 3D files. - Extract the left or the right view from all of the above except the anaglyphs (since they do not have all the necessary information). - Convert from any of the above (except anaglyphs) to any of the above (including anaglyphs). To give you an example, suppose you have a 29.97 fps yt3d video called yt3d.mpg and want to convert it into the HDMI format. Assuming you have an MPEG decoder (and who among us does not), it takes but one line in your AviSynth script: Code:
DirectShowSource("yt3d.mpg", fps=29.97).Yt3DToHDMI Or if you have two videos, left.avi and right.avi, this is what it takes to make a yt3d file: Code:
Yt3D(AviSource("left.avi", "right.avi") I have not written the documentation for it yet, but have uploaded it, along with some sample AVS scripts to Pantarheon.org. This will be the link to the documentation page. Until the docs are there, you can click on msi (on that page) to get the Windows Installer version, or on zip to get it all in a .zip file. Assuming you use the .msi version, it will install Pantarheon3D.avsi into your AviSynths "plugin" directory (assuming it was installed to its default directory). If you download the .zip version instead, just copy the file Pantarheon3D.avsi to the AviSynth plugins directory. And of course you need AviSynth. It only comes in a 32-bit version but it works well. |
June 1st, 2010, 12:02 AM | #2 |
Major Player
Join Date: Mar 2009
Location: Laguna Hills, CA
Posts: 352
|
Thanks Adam, you are the greatest. Pavel
|
June 1st, 2010, 07:59 AM | #3 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
You're very welcome.
|
June 1st, 2010, 10:35 PM | #4 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
I have just uploaded the first part of the documentation. I am too tired to work on the rest of it now, hopefully tomorrow. But this should get you started.
|
June 2nd, 2010, 01:39 PM | #5 | |
Major Player
Join Date: Jun 2003
Location: Miller Place, NY
Posts: 820
|
Quote:
I don't have a 64 bit machine to test anything myself, but people seem to be having success with it. |
|
June 2nd, 2010, 02:03 PM | #6 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
Thanks, Robert. I am aware of it and, indeed, have it on my system, but so far it is for people who feel very comfortable tweaking the insides of their computers, so I am not officially recommending it.
Of course, my scripts work with it because all they use are built-in AviSynth functions. But it only works with AVI files, no MPGs (since the necessary plug-ins are not included in the 64-bit version), so its usefulness is quite limited. And the 32-bit version works very nicely, so there is really not much of a point in using the 64-bit version. Now, if it let me open the .avs files directly in Sony Vegas, that would be very nice. But it does not. |
June 2nd, 2010, 03:02 PM | #7 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
Whew! I'm glad to say I finished the documentation for Pantarheon3D.avsi. Now I can take a break. :-)
|
June 5th, 2010, 02:50 PM | #8 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
I have added a few functions that I somehow missed in the initial upload. I have uploaded the updated files as version 1.1.
|
June 7th, 2010, 12:19 AM | #9 |
Major Player
Join Date: Oct 2005
Posts: 376
|
Adam, you are The Great Man! Thank you for your free tools!
Will be cool if youtube can accept *avs script as upload for their internal avc encoder:) |
June 7th, 2010, 06:14 AM | #10 |
Major Player
Join Date: Feb 2005
Location: Dorset UK
Posts: 697
|
I downloaded the program but it doesn't even have a user interface in windows. It's fine if you have an undertsanding of computer languages but way above the average video guys head. Even if I worked it out (highly unlikely) I still don't know how you would get this onto a blu-ray disk to show on a 3D TV.
And what about convergence/editing etc? Do you use Tim Daswoods plugin or do you need to buy the extortionate 3D Nero? |
June 7th, 2010, 07:49 AM | #11 |
Regular Crew
Join Date: May 2009
Location: Atlanta, Georgia
Posts: 46
|
I am curious if the format that is stored on disk is the same as the HDMI 1.4 specification or is that a function of the BD player to create that file format? Since a 3D movie should play in an old BD player my first thought is that the two video streams are separate on the BD but maybe the old player can read the new format file and only use the first video portion. Quite possibly this is a stupid question but it is something that I have not been able to understand with my limited exposure to Blu-ray, HDMI, and 3D.
|
June 7th, 2010, 08:51 AM | #12 |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
I would say it is the player that creates that format (not file format). The reason for it is that you cannot store that format in a 4:2:0 MPEG file because those files must have an even number of lines (or even a number of lines divisible by 4), but that HDMI format always has an odd number of lines, which is double the number of lines in each view plus 45.
|
June 7th, 2010, 09:17 AM | #13 | |
Trustee
Join Date: Oct 2009
Location: Rhinelander, WI
Posts: 1,258
|
Quote:
I wrote this script because Pavel was looking for a way of producing the HDMI format and because I did not find a way of incorporating frame size changes in Vegas plug-ins. I would also strongly disagree that AviSynth is above the average video guy's head. Considering it can do things that are difficult to do with any other software, I would say it is something every video guy needs to learn. And most probably have. All you've got to do is write very short and simple scripts, such as: Code:
left = AviSource("left.avi") right = AviSource("right.avi") HDMI3D(left, right) And version 2.0 of the script will do even more (when I finish it, mind you), such as convert field-sequential files into other 3D formats. Yesterday I watched the field-sequential version of the Spy Kids 3D DVD in the yellow/blue format without needing to buy any 3D player! All I needed was the upcoming version 2.0 of my script, the DVD, and a short script similar to the example above. I then opened Super, dragged my short script on it and it rendered it to an MPEG file for me (though I had to keep my computer running overnight for it). |
|
June 7th, 2010, 02:08 PM | #14 |
Major Player
Join Date: Feb 2005
Location: Dorset UK
Posts: 697
|
Hi Adam, I think I am understanding what you are saying. Not sure if this is any use for me as I am Mac based and have been playing with Tim Dashwoods plugin which is easy to use.
Still not sure how I can make a 3d file which can be burnt and shown in 3D on a 3D blu-ray player. And a blu-ray player will not play 3D files. It has to be a 3D blu-ray player. Panasonic have one out right now which is HDMI 1.4. The PS3 is due an update at any time to show 3D, but it is HDMI 1.3. |
June 7th, 2010, 02:09 PM | #15 | |
Major Player
Join Date: Mar 2009
Location: Laguna Hills, CA
Posts: 352
|
Quote:
|
|
| ||||||
|
|