Success!
Yippeee :!:
Thanks to the help here, I managed to get it working just right and tried it on some samples and two full length films to see if it caught any false scenechanges but it seems to be just right. When shown in vdub the framerate appears anything up to a second out but plays okay so I don`t mind. For those who might find a use for a script that converts to 3D anaglyph format here`s the script I ended up with. Thanks again for this :D # START OF SCRIPT # Load audio source audio=AVISOURCE("C:\AVI\video_data\video.avi") # Load video file to convert to 3D source=AVISource("c:\AVI\video_data\video.avi") # Make a copy but one frame behind source2=trim(source, 1, 0) # Now convert them to RGB so we can adjust them source=ConvertToRGB(source) source2=ConvertToRGB(source2) # Adjust files so one is red and one cyan red =RGBAdjust(source, 1,0,0,1) cyan=RGBAdjust(source2, 0,1,1,1) # Overlay these two images together with a slight offset so that when # there is no movement between frames to create true 3D a pseudo # 3D effect will still be visible video=Overlay(cyan,red,-4,-4,opacity=0.5,output="YV12") # Tweak the output to brighten and make it more visible video=Tweak(video, sat=2,bright=4,cont=2) # Make lst = most recent frame lst=Trim(video,1,0) # Check for difference between this frame and next. If different # replace with alternative x=ConditionalFilter(lst, video, lst, "VDifferenceToNext()", ">", "16") # Dub on the audio after resampling it audio=SSRC(audio, 48000) film=audiodub(x, audio) # Speed up the film if needed to pal framerate film=AssumeFPS(film, 25.000, true) # Return amended file return(film) # END OF SCRIPT |
Nice script, Mental!
I'm glad you make it work! :D |
The logic:
AssumeFPS(25,true) ssrc(48000) ... means: FIRST do the fps conversation incl. keeping audio in sync by using "true" and THEN afterwards using ssrc to get that synced audio to its desired khz samplerate. The other way around like you did it, wont work correct. |
I didn`t think it made a difference whether ssrc came before or after as I thought it altered the sample rate only, but will try the other way :oops:
@muaddib I couldn`t have done it without all this help :) |
Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.