DV Info Net

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

Adam Stanislav January 18th, 2011 05:57 PM

No, if it already is seen as 1080, cropping would be just a waste of time.

But you cannot convert the HDMI videos into a format that expects an even number of lines, such as MPEG, because it always has an odd number of lines (as I explain in Pantarheon 3D AviSynth Toolbox).

Seref Halulu January 18th, 2011 06:38 PM

Yeah, forgot to add "YUY2" lines...

Quote:

LoadPlugin("H264StereoSource.dll")
lv= FFVideoSource("C:\H264StereoSource_a2\left.m2ts")
rv = H264StereoSource("decoder.cfg",64172)
lv = lv.ConvertToYUY2
rv = rv.ConvertToYUY2
HDMI3D(lv, rv)
But:

Quote:

C:\H264StereoSource_a2>x264 --fps 24000/1001 --level 4.1 --sar 1:1 --aud --frames 3000 -o adam_HDMI.264 adam_HDMI.avs

avs [info]: 1920x2205p 1:1 @ 24000/1001 fps (cfr)
resize [warning]: converting from yuyv422 to yuv422p
resize [error]: resolution 1920x2205 is not compliant with colorspace i420
Or? Have i missed something else? Supposed those 45 lines are added automatically or not?
Anyway it seems to be added: 2205...

Adam Stanislav January 18th, 2011 08:24 PM

Quote:

Originally Posted by Seref Halulu (Post 1608866)
Have i missed something else? Supposed those 45 lines are added automatically or not?
Anyway it seems to be added: 2205...

Yes, they are added. But do not forget what I said on my web site:

Quote:

That means that HDMI did not create the standard for storage in files but for video players and games to produce the image from some other format, or even on the fly. This is particularly clear when you consider that MPEG files use the YUV format. So, do not blame me, blame HDMI.
HDMI transfers data in the RGB format. So, if you actually want to save it all in a file, instead of converting to YUY2, try converting to RGB and save it as an RGB file.

Seref Halulu January 19th, 2011 04:36 PM

Thanks but it doesn't work:

Quote:

SetMemoryMax (64)
LoadPlugin("H264StereoSource.dll")
lv= FFVideoSource("C:\H264StereoSource_a2\left.m2ts")
rv = H264StereoSource("decoder.cfg",64172)
lv = lv.ConvertToRGB
rv = rv.ConvertToRGB
HDMI3D(lv, rv)
Quote:

C:\H264StereoSource_a2>x264 --fps 24000/1001 --level 4.1 --aud --frames 3000 -o adam_HDMI.264 adam_HDMI.avs

avs [info]: 1920x2205p 0:0 @ 25/1 fps (cfr)
resize [error]: resolution 1920x2205 is not compliant with colorspace i420

Adam Stanislav January 19th, 2011 05:22 PM

Quote:

Originally Posted by Seref Halulu (Post 1609261)
Thanks but it doesn't work:

And it never will. You are trying to convert it to an MPEG format which cannot handle video with an odd number of lines. That is what I have been trying to tell you. You could save it in the RGB format with some RGB codec in an AVI file or similar.

The HDMI 1.4a standard was not meant for saving video into files to start with. It is only meant to send video (and audio) data directly to a monitor over a cable. You still can save it in a file, but it cannot be in the color space you are trying to save it in.

Seref Halulu January 19th, 2011 06:30 PM

OK, finally i got it.

Chris E. Young January 27th, 2011 10:33 AM

Recently discovered your plug-in for AviSynth and I absolutely love it. It saves me a really big hassle. I'm using the open-source renderer POV-Ray to create 3-D animation out of individual left and right frames stored in .PNG files. Using AviSynth as successfully created either side-by-side or top bottom 3-D files that look beautiful on my new Samsung 3-D TV.

The problem of course is I'm only getting half resolution. I understand everything you said in this thread about the inability of MPEG to be used for HDMI 3-D format with the odd number of lines. But my question is so what do I do about this?

I can browse files on my PC using DLNA from the TV but it doesn't recognize .avs as a valid video file. I can play the file using Windows media player because it recognizes it as a stream but the TV can't handle it.

I can create AVI and MPEG using TMPGEnc 4.0 XPress and transfer them to the TV on flash drive but I've got the MPEG problem and I don't really know of any AVI codecs that will do odd numbers of lines.

You created the HDMI3d option was something in mind. What do you do with such files to display them if you can't convert them into any kind of file formats? Is that option in your toolbox just for demonstration purposes or do you really have a practical way to use your toolbox and AviSynth to display files on actual TV?

You've implied that there some sort of RGB format of AVI file that will handle odd numbers of lines. What codec do you suggest and what conversion tool would you use to create such a file?

Adam Stanislav January 27th, 2011 02:53 PM

Quote:

Originally Posted by Chris E. Young (Post 1611825)
The problem of course is I'm only getting half resolution.

Take a look at Stereoscopic POV-Ray. This will allow you to create full size side-by-side images with POVRay. There is only one problem with it that I have noticed: If you try to save to PNG with an alpha channel, the alpha channel is only saved to the left view. But if you do not need the alpha channel, this software is quite amazing. Here is a video I made using it: YouTube - Pebbles - 3D. I exported everything to PNG, then rendered with Sony Vegas (and probably my Bororo 3D plug-in since Vegas did not support 3D natively at the time).


Quote:

Originally Posted by Chris E. Young (Post 1611825)
You've implied that there some sort of RGB format of AVI file that will handle odd numbers of lines. What codec do you suggest and what conversion tool would you use to create such a file?

Theoretically, any RGB format should handle odd numbers of lines.

As to how to watch the files, personally I use TotalMedia Theatre 5 with an nVidia card and active glasses. Many others use Sterescopic Player which seems a bit more flexible.

Chris E. Young January 27th, 2011 03:08 PM

It doesn't surprise me that someone has come up with a stereoscopic version of POV-Ray. I probably should've gone looking for it. Although I've got a pretty good system going right now using your toolbox and simply combining the PNG files after rendering. Of course if I'm going to do side-by-side or top-down and adjust the aspect ratio before rendering and I don't use the "Reduced" version of your tools.

I've tried DivX and Xvid codecs to create odd numbers of lines. It can't be done. Be specific what codec should I be using.

By the way the viewing tools you suggested will not help me because I don't have a 3-D capable video card in my PC nor do I have a 3-D capable 120hz or greater monitor. All I have is my Samsung TV where I can use DLNA or copy something to a flash drive.

Adam Stanislav January 27th, 2011 06:18 PM

Quote:

Originally Posted by Chris E. Young (Post 1611953)
Be specific what codec should I be using.

Gosh, that's not mine to say. Codecs are like religions. If you choose one for someone else, you start a war. :)

Anyway, I have not used an RGB codec for years, but back when I did, I was quite happy with the one that came with Camtasia as it was a non-lossy codec.

I do, however, have to ask why you would be using an odd number of lines. No standard video / monitor / TV size uses one. They all have an even number of lines. With POVRay I would always use 1920x1080 lines (i.e., 1080p) unless I needed to go higher (e.g., 2K) but so far I never needed that. I tend to export to 16-bit PNG files (an overkill, perhaps), then combine everything usually to a 24 fps 1080p mp4 video. And when I say 24 fps, I mean 24 fps, not the dreadful 24 / 1.001 fps, which I hate profoundly. I am not telling you to do that, only saying what I usually do.

Giroud Francois March 10th, 2011 01:26 PM

Re: Producing 3D files in AviSynth
 
if you want compatible 3D, there is no codec war, you just need to choose the winning team for you.
for me, i want mvc because i want full HD from a blu-ray disc.
if you can manage to get SbS at half res on BD, you can go with more codecs.
if you are happy to play from some hardware or software media player, then you can choose almost anything.
for instance , i got only 2 choices, the free nokia or the free JMencoder MVC encoder.
(the latest being used by sony for their ultra expensive apps).
Since Sony and JVC are releasing consumer level camera encoding 3D on MVC, we can expect soon some cheap utility to transfer video from camera to pc and back using that codec.

Giroud Francois March 10th, 2011 01:45 PM

Re: Producing 3D files in AviSynth
 
and just about these consumer 3d camcorder (currently JVC and Sony).
These guys suffer the same illness from everybody because if they put an MVC format in their cam , they use 1080i50/60 instead 1080p24, so good by for compatibility with the 24p of BD.

Seref Halulu July 7th, 2011 03:27 PM

Re: Producing 3D files in AviSynth
 
Hi Adam, hope you've seen this:

Doom9's Forum - View Single Post - 3D Toolbox


best!

Adam Stanislav July 7th, 2011 05:05 PM

Re: Producing 3D files in AviSynth
 
No, I did not see it (I totally forgot I was even a member of that forum). Thanks for pointing it out.

And no, I have no plans on working on the script in the near future. My health was failing for quite a while. We are finally finding the right combination of medications to control my diabetes, so I am starting to feel “normal” again, but I am taking it easy.

Plus, I have started working on a completely different project, this one dealing with color grading, though I am not going to go into any details about it because with my health I do not want to make promises and not deliver them.

Seref Halulu July 7th, 2011 05:13 PM

Re: Producing 3D files in AviSynth
 
Adam, i'm really sorry, please take care of yourself.
You are more and more important to us as Adam the healthy.
We love you.
Take care and forget the scripts for a while.

Adam Stanislav July 8th, 2011 06:48 AM

Re: Producing 3D files in AviSynth
 
Thanks! :)

Tony Asch July 8th, 2011 02:37 PM

Re: Producing 3D files in AviSynth
 
Tried to post this over at Doom9, but I'm still in my probationary period.

The sample Sisvel files provided over at Doom9 are actually 1906x1074. Thus the AVISynth code to build a side-by-side (left first) is:

Code:

sisvel = FFmpegSource2("07-07_15-06-23_3D Tile Format_-01_new.ts", width=1906, height=1074)
sisvel = BicubicResize(sisvel, 1920, 1080)
sisvelLeft = Crop(sisvel, 0, 0, -640, -360)
sisvelR1 = Crop(sisvel, 1280, 0, -0, -360)
sisvelR2 = Crop(sisvel, 0, 720, -1280, -0)
sisvelR3 = Crop(sisvel, 640, 720, -640, -0)
sisvelRight = StackHorizontal(sisvelR1, StackVertical(sisvelR2, sisvelR3))
StackHorizontal(sisvelLeft, sisvelRight)

The conversion is problematic because of the sample files. The left image seems to be wider than 1280 and the R1 image is narrower than 640. The overall resolution and the sizes of L, R1, R2, and R3 are not what is indicated in the Sisvel spec.

You'll notice I use FFmpegSource2 which reads .ts files. As per the Sisvel spec, the playback is cropped to 1280x720, but by adding the width= and height= parameters to FFmpegSource2, we can grab the entire video. I then resize to 1920 by 1080 to keep everything standardized.

The way I determined the L, R1, R2, and R3 resolutions was to play the original TS file using Media Player Classic at exactly 100%, doing a screen grab, and then bringing the screen grab into Photoshop to use the Ruler tool. (Yes, I have a 1920x1080 monitor on my computer.)

Seref - could you pass this on to the Doom9 thread?

Seref Halulu July 9th, 2011 01:30 PM

Re: Producing 3D files in AviSynth
 
Thanks Tony.

Nick has already passed your post to doom9.

BTW i reported your delayed membership to mods.

Best.

Seref Halulu July 9th, 2011 08:53 PM

Re: Producing 3D files in AviSynth
 
And Tony, i must admit DGNVTools is much better:

Doom9's Forum - View Single Post - 3D Toolbox

_ _ _ _ _

Seref Halulu January 1st, 2013 12:31 PM

Re: Producing 3D files in AviSynth
 
Hi Adam,

Even I can get very smooth stereoscopic videos with your tool or Avisynth's "StackHorizontal" or "StackVertical" options; I get shaky results with "Interleave" filter when I make frame-sequential videos. (Unfortunately, your tool does not have such a kind of option.)

Here, I explain the issue detailed:

Doom9's Forum - View Single Post - Any free MVC encoder yet?

Doom9's Forum - View Single Post - Any free MVC encoder yet?

Any feedback will be highly appreciated.

Thanks.


All times are GMT -6. The time now is 08:20 AM.

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