VideoHelp Forum
+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 30 of 39
Thread
  1. Member
    Join Date
    Oct 2011
    Location
    lima peru
    Search Comp PM
    I know that the common question is the opposite (how to covert side by side to frame sequential) but in this case my interest is how to convert frame sequential to side by side 3D.

    Is it possible to convert let's say a blu ray output (fs3D) to side by side? How?

    Thanks in advance

    A.
    Quote Quote  
  2. In AviSynth it's

    WhateverSource()
    left=SelectEven().BilinearResize(width/2,height)
    right=SelectOdd().BilinearResize(width/2,height)
    StackHorizontal(left,right)
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Jagabo's script is correct, but normal BD3D output is FramePacking, not FieldSequential, so that wouldn't work.

    Going BD3D --> 3DTV, it's FramePacking (usually 1920x2205 "super frame" @ 24p) via HDMI until it hits the TV processor, where it gets converted to Field Sequential (48 (2x24) /96 (4x24) /120 (5x24) /240 (10x24) p, depending on TV processor), or converted to MicroLine Polarized (new passive 3DTVs).

    If you look at BD file format, it's MVC (SSIF M2TS files). These can be converted direct to Sbs or similar with a number of apps. No need to go through Field Sequential.
    FS isn't normally a storage format, just a display format. Occasionally a transmission format (but not in this case).

    Scott
    Quote Quote  
  4. Originally Posted by Cornucopia View Post
    If you look at BD file format, it's MVC (SSIF M2TS files).
    Ah, so the ripped files aren't frame sequential. Is there some documentation on MVC format? Is it normal M2TS files with some flags indicating 3d? Do you know of any small samples available online?
    Quote Quote  
  5. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    As a quick summary, I'll refer you to an earlier post of mine: https://forum.videohelp.com/threads/328340-3D-Bluray-reauthoring-with-multiAVCHD-is-gen...=1#post2033751
    It's slightly outdated & slightly inaccurate, though (re: interleaving)

    AFA the BD3D spec (at least what's known to commoners: https://forum.videohelp.com/threads/328340-3D-Bluray-reauthoring-with-multiAVCHD-is-gen...=1#post2033751

    AFA the MVC spec, there's "Annex H of ITU-T H.264 | ISO/IEC14496-10", but you can see an opensource version via Doom9: http://forum.doom9.org/showthread.php?t=153774

    And you can get the 3D info portion of the HDMI 1.4a spec here: http://www.hdmi.org/manufacturer/specification.aspx

    Flags? There's additional SEI messages in USERDATA, IIRC. Plus, the Existence of the SSIF folder & assets tells the 3D-aware BD player that it can go into Stereoscopic Output mode (automatically?) with the appropriate Display device attached.

    Online Samples?
    All the ones I'm aware of are warez, so I won't offer those. There's an opensource movie "Elephant's Dream" that has a stereo3D version, which I hope to soon be Authoring to BD3D via Vegas (though the stereo source files are not FullHD3D, coming from an Sbs copy of the Renders. I don't have the time to Re-Render the 2nd viewpoint myself).

    HTH,
    Scott

    edit: AFA ripping, most apps (like 3DBDBuster, SSIFSucker, MultiAVCHD, etc) convert the MVC to 2 x AVC streams (sometimes in MP4, mostly in MKV) or to a single AVC stream of SbS or T/B layout (in similar containers).

    BTW, this documentation isn't exhaustive of what I have, I got much more but it's piecemeal - I had to patch alot together. This is just a more official, definitive core.
    Last edited by Cornucopia; 20th Oct 2011 at 01:41.
    Quote Quote  
  6. Thanks for the details. So a "2D" h.264 decoder can't be used to decode both channels -- it won't be able to handle the derived channel. And 3D aware rippers should already perform the side-by-side packing the OP wants.
    Quote Quote  
  7. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    You're welcome.

    Yep, std h.264 decoders are blissfully unware of any other data besides the main "channel". MVC, BD3D, and HDMI 1.4a are all designed with full backward compatibility, such that the 3D appears to a standard device (decoder, player, display) as normal 2D, as well as normal 2D being passed through correctly (even to 3D devices).

    Yep, 3D-aware rippers/converters seem to do the job pretty well WRT desired output (SbS, T/B, possibly Interlaced, Checkerboard, or Anaglyph too).

    Scott
    Quote Quote  
  8. I am also trying to achieve something similar.

    I have VOB clip that is interlaced 3D. I want to convert it to SBS 3D so I can play it right from my Media Box.

    I have been struggling a lot and it looks like I have reached the right place to find an answer.

    Please help ... I am really new to Avisynth and 3D ...

    Do I need any special plugins ? What would be the script ?


    Thanks is advance !
    Quote Quote  
  9. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    It would just be an extension to the earlier script:
    Code:
    Sourcevideo = DirectshowSource(your_input_video)
    SourceVideo = AssumeTFF(Sourcevideo) # or AssumeBFF(Sourcevideo)
    Source2x = SeparateFields(Sourcevideo)
    Resized2xsource = LanczosResize(Source2x,Width,Height*2)
    Rightvideo = SelectEven(Resized2xsource)
    Leftvideo = SelectOdd(Resized2xsource)
    # You might also want to add Addborders() + Crop() if rows don't line up
    Leftsbs = BilinearResize(Leftvideo,width/2,height)
    Rightsbs = BilinearResize(Rightvideo,width/2,height)
    StackHorizontal(Leftsbs,Rightsbs)
    The script takes your input, converts the fields to alternate frames, resizes/stretches the frames back to full height, creates 2 streams, resizes/squeezes each stream to 1/2 width, and overlays both streams back to a single full-rez composite stream.

    *Note that this type of conversion results in both 1/2 quality height and 1/2 quality width. One way to preserve the quality of the width portion is to output NOT to Sbs, but to Top/Bottom (aka Over/Under). This is also a supported format by most 3DTVs.

    That would be like:
    Code:
    Sourcevideo = DirectshowSource(your_input_video)
    SourceVideo = AssumeTFF(Sourcevideo) # or AssumeBFF(Sourcevideo)
    Source2x = SeparateFields(Sourcevideo)
    RightTB = SelectEven(Source2x)
    LeftTB = SelectOdd(Source2x)
    StackVertical(LeftTB,RightTB)
    Scott
    Last edited by Cornucopia; 23rd Nov 2011 at 13:35. Reason: Gavino pointed out my script errors!
    Quote Quote  
  10. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Cornucopia View Post
    Code:
    Sourcevideo = DirectshowSource(your_input_video)
    AssumeTFF(Sourcevideo) # or AssumeBFF(Sourcevideo)
    2xsource = SeparateFields(Sourcevideo)
    Resized2xsource = LanczosResize(2xsource,Width,Height*2)
    Rightvideo = SelectEven(Resized2xsource)
    Leftvideo = SelectOdd(Resized2xsource)
    # You might also want to add Addborders() + Crop() if rows don't line up
    Leftsbs = BilinearResize(Leftvideo,width/2,height)
    Rightsbs = BilinearResize(Rightvideo,width/2,height)
    StackHorizontal(Leftsbs,Rightsbs)
    Two problems with this script:
    (1) the AssumeTFF/BFF has no effect as you are not using its result. It should be
    SourceVideo = AssumeTFF(Sourcevideo) # or AssumeBFF(Sourcevideo)

    (2) variable names can't start with a number, so you need to rename '2xsource'.

    Similarly for your other script.
    Quote Quote  
  11. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Thanks so much Gavino, and sorry.

    I was playing fast and loose with old scripts, copying & pasting, when I put that together. Shows that I didn't test it before posting it. OOPS.

    Glad AVISynth scriptmasters like you are around. I've fixed the post...

    Scott
    Quote Quote  
  12. Yup .... after doing the correction, it worked like a charm. Made perfect Top / Bottom file. However I was surprised at how large the output file came out to be about 19 GB (without sound) while the original was only 572 MB.

    The AVI created was hard to open in many programs. I wonder if there is a way to reduce the size and make it more universal. Can I also do audio dubbing with AVISynth & Virtual Dub Mod ?

    Thanks for the help guys.
    Quote Quote  
  13. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yeah, you could add WavSource() at the beginning, and MixAudio() or AudioDub() at the end. But you may not need to if your audio already comes from your original input video in the script.

    Plus, you would frameserve AVISynth to Vdub or VdubMod and set the encoder there. Let's say your clip was 5 minutes long. 5 * 60 = 300 sec. If your clip is 572MB, that means = 572 * 8 = 4576 Mb. And 4576 Mb / 300 sec = 15.25Mbps. If that same clip is 19GB, that's 19 * 8 * 1024 = 155648 Mb. With a rate of 518Mbps.

    Sounds like uncompressed to me (remember, AVISynth always outputs uncompressed frames). Using a final distribution type codec (say Xvid or h.264), you could easily get it back down to the 8-24Mbps range.

    Scott

    BTW, for further ease in dealing with 3D files, take a look at Pantarheon's AVISynth 3D Toolbox. Makes alot of these kinds of conversions a simple, single command (note: I did NOT use them when I created my own earlier script(s) - you can probably tell! )
    Quote Quote  
  14. Originally Posted by alphauby View Post
    I was surprised at how large the output file came out to be about 19 GB (without sound) while the original was only 572 MB.
    You need to select a compression codec and configure it. Video -> Compression..., select codec, Configure button.
    Quote Quote  
  15. Thanks Guys. You have been great help. I figured out the Codecs in VDubMod. I'll play around with them. It was previously uncompressed.

    Is it possible to open a .mov (quick time) file in VDub / Avisynth ?

    And also I have a clip that is 3480 X 800 (mkv). My TV refuses to play it saying "Unsupported Resolution". Since you guys are the experts, I wanted to know how to handle this file ? Should I convert to 1920 X 800 SBS or to Top Bottom ? What would be the syntax ?
    Quote Quote  
  16. Originally Posted by alphauby View Post
    Is it possible to open a .mov (quick time) file in VDub / Avisynth ?
    To open them directly in VirtualDub (not VirtualDubMod) you can try the MP4/MOV or DirectShow* source plugins. In my experience the MP4 plugin doesn't work so well. See the plugins section of the VirtualDub section here.

    There are many ways to open them in AviSynth. You can use DirectShowSource()*, ffVideoSource(), etc. ffVideoSource() is part of the ffmpeg plugin.


    * VirtualDub's DirectShow plugin and DirectShowSource() require that you have DirectShow filters for the container and codecs installed (QuickTime, QuickTime Alternative, Haali, ffdshow, etc.). And DirectShow doesn't have frame accurate seeking -- that may give you problems when you need accuracy.
    Quote Quote  
  17. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    IME, .mov files are best converted from within QTPro to an uncompressed AVI intermediate and then (if necessary) re-compressed to what you want as final storage in a standard Window VFW/Directshow app. An extra step, but much less hassle as there are a number of quirks with QT/MOV files (color not the least among them). Best to use a "native" app for that format...

    @alphauby, what kind of file is this 3480x800? (mediainfo helpful here) If it's Sbs, that would make it 2x 1740x800, a very non-standard size. If your pc is trying to send it directly to the TV, the TV is probably having trouble scaling something with that large a width.

    In fact, many apps (both hardware & software) have trouble with widths that are >2k. I'm guessing that's one of the reasons that the HDMI committee created the framepacking standard as a quasi-Top&Bottom instead of as a quasi-SideBySide. Since video is historically a landscape mode/aspect picture, there's always greater "stress" on the horizontal "bit budget" than the vertical.

    Scott
    Quote Quote  
  18. Originally Posted by Cornucopia View Post
    what kind of file is this 3480x800? (mediainfo helpful here) If it's Sbs, that would make it 2x 1740x800, a very non-standard size.
    I suspect that's a typo and it's really 3840x800 -- two 1920x800 images side by side.
    Quote Quote  
  19. I just converted the MOV to MP4 via Quick Time Pro. Worked perfectly, no judder, no quality loss, but I think there certainly was a change of color space but that wasn't an issue at all since the colors on the mp4 were much richer than the original mov.

    Anyway ... here is the info for the Video File I was talking about. I am sorry for the typo earlier its 3840 X 800. So is basically two 1920s running side by side. VLC was able to play on my PC but I never got the picture on my Samsung 7 Series TV. Seems a little tricky with this aspect ratio ... what would be the best method to maintain maximum resolution / quality.

    Format : AVC
    Format/Info : Advanced Video Codec
    Format profile : High@L4.1
    Format settings, CABAC : Yes
    Format settings, ReFrames : 4 frames
    Codec ID : V_MPEG4/ISO/AVC
    Duration : 1h 36mn
    Bit rate : 18.2 Mbps
    Width : 3 840 pixels
    Height : 800 pixels
    Display aspect ratio : 4.800
    Frame rate : 23.976 fps
    Color space : YUV
    Chroma subsampling : 4:2:0
    Bit depth : 8 bits
    Scan type : Progressive
    Bits/(Pixel*Frame) : 0.247
    Stream size : 12.0 GiB (90%)
    Writing library : x264 core 118 r2085 8a62835
    Quote Quote  
  20. I'd try 960x800 x2 side by side.
    Quote Quote  
  21. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yeah, that would probably be alright.

    However, I would probably prefer either 1920x2160 (2xTop&Bottom 1920x1080) or 1920x1080 (2xTop&Bottom 1920x540).

    It's possible the 1st might work, because the lesser dimension is being doubled, not the greater dimension. They're still ~2k per dimension. Less likely to F$&k up the display.

    But, if that doesn't work. I still slightly prefer the 2nd TnB. Here's why:

    We know about resolution in the X and Y dimensions. That's straightforward - greater # of pixels = greater resolution. But what about resollution in the Z (depth) dimension? Looking back at how depth is "generated" in the mind through stereoscopic vision, you have to realize that it's all down to the granularity of the parallax (difference in pixel placement) in the X dimension.

    That means that if you want to maintain as much Z resolution as possible, you need to retain as much X resolution as possible (sometimes to the detriment of the Y dimension resolution).

    This is why TnB formatting is still so important.

    Kind of like why there are 2 HD formats in common use 1080i and 720p. 1080i is probably the more common because it's showing so much more "screen resolution", but 720p is very important too - especially if your interest is in sports/motion.

    Scott
    Quote Quote  
  22. However, I would probably prefer either 1920x2160 (2xTop&Bottom 1920x1080) or 1920x1080 (2xTop&Bottom 1920x540).
    The original file is 2x1920X800. If I just convert it to T/B wouldn't it be 1920X1600 rather than 1920X2160 ?

    And if I go for the second option as you suggested and convert to 1920X540, wouldn't that distort the aspect ratio when converting from 800 verticals to 540 verticals ?

    Please also help me out with the script. I am willing to try both methods and after the conversion I'll report back on it. I tried using Pantarheon's LeftRight3DToTopDown but it seems like I am still struggling with the scripting portion. I need to select the source file, extract the left and right and stack them vertically as top / bottom but I do not know how to do this with the Avisynth script. By the way do I need some plugin to open the mkv ? I tried it the way you wrote during the last conversion with Directshowsource but it didn't work, I am not sure if it was my script or the plugin.
    Quote Quote  
  23. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    I skipped a step that you're going to need to do but didn't consider...

    You're NOT going to be able to play a 1920x800 image natively on a TV. It'll either stretch it (which you don't want) or not accept it. You have to make it TV-Standards-Friendly.

    So you pad it back to 1920x1080. That's 140 pixels above and 140 pixels below. For each viewpoint.

    AVISynth script would be something like:
    Code:
    Original = DirectshowSource(...)
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    FullTB = StackVertical(Left,Right)
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2(FullTB)
    With Pantarheon's 3D Toolbox script, it would be like:
    Code:
    Original = DirectshowSource(...)
    Padded = AddBorders(Original,0,140,0,140)
    LeftRight3DToTopDown(Padded) #(or) LeftRight3DToTopDownReduced(Padded)
    If you're starting out with an MKV, you can use Haali Media Splitter, or the LAV Filters (with DirectshowSource) if you've installed either one of those, or you can just use the FFMpegSource() (have to install that plugin first) instead of DirectshowSource(). This is what's suggested on the AVISynth website. I don't use MKV much, so I don't pay alot of attention to it's needs...

    Scott
    Last edited by Cornucopia; 2nd Dec 2011 at 10:23.
    Quote Quote  
  24. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by Cornucopia View Post
    AVISynth script would be something like:
    Code:
    Original = DirectshowSource(...)
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    FullTB = StackVertical(Left,Right)
    #(optional) VerticalReduceBy2(FullTB)
    If the last line remains commented out, you will get an error unless you add
    return FullTB

    An alternative formulation of the script would be to replace the last two lines by
    Code:
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2()
    which works whether the last line is commented out or not.
    Quote Quote  
  25. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Once again you caught my faux-pas.


    What do you expect at 3 in the a.m.? I was tired.

    Will fix the offending script...DONE! It's set up now where it works with or without the comment.

    Scott
    Quote Quote  
  26. Everything is all set, the only problem is opening the mkv file. After struggling for some time, I have done the following but still stuck

    I tried with both VDub and VDubMod

    Installed Halli

    Demuxed the mkv to .h264

    Method 1:
    Installed DGAVCDecode Plugin and converted the file to DGA:

    LoadPlugin("C:\Program Files\AviSynth 2.5\Plugins\DGAVCDecode.dll")
    Original = AVCSource("N:\3D\Video.dga")
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2()

    Result:
    VDMOD: Cannot Locate decompressor for YV12 ....... Vdub requires VFW compatible codec to decompress .....
    VD: Opens the file and displays the output correctly but moving the marker beyond 5 secs on the timeline (or playing after 5 secs) it says: AVIsynth Read Error ... Access violation at XXXX reading from XXXX


    Method 2:
    Original = DirectshowSource("N:\3D\Video.mkv", convertfps=true)
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2()


    Result: AViSynth Open Failure. Crop destination width is 0 or less. ... Line 3

    Method 3:
    Original = DirectshowSource("N:\3D\Video.h264")
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2()


    Result: Directshowsourec couldn't open ............



    What to do ?
    Quote Quote  
  27. Member
    Join Date
    Jul 2009
    Location
    Spain
    Search Comp PM
    Originally Posted by alphauby View Post
    What to do ?
    Try ffVideoSource (from the ffms2 plugin).

    Method 2:
    Original = DirectshowSource("N:\3D\Video.mkv", convertfps=true)
    Padded = AddBorders(Original,0,140,0,140)
    Left = Crop(Padded, 0,0,-1920,0)
    Right = Crop(Padded, 1920,0,0,0)
    StackVertical(Left,Right)
    #(optional) VerticalReduceBy2()


    Result: AViSynth Open Failure. Crop destination width is 0 or less. ... Line 3
    Are you sure the source has a width of 3840? - the error message suggests it is 1920 (or less).
    It might just be a quirk of DirectShowSource, so try with ffVideoSource anyway.
    Quote Quote  
  28. Try ffVideoSource (from the ffms2 plugin).
    It Worked !!!

    I realized my ffms plugin was not behaving correctly so I installed a new copy of the newer beta version. VDubMod had the same YV12 error but VDub opened it without any problems and ran the script smoothly ...

    I have selected the Cinepak Codec for compression, the only thing now is that it is taking forever to convert, with all available resources on my Core i7, DDR3 and Radeon 5850 it has given an estimated time of completion in about 2 Days and 11 Hours . I can see happening as in 30 mins it has only done 1000 frames (out of 139,000) with a space consumption of 230 MB. It looks like at this rate it will actually take two days and the output file would be around 32 GB

    Are there any options that I did not work out ? Any tweaks ?
    Quote Quote  
  29. Originally Posted by alphauby View Post
    I have selected the Cinepak Codec for compression,
    Yuck. Cinepack is a very old, outdated, low quality, single threaded, slow codec. Use something like HuffYUV, Lagarith, x264vfw, Xvid, etc. Or frame serve to another encoder. Depending on what you plan to do with the video next.
    Quote Quote  
  30. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    Yeah, IIRC Cinepak has a weird bitrate bug where if you give it too much bitrate allocation it slows too a crawl, sometimes crapping out completely.

    IMO, the ONLY use for Cinepak these days is for reference/comparison purposes. Even if you're trying to work with oldest, lowest-end PC's they can likely still support MPEG1 giving much better quality per bitrate.

    If you need an interim codec, use Lagarith, HuffYUV, or Intra-AVC, Cineform, DNxHD, etc. If you need a final, distribution codec, use h.264 or Xvid.

    Scott
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!