VideoHelp Forum
+ Reply to Thread
Results 1 to 12 of 12
Thread
  1. Running into an odd issue. I finally picked up a 3d projector. I want to convert some of my older interlaced field sequential 3d films over to sbs or top and bottom since some of them still have not had a proper 3d bluray release.

    Some of these scripts were posted before (from Jagabo and Cornucopia).

    I know I used these in the past. Here is whats occurring

    currently one film I want to convert to SBS is full frame 4x3 no letterboxing. I assume because its still 4x3 that side by side would be the best route (if it were letterboxed I may have gone with top/bottom). Its ntsc 720x480

    here is a simple script Jababo wrote in 2021
    Code:
    WhateverSource() # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    when I try this in avsmod (and changing some general info (source path), I now get an error from avisynth saying

    "script error: invalid argument to separatefields"

    anyone know why this is occurring?

    Also had a similar one with a resize

    back in 2011, Cornucopia had this
    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)
    but synth didn't understand the Lanzosresize options of (Source2x,Width,Height*2)


    I do have 3 versions of synth being 2.5, 2.6 and 2.8 all 32bit. Had and used these for years with never any issues (aside from general script errors)


    In a nutshell im trying to work scripts that would do the following- 1: FS to side by side with 4x3 full frame sources ntsc 720x480
    2. FS to top/bottom widescreen or in some rare chance top and bottom but I need to keep the 4:3 ratio (aware the picture will be smaller)

    some of the scripts I found on the forums should work but as mentioned im getting odd errors

    any help would be appreciated
    Last edited by mazinz; 12th Jul 2021 at 20:25.
    Quote Quote  
  2. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Instead of posting the script models, post the actual script used
    Quote Quote  
  3. Originally Posted by davexnet View Post
    Instead of posting the script models, post the actual script used
    sure
    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    this flags the
    "script error: invalid argument to separatefields"


    this:
    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SourceVideo = AssumeTFF(Sourcevideo) # or AssumeBFF(Sourcevideo)
    Source2x = SeparateFields(Sourcevideo)
    Resized2xsource = LanczosResize(Source2x,Width,Height*2)
    Rightvideo = SelectEven(Resized2xsource)
    Leftvideo = SelectOdd(Resized2xsource)
    gave the response of "I dont know what width means".
    Now entering some various picture sizes for the wording of width and height presented the error of "not a clip"
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    You have to give it a name because nothing has been assigned to "last"
    Code:
    Source2x = SeparateFields(Sourcevideo)
    Resized2xsource = LanczosResize(Source2x,Width(Source2x),Height(Source2x)*2)
    Similarly, the Separatefields
    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields(Sourcevideo)
    Quote Quote  
  5. Remember that when you don't specify a stream (or it's parameters) by name the name "last" is used. So your script:
    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    is equivalent to:

    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    last = SeparateFields(last)
    last = StackHorizontal(last.SelectEven(), last.SelectOdd())
    return(last) # implied
    You can see that SeparateFields() is trying to use last -- but no stream called last has been created yet. You could simply use:
    Code:
    DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    By the way, DirectShowSource() should only be used as a last resort. for MPEG 2 sources it's best to use Mpeg2Source() after building an index with DgIndex. For AVI you can use AviSource(). If that doesn't work (because you don't have VFW decoders for the video), or for other containers, use ffVideoSource(), LWlibavVideoSource() or LSMASHVideoSource(). You'll need to install the FFmpegSource or LSMASHSource packages.

    http://avisynth.nl/index.php/FFmpegSource
    http://avisynth.nl/index.php/LSMASHSource
    Quote Quote  
  6. Originally Posted by jagabo View Post
    Remember that when you don't specify a stream (or it's parameters) by name the name "last" is used. So your script:
    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    is equivalent to:

    Code:
    Sourcevideo = DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    last = SeparateFields(last)
    last = StackHorizontal(last.SelectEven(), last.SelectOdd())
    return(last) # implied
    You can see that SeparateFields() is trying to use last -- but no stream called last has been created yet. You could simply use:
    Code:
    DirectshowSource("C:\DVDVolume\VideoFile.m2v") # interlaced, field sequential video
    SeparateFields()
    StackHorizontal(SelectEven(), SelectOdd())
    By the way, DirectShowSource() should only be used as a last resort. for MPEG 2 sources it's best to use Mpeg2Source() after building an index with DgIndex. For AVI you can use AviSource(). If that doesn't work (because you don't have VFW decoders for the video), or for other containers, use ffVideoSource(), LWlibavVideoSource() or LSMASHVideoSource(). You'll need to install the FFmpegSource or LSMASHSource packages.

    http://avisynth.nl/index.php/FFmpegSource
    http://avisynth.nl/index.php/LSMASHSource

    Ahhhhh thank you both for very much for this information. This puts things in a better perspective of understanding. I was able to get the scripts working (I do have another issue I could use some assistance with, listed at the bottom).

    Originally I had mpeg2 source along with dgindex, but it gave a wrong result when the clip was demuxed as an m2v (saw it as progressive). The dvd this is coming from instead of having the 2d and 3d as separate titles, it had them in one title set with the 2d being pgc1 and the 3d being pgc2. I used pgcdemux to get the pgcc2 streams. I ran index on the m2v from this (as mentioned saw it wrongly as progressive). I then used dvdremake pro and just deleted the 2d pgc1 and recompiled the disc with the 3d version only. Running index on those vob files sees it properly as interlaced, however this is also around the time when I was trying to get the scripts to work, so I just left it as direct show with the m2v.

    I thought I dled LSmash a long time ago, evidently this wasn't the case. Will grab that along with the synth ffmpg

    Now that I learned a little bit more with scripting, if I use the simple stack vertical or horizontal scripts on this file (inc the d2v version) the aspect ratio (4:3 in this case- no letterboxing) goes away. It looks more like its stretching and squishing the clip. What would i have to add to the scripts in order to keep the ratio?

    Here is a sample of whats occurring (ignore the quality). Pic on left is how it appears using either script and on the right is how it should be displaying. Also ignore the 000.m2ts title name, that is from Tmpg authoring works 6 which will accept avisynth scripts

    Image
    [Attachment 59837 - Click to enlarge]
    Last edited by mazinz; 13th Jul 2021 at 17:15. Reason: typos galore
    Quote Quote  
  7. I'm not sure what you're asking here. I see a "normal" interlaced frame on the right (with the usual woven fields). On the left two fields are stacked rather than woven. There are many script mentioned in this thread. What exactly are the scripts that gave you those results? Neither of those would have come from a script with StackHorizontal(). The image on the left could be made from the image on the right with:

    Code:
    SeparateFields()
    StackVertical(SelectEven(), SelectOdd())
    Quote Quote  
  8. Originally Posted by jagabo View Post
    I'm not sure what you're asking here. I see a "normal" interlaced frame on the right (with the usual woven fields). On the left two fields are stacked rather than woven. There are many script mentioned in this thread. What exactly are the scripts that gave you those results? Neither of those would have come from a script with StackHorizontal(). The image on the left could be made from the image on the right with:

    Code:
    SeparateFields()
    StackVertical(SelectEven(), SelectOdd())
    Jagabo,
    Original goal was to take the FS 3d clip and either convert it to SBS or top/bottom. Yourself and DaveXnet helped me out with what I was doing wrong for the avisynth scripts listed.
    However when I finally ran those I noticed the aspect ratio was going off. Cornucopia had a script (listed in post 1) back from 2011 where a user was trying to convert 3d FS and went with top and bottom. That script worked for me but gave me the weird ratio results you saw in post prior.

    That said, running your script of

    Code:
    Sourcevideo = Mpeg2Source("C:\test.d2v") # interlaced, field sequential video
    SeparateFields(SourceVideo)
    StackHorizontal(SelectEven(), SelectOdd())
    also displays the ratio being off looking more vertically squished and horizontally stretched (similar to how it appeared in Cornucopia's top and bottom script). I am not sure why this is occurring. Is there something that should be added to the script to prevent the stretch and squish? For arguments sake I ran the clip in GSpot just to be sure it was truly 720x480 4:3 and not flagged wrong by the authoring company.

    I have a sample picture taken in avsmod where you can see the script and display results with the picture being stretched and squished. I super imposed (top right in the picture) how the clip should look in terms of display. I also included a short sample clip (cut by smart editing- no encoding) if you want to take a closer look at it. I appreciate the help

    Image
    [Attachment 59852 - Click to enlarge]
    Image Attached Files
    Quote Quote  
  9. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    Separatefields produces a half-height picture. NOt sure what you're trying to do or show, to be honest
    Quote Quote  
  10. Originally Posted by davexnet View Post
    Separatefields produces a half-height picture. NOt sure what you're trying to do or show, to be honest
    I'm not sure how much more simple I can make this? I went over what I was trying to do in the post above. Its not so much about half height but that its NOT keeping the ratio when its doing it. Here, the top image is how it displays in the script. The bottom image is how I need it to look (which is shrinking it so it fits side by side while keeping the aspect ratio). The output format is side by side (parallel) 3d which I can then play through my projector which will convert the side by side to my current active 3d format

    Image
    [Attachment 59856 - Click to enlarge]
    Quote Quote  
  11. Once you get outside the DVD and Blu-ray standards 3d is a wild west where everyone does their own thing. If your player doesn't play the half height fields correctly you will have to resize them yourself.

    Code:
    SeparateFields()
    Spline36Resize(640x480)
    StackVertical(SelectEven(), SelectOdd()) # or StackHorizontal
    You might also have to reverse the order of SelectEven() and SelectOdd().
    Quote Quote  
  12. Originally Posted by jagabo View Post
    Once you get outside the DVD and Blu-ray standards 3d is a wild west where everyone does their own thing. If your player doesn't play the half height fields correctly you will have to resize them yourself.

    Code:
    SeparateFields()
    Spline36Resize(640x480)
    StackVertical(SelectEven(), SelectOdd()) # or StackHorizontal
    You might also have to reverse the order of SelectEven() and SelectOdd().
    THANK YOU Jagabo!! Yes I do have to swap the field start order otherwise the clip would be crosseyed view.
    Im going to run the vob title set through dvdvob2mpg (same team who made isobuster makes this) and then do the d2v file with that one piece mpeg.
    Again thank you very much for your time and information.
    Quote Quote  



Similar Threads

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