VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. How do I change the perspective of a video with AviSynth? Say, I want to create thumbnails on a "3D" surface?

    There was a thread on this at Doom9 forums, but they only allow posting after being registered for five days, and I'm a bit impatient for that just now.

    The suggestion there was to use "ffdshow's perspective correction via it's raw-filter-processing as input for AviSynth". However I haven't a clue as to how this is practically done.

    That aside, I've seen several transition plugins to AviSynth that twist and tweak the picture in all possible ways, and the perspective change would be using only a tiny bit of that code. It's hard to believe it isn't out there already, but for the life of me I can't find it.
    Quote Quote  
  2. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    You should have registed 5 days ago, then it wouldn't be a problem.

    Better I would think to use ffdshow's avisynth plugin.

    Well there very well maybe a plugin, but I haven't heard of it either.
    Quote Quote  
  3. Precognition. I've been working on that.

    How would I use ffdshow's avisynth plugin in any useful manner?
    Quote Quote  
  4. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    Basically you setup ffdshow, save the setting and then load it via the plugin.

    Something like ffavisynth(settingname) if I recall correctly. Seem to recall a post explaining in doom9's AVISynth forum.
    Quote Quote  
  5. Does the trick. For reference:

    avisource("testing.avi")
    ffdshow(options="perspectiveY2=16,perspectiveX3=6,
    perspectiveY3=89,perspectiveX4=87,perspectiveY4=74 ,
    perspectiveInterpolation=1,perspectiveIsSrc=0,show Perspective=1,
    halfPerspective=0,isPerspective=1,orderPerspective =12,fullPerspective=1,
    perspectiveX1=6,perspectiveY1=15,perspectiveX2=87" )
    (All that should go to a single line. It's broken down to avoid breaking down the thread view.)

    Tweak the options as necessary. I need to go over them and document them for myself to make some sense of them, I don't want to tweak them in the ffdshow interface, I need to tweak pixels up and down with exact precision. More on that soon.

    With regards to the black spots, it seems they only appear with certain settings. Let's hope they get this spot issue fixed soon.
    Quote Quote  
  6. OK, here are the settings. The perspectiveX and perspectiveY values are given as percentages of the frame width and height respectively.

    The following are the settings for the coordinates of the four corners of the film:

    # perspectiveX1 = horizontal top left (def. 0)
    # perspectiveY1 = vertical top left (def. 0)
    # perspectiveX2 = horizontal top right (def. 100)
    # perspectiveY2 = vertical top right (def. 0)
    # perspectiveX3 = horizontal bottom left (def. 0)
    # perspectiveY3 = vertical bottom left (def. 100)
    # perspectiveX4 = horizontal bottom right (def. 100)
    # perspectiveY4 = vertical bottom right (def. 100)

    The following control various other settings:

    # perspectiveInterpolation - Sets the interpolation method: 0: None / 1: Linear / 2: Cubic (def. 0)
    # perspectiveIsSrc - "Source Rectangle" (on/off - 1/0)
    # showPerspective= Haven't a clue (def. 1)
    # halfPerspective = "Only right side" (on/off - 1/0)
    # isPerspective = Filter on or off (on/off - 1/0)
    # orderPerspective = Haven't a clue (def. 12)
    # fullPerspective = Process whole image (on/off - 1/0)

    And yes, you can also have the coordinates in a sane order although ffdshow exports the first three as the last when you save the presets:

    Code:
    ffdshow(options="perspectiveX1=10,perspectiveY1=30,
    perspectiveX2=100,perspectiveY2=0,perspectiveX3=0,
    perspectiveY3=100,perspectiveX4=100,perspectiveY4=100,
    perspectiveInterpolation=2,perspectiveIsSrc=0,showPerspective=1,
    halfPerspective=1,isPerspective=1,orderPerspective=12,fullPerspective=0")
    (Again, put that all on a single line and don't use spaces, both linebreaks and spaces seem to break it.)
    Quote Quote  
  7. Member
    Join Date
    Dec 2004
    Location
    Australia
    Search Comp PM
    You can just set it all up in ffdshow, save the setting and load it with the plugin.
    Quote Quote  
  8. Yes, but if you need to tweak something into its place, overlaid over another clip, it's considerably faster doing it directly in AviSynth.
    Quote Quote  



Similar Threads

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