# SBSorTAB2FS.avs v1.0 by r0lZ, July 18, 2016 # Avisynth script to convert a 3D clip from Full or Half SBS or T&B to 720p or 1080p frame sequential # Requires the FFMpegSource2 avisynth plugin: http://avisynth.nl/index.php/FFmpegSource # Usage: Copy this script in the directory containing the source clip, and edit the settings below to suit your needs. # Encode the script using a good x264 or x265 frontend, and mux with MkvToolnix GUI. # Don't forget the very important x264 option --frame-packing 5 # Select the stereography mode 13: both eyes laced in one block (left first) for the video stream in MkvToolnix GUI. # Edit the settings below: # Source clip file name. If the AVS script is not in the same directory, the full path must be provided. SourceClip = "Monsters University trailer 3D-HSBS.mkv" # Source format is SBS?. Can be true for SBS or false for T&B SourceSBS = true # source is half-TAB ? Can be true for Half-T&B or false for full T&B. (This setting is ignored if the source is full-SBS or half-SBS) SourceFull = false # Source has left view first ? Can be true for left view first (usual), or false for right view first. SourceLeftViewFirst = true # Source vertical resolution. Can be 720 or 1080 SourceResolution = 1080 # Output vertical resolution. Can be 720 or 1080 OutputResolution = 720 # Load the source clip in Half or Full-SBS 1080p format FFMpegSource2(SourceClip) # Crop left and right images from Half or Full SBS source view1 = SourceSBS ? Crop(0, 0, last.width / -2, 0) : Crop(0, 0, 0, last.height / -2) view2 = SourceSBS ? Crop(last.width / 2, 0, 0, 0) : Crop(0, last.height / 2, 0, 0) # Build Frame sequential clip fs = SourceLeftViewFirst ? Interleave(view1, view2) : Interleave(view2, view1) # If the horizontal black borders have been cropped, restore them border = ( SourceSBS || SourceFull) ? (SourceResolution - fs.height) / 2 : (SourceResolution / 2 - fs.height) / 2 fs = ( border > 0 ) ? AddBorders(fs, 0, border, 0, border) : fs # Resize FS clip to 720p or 1080p LanczosResize(fs, OutputResolution * 16 / 9, OutputResolution)