But how does this find the matching frames? I need to search them manually. I believe to understand that this script is now assuming that it will always match when it's taking off the first 50 frames of the start? Is this correct?
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 91 to 120 of 172
Thread
-
-
Open one video in one tab, another video in another tab, and look for matching frame. How you do that in Pinnacle?
That script is just example, add there own edits with proper frame numbers. -
Oh I see.
In Pinnacle I just have a trim editor which shows both left and right clip, and gives the possibillity to precisely find the matching frames with previews next to each other.
In this printscreen the numers on top show the frames I needed to adjust to find the perfect cut.
When finished I just save and jump to the next cut to repeat unless all the clips are matched at the matching intersection.
[Attachment 65292 - Click to enlarge] -
So let's say I have 4 video's as in the Pinnacle print screen. Then I first make a single script for each file (so 4 in total) to be able to open and link it to AvsPmod? Then I open a tab to make a script in and open the 4 video's in 4 other tabs, using the scripts? Then I can use the video player in one tab to find the frame where to trim, put this vallue into the script in the first tab and move on to the second tab/video? Until I've edited all of the video's and put the vallues into to the script?
And with this script I can then export to 1 video clip (containing the 4 previous ones) and use this one more time to remove the timestamp? -
Do it in the way you prefer it, first I would create a main script joining all videos, lets call it Tab1:
Code:v1 = LWLibAvVideoSource("D:\video001.mkv") a1 = LWLibavAudioSource("D:\video001.mkv") v2 = LWLibAvVideoSource("D:\video002.mkv") a2 = LWLibavAudioSource("D:\video002.mkv") v3 = LWLibAvVideoSource("D:\video003.mkv") a3 = LWLibavAudioSource("D:\video003.mkv") v4 = LWLibAvVideoSource("D:\video004.mkv") a4 = LWLibavAudioSource("D:\video004.mkv") o1 = AudioDub(v1, a1) o2 = AudioDub(v2, a2) o3 = AudioDub(v3, a3) o4 = AudioDub(v4, a4) o1++o2++o3++o4
Code:LWLibAvVideoSource("D:\video001.mkv")
Code:LWLibAvVideoSource("D:\video002.mkv")
Code:LWLibAvVideoSource("D:\video003.mkv")
Code:LWLibAvVideoSource("D:\video004.mkv")
EDIT1:
No, no need for exporting then importing to delogo, at the end of the same script [aka Tab1] we will add delogo filter, so you'll be exporting only once - a final encode.Last edited by VoodooFX; 9th Jun 2022 at 20:48.
-
Thanks, still looks complicated, but I guess I'm starting to see things here... At least I hope haha
What about "Trim(50,999999)"? This trims the first 50 frames? But how do I trim at the end of a video then?
And can't I just put in the frame number where to cut or to trim? -
Put those frame numbers where you want to cut into Trim filter, first number is where you want your clip to start, second number is where you want that clip to end, 50th frame there would be included and 0 to 49 would be cut off, "999999" is just a fast hack - all frames from 50 to the end would be included as your clip is not longer than 999999 frames.
Btw, trim = cut. -
Oh, I was expecting something lie this already yes
How do I manage to get to 2 edits on one video?
Code:o1 = AudioDub(v1, a1).Trim(10856,999999).FreezeFrame(10801, 10801, 10802)
Or should I make seperate lines here? -
Code:
Trim(10856,999999).FreezeFrame(10801, 10801, 10802)
After the trim, the frame numbering changed. First frame with index 0 is now the first frame of the cut.
Especially if you start: Always use multiple lines and add comments to what you are doing.
Code:o1 = AudioDub(v1, a1).Trim(10856,999999).FreezeFrame(10801, 10801, 10802)
Code:av1 = AudioDub(v1, a1) # merge video v1 and audio a1 av1p1 = av1.Trim(0,10855) # create a part1 which starts at frame 0 and goes till frame 10855 av1p2 = av1.Trim(10856,0) # create a part2 which starts at frame 10856 and goes till the end of the clip av1p1 = av1p1.FreezeFrame(10801, 10801, 10802) # replace frame 10801 with frame 10802
users currently on my ignore list: deadrats, Stears555 -
Syntax is correct, you can chain filters like you did, but "10856" doesn't look right, are you removing 10856 starting frames from the first video?
And "10801" FreezeFrame doesn't look right too... you better describe what you want to do exactly.
PS
Would be better if you share those two first videos [by PM if you want], so I can see what you are trying to do. -
removes the complete video from the script playback.users currently on my ignore list: deadrats, Stears555
-
I now got this script so far. It seems to be working as desired in script playback so far.
[Attachment 65315 - Click to enlarge]
But now I've saved the script as an *.AVS file. And tried to use it on the batch file. It doesn't work. I've tried to change the extension *.MP4 to *.AVS in batchfile too. but with the same results.
How should I edit this to a new clip now? -
You have duplicate "o1", it doesn't work like that, do it as you did before.
@Selur
Stop confusing the guy. -
Line 10 in your script does nothing, since it's overwritten in line 11.
You probably wanted:
Code:o1 = AudioDub(v1,a1).Trim(0,10856) o1 = o1.FreezeFrame(10801,10801,10802)
Stop confusing the guy
-> I leave the fieldusers currently on my ignore list: deadrats, Stears555 -
Yes, I've already changed it. It was the first video, so I want to start this from frame 0 and cut it frame 10856. To keep 0-10856 and remove everything after. But figured out that one already haha
But in the seccond video I need to trim at the beginning and at the end. Taking the single range from 57-10853 is ok then? Because everything before and after will be trimmed? At least it works good in the script playback so far.
Yes, I figured out that I needed to start the first clip from 0 (however it was working in the script playback)
So I was trying cut everything off after frame 10856 and replace a glitched frame at 10801. -
important: Be sure to end a return statement, some tools will not add one internally like avspmod does. So adding a return statement at the end makes sure you don't have to worry whether the tool you feed the avisynth script to will add one itself.
Taking the single range from 57-10853 is ok then? Because everything before and after will be trimmed?users currently on my ignore list: deadrats, Stears555 -
Thanks!
I was already thinking it was strange to start twice with o1 here. But it seemed the script pplayback accepted it and it showed the wanted results.
So I should use:
Code:o1 = AudioDub(v1,a1).Trim(0,10856) o1 = o1.FreezeFrame(10801,10801,10802)
Code:o1 = AudioDub(v1,a1).Trim(0,10856).FreezeFrame(10801,10801,10802)
What about this "return statement"?
Edit:
So
Code:o1 = AudioDub(v1, a1).Trim(10856,999999).FreezeFrame(10801, 10801, 10802)
Now I've changed to this:
Code:o1 = AudioDub(v1, a1).Trim(0,10856).FreezeFrame(10801,10801,10802)
Last edited by Rockel83; 10th Jun 2022 at 08:55.
-
Personally I would recommend to use:
Code:o1 = AudioDub(v1,a1) o1 = o1.Trim(0,10856) o1 = o1.FreezeFrame(10801,10801,10802)
(I know it's lengthy, but way easier to spot problems this way)
What about this "return statement"?Code:return <variable name>
Code:return last
Code:return someEXPRESSION
Personally, instead of:
Code:o1++o2++o3
Code:o = o1++o2++o3 return o
Code:return o1++o2++o3
Code:return last
Cu Selurusers currently on my ignore list: deadrats, Stears555 -
Good. Btw, Use FreezeFrame before Trim, otherwise you can be confused with a changed timeline after Trim:
Code:o1 = AudioDub(v1, a1).FreezeFrame(10801,10801,10802).Trim(0,10856)
But there are no edits to the second and third clip, isn't there glitched frames and overlap in third clip?
Btw, I wrote you before how to encode from AvsPmod, search the previous messages.Last edited by VoodooFX; 10th Jun 2022 at 09:14.
-
But does it matter much in the output file? Because most clips have glitched frames, but there're also which have not. So beginning with the trim command is the same for every clip and I could just easely multiply or create a default script for all the video's I'm going to need to edit. I just have to remove the last part then if a clip is not containing a glitched frame.
I was thinking making a standard script of 11 clips (because this are the longest video's i have). I could easely add the information needed then and simply remove the unused lines. I think it should work best for me to keep things organized and avoid mistakes.
Having this so far now:
[Attachment 65316 - Click to enlarge]
No, this was just a short footage which were split into 3min. segments because of looprecording. These glitched frames only occured on automatically clips cuts in between. I mannually end the recording at the end of the 3h clip. So there's no glitched frame here.
The seccond clip was also not containing a glitched frame.
But could I use this batch file to create a video from this final script to? -
It doesn't matter if you done everything right.
As I remember you asked it for some unusual task, so it wouldn't work here.
Use: AvsPmod > Tools > Script Encoder (CLI) > Run. [Adjust CRF to your liking, lower is higher quality]
Do you want to save the clip without delogo?
If you want to do delogo then add previous delogo script at the end, it should fit with few tweaks, assign joined video to "v" and change "+" to "++", it should look like that:
Code:v = o1++o2++o3 xEnd = v.Trim(v.FrameCount,-1).loop(60) xStart = v.Trim(0,-1).loop(60) xStart ++ v ++ xEnd InpaintDelogo(Loc="4,990,-1380,-4", DynMask=3, DynTune=140, DynColor=$FFB900, DynColorTol=50, Dyn3Seq=52, DynInflate=3) Trim(60, FrameCount - 61)
-
Yes, but just to see the end result on a small clip and get this working first. When I'm doing everything correct here, then adding delogo is just a small extra and final step I guess.
Oh, this is working differently. It's creating an MP4 directly now. Easy!
Edit:
Got the first result now, looks great!
I'm now going to add this delogo script!
Edit2:
It should look like this?
Code:v1 = LWLibAvVideoSource("D:\test\# No Dolphins M.mp4") a1 = LWLibavAudioSource("D:\test\# No Dolphins M.mp4") v2 = LWLibAvVideoSource("D:\test\# No Dolphins N.mp4") a2 = LWLibavAudioSource("D:\test\# No Dolphins N.mp4") v3 = LWLibAvVideoSource("D:\test\# No Dolphins O.mp4") a3 = LWLibavAudioSource("D:\test\# No Dolphins O.mp4") o1 = AudioDub(v1, a1).Trim(0,10856).FreezeFrame(10801,10801,10802) o2 = AudioDub(v2, a2).Trim(57,10853) o3 = AudioDub(v3, a3).Trim(57,999999) v = o1++o2++o3 xEnd = v.Trim(v.FrameCount,-1).loop(60) xStart = v.Trim(0,-1).loop(60) xStart ++ v ++ xEnd InpaintDelogo(Loc="4,990,-1380,-4", DynMask=3, DynTune=140, DynColor=$FFB900, DynColorTol=50, Dyn3Seq=52, DynInflate=3) Trim(60, FrameCount - 61) return last
Last edited by Rockel83; 10th Jun 2022 at 11:36.
-
Looks OK [use FreezeFrame before Trim].
You'll be Avisynth pro in no time.
There you can find info on all Avisynth's internal filters [no need to install them]:
http://avisynth.nl/index.php/Internal_filters
And there most of Avisynth's external filters:
http://avisynth.nl/index.php/External_filtersLast edited by VoodooFX; 10th Jun 2022 at 11:51.
-
Wow!
This is the end result now:
https://www.youtube.com/watch?v=tMSyn1S9-No
Looks great!
I've prepared this script now:
Code:v1 = LWLibAvVideoSource("D:\dir\file.mp4") a1 = LWLibavAudioSource("D:\dir\file.mp4") v2 = LWLibAvVideoSource("D:\dir\file.mp4") a2 = LWLibavAudioSource("D:\dir\file.mp4") v3 = LWLibAvVideoSource("D:\dir\file.mp4") a3 = LWLibavAudioSource("D:\dir\file.mp4") v4 = LWLibAvVideoSource("D:\dir\file.mp4") a4 = LWLibavAudioSource("D:\dir\file.mp4") v5 = LWLibAvVideoSource("D:\dir\file.mp4") a5 = LWLibavAudioSource("D:\dir\file.mp4") v6 = LWLibAvVideoSource("D:\dir\file.mp4") a6 = LWLibavAudioSource("D:\dir\file.mp4") v7 = LWLibAvVideoSource("D:\dir\file.mp4") a7 = LWLibavAudioSource("D:\dir\file.mp4") v8 = LWLibAvVideoSource("D:\dir\file.mp4") a8 = LWLibavAudioSource("D:\dir\file.mp4") v9 = LWLibAvVideoSource("D:\dir\file.mp4") a9 = LWLibavAudioSource("D:\dir\file.mp4") v10 = LWLibAvVideoSource("D:\dir\file.mp4") a10 = LWLibavAudioSource("D:\dir\file.mp4") v11 = LWLibAvVideoSource("D:\dir\file.mp4") a11 = LWLibavAudioSource("D:\dir\file.mp4") o1 = AudioDub(v1, a1).Trim(999999,999999).FreezeFrame(1000,1000,1001) o2 = AudioDub(v2, a2).Trim(999999,999999).FreezeFrame(1000,1000,1001) o3 = AudioDub(v3, a3).Trim(999999,999999).FreezeFrame(1000,1000,1001) o4 = AudioDub(v4, a4).Trim(999999,999999).FreezeFrame(1000,1000,1001) o5 = AudioDub(v5, a5).Trim(999999,999999).FreezeFrame(1000,1000,1001) o6 = AudioDub(v6, a6).Trim(999999,999999).FreezeFrame(1000,1000,1001) o7 = AudioDub(v7, a7).Trim(999999,999999).FreezeFrame(1000,1000,1001) o8 = AudioDub(v8, a8).Trim(999999,999999).FreezeFrame(1000,1000,1001) o9 = AudioDub(v9, a9).Trim(999999,999999).FreezeFrame(1000,1000,1001) o10 = AudioDub(v10, a10).Trim(999999,999999).FreezeFrame(1000,1000,1001) o11 = AudioDub(v11, a11).Trim(999999,999999).FreezeFrame(1000,1000,1001) v = o1++o2++o3++o4++o5++o6++o7++o8++o9++o10++o11 xEnd = v.Trim(v.FrameCount,-1).loop(60) xStart = v.Trim(0,-1).loop(60) xStart ++ v ++ xEnd InpaintDelogo(Loc="4,990,-1380,-4", DynMask=3, DynTune=140, DynColor=$FFB900, DynColorTol=50, Dyn3Seq=52, DynInflate=3) Trim(60, FrameCount - 61) return last
So this way I always have the same setup without the risk of making typo's here. And I just have to remove the lines or vallues that are not in use when merging smaller video's -
Yep, looks great. Btw, why audio is so quiet, I can't hear anything?
-
Because my action cam was in a waterproof housing. I need to go look for another alternative, something I connect an eternal microfone to.
I've recorded some tours at ancient sites to. But can't hear annything of the tourguide explaining. Maybe I will have some poosibility to increase the sound track to get some improvements here when I'm starting editing. -
Instead of explicitly opening the audio and video of each file and dubbing them like you did:
Code:v1 = LWLibAvVideoSource("D:\test\# No Dolphins M.mp4") a1 = LWLibavAudioSource("D:\test\# No Dolphins M.mp4") v2 = LWLibAvVideoSource("D:\test\# No Dolphins N.mp4") a2 = LWLibavAudioSource("D:\test\# No Dolphins N.mp4") v3 = LWLibAvVideoSource("D:\test\# No Dolphins O.mp4") a3 = LWLibavAudioSource("D:\test\# No Dolphins O.mp4") o1 = AudioDub(v1, a1).Trim(0,10856).FreezeFrame(10801,10801,10802) o2 = AudioDub(v2, a2).Trim(57,10853) o3 = AudioDub(v3, a3).Trim(57,999999) v = o1++o2++o3 # etc
Code:# a function to open audio and video and dub them together function OpenAV(string filename) { a = LWLibavAudioSource(filename) v = LWLibAvVideoSource(filename) AudioDub(v, a) } # get all your assets v1 = OpenAV("D:\test\# No Dolphins M.mp4") v2 = OpenAV("D:\test\# No Dolphins N.mp4") v3 = OpenAV("D:\test\# No Dolphins O.mp4") # trim each as needed o1 = v1.Trim(0,10856).FreezeFrame(10801,10801,10802) o2 = v2.Trim(57,10853) o3 = v.Trim(57,999999) # append the the trimmed segments v = o1++o2++o3 # etc
Also, Trim() has an option for specifying "to the end of the video" as the ending frame number -- use 0. So instead of Trim(57,999999) you can use Trim(57,0). -
What is going wrong here?
I just configured another video in exactly the same way, but it didn't gave errors.
[Attachment 65327 - Click to enlarge]
The path and the filename is correct, it's the same as tab 1 and I have videoplayback there.
Edit:
Strange, this is working...
[Attachment 65328 - Click to enlarge]Last edited by Rockel83; 10th Jun 2022 at 17:36.
-
v1 and a1 are both opening the video stream. You need to change a1 to open the audio. Same for the other imports.
Similar Threads
-
Difference between lossless and lossy changing fps (timestamp vs encoding)
By precipizio in forum Blu-ray RippingReplies: 4Last Post: 23rd Feb 2022, 09:24 -
Keeping timestamp of edited / converted Video
By keyboard in forum Newbie / General discussionsReplies: 4Last Post: 29th Sep 2021, 06:57 -
ffmpeg "Missing key frame while searching for timestamp" message
By the_steve_randolph in forum Newbie / General discussionsReplies: 0Last Post: 19th Aug 2021, 14:38 -
How to fix a timestamp overlap?
By WoundedPear in forum Newbie / General discussionsReplies: 2Last Post: 2nd May 2020, 03:00 -
Polaroid CUBE timestamp flaw?
By terrypin in forum Newbie / General discussionsReplies: 6Last Post: 9th Jun 2017, 16:17