DV Info Net

DV Info Net (http://www.dvinfo.net/forum/)
-   3D Stereoscopic Production & Delivery (http://www.dvinfo.net/forum/3d-stereoscopic-production-delivery/)
-   -   Producing 3D files in AviSynth (http://www.dvinfo.net/forum/3d-stereoscopic-production-delivery/479703-producing-3d-files-avisynth.html)

Adam Stanislav May 31st, 2010 08:21 PM

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
Yep, that simple.

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")
Just like magic! :-)

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.

Pavel Houda June 1st, 2010 12:02 AM

Thanks Adam, you are the greatest. Pavel

Adam Stanislav June 1st, 2010 07:59 AM

You're very welcome.

Adam Stanislav June 1st, 2010 10:35 PM

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.

Robert Martens June 2nd, 2010 01:39 PM

Quote:

Originally Posted by Adam Stanislav (Post 1533516)
And of course you need AviSynth. It only comes in a 32-bit version but it works well.

A 64 bit version of SEt's multithreaded build of version 2.5.8 is under continuing development, and quite a few external filters have also been ported: SEt's Avisynth 2.5.8 MT compiled for *X86_64*, Latest Build 4/16/2010 - Doom9's Forum

I don't have a 64 bit machine to test anything myself, but people seem to be having success with it.

Adam Stanislav June 2nd, 2010 02:03 PM

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.

Adam Stanislav June 2nd, 2010 03:02 PM

Whew! I'm glad to say I finished the documentation for Pantarheon3D.avsi. Now I can take a break. :-)

Adam Stanislav June 5th, 2010 02:50 PM

I have added a few functions that I somehow missed in the initial upload. I have uploaded the updated files as version 1.1.

Serge Victorovich June 7th, 2010 12:19 AM

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:)

Steve Shovlar June 7th, 2010 06:14 AM

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?

Steve LaPierre June 7th, 2010 07:49 AM

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.

Adam Stanislav June 7th, 2010 08:51 AM

Quote:

Originally Posted by Steve LaPierre (Post 1535788)
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?

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.

Adam Stanislav June 7th, 2010 09:17 AM

Quote:

Originally Posted by Steve Shovlar (Post 1535750)
I downloaded the program but it doesn't even have a user interface in windows.

Steve, it is not a program, it is an AviSynth script. AviSynth does not have a user interface. If you do not know how to use AviSynth, other solutions are available, such as Tim's plug-in for the Mac and my plug-in for Sony Vegas.

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)

How hard is that? You just save it with the .avs extension and to the system it appears like an AVI file, so almost any video player and NLE that can open AVI files can open it.

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).

Steve Shovlar June 7th, 2010 02:08 PM

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.

Pavel Houda June 7th, 2010 02:09 PM

Quote:

Originally Posted by Steve LaPierre (Post 1535788)
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.

Steve, maybe there is an article will shed some light about the MVC format used by 3D BDs (we had some discussions in the past on this forum about the fact that the details are licensed and proprietary - and I don't want to start another complaining avalanche if that is right or wrong) and what the best way to get full res 3D would be until the right disc authoring S/W is available, supporting the MVC format generation as well as all the necessary headers, etc. for the 3D blu-rays to play correctly (as well as HDMI 1.4a players of course). For all that to work right, one needs the proper disc authoring S/W, 3D blu-ray player, and of course 3D monitor or TV. All this must start with two full res streams, L/R. Many post S/W outputs formats do not output half the pixels to fit to standard 2D frames (side-by-side, above/under, line interleave). Best way to get high quality self made video to the 3D devices are the Stereo Players running predominantly on PC's. Good description of all that is here: The Blu-ray 3D Format : Blu-ray 3D On The PC: The Tom's Hardware Review . Adam offered the help with his S/W because I needed a specific format for a test I was doing. You couldn't output it directly to blu-ray authoring software, there would be still lot more work needed if you were to generate standards compliant 3D BD's.


All times are GMT -6. The time now is 09:54 PM.

DV Info Net -- Real Names, Real People, Real Info!
1998-2018 The Digital Video Information Network