Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
29th August 2014, 09:42 | #1 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
Trim(), how much exactly?
Wiki says:
"Remember AviSynth starts counting at frame 0." But then proceeds to say: Trim(100,0) # delete the first 100 frames... But wouldn't that be 101 deleted frames then?! Reason I ask is because of following test: Code:
Trim(70790, -50) # FreezeFrame(70803, 70812, 70802) FreezeFrame(13, 21, 12) So, should I just add 70790 again to the 13 (70803); or, assuming Trim(70790, -50) did trim 70901 frames, start at 70804? This process will take me ca. 70 hours, so I better get it right. :P)
__________________
Gorgeous, delicious, deculture! |
29th August 2014, 10:53 | #2 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
trim(100,0) means the trimmed clip will start at frame 100 (the parameter doesn't mean "delete up to and including frame 100", but "start at frame 100"), skipping frames 0-99 (which is a total of 100 frames).
So frame 13 in your trimmed clip will be frame 70790+13=70803 in your original clip. showframenumber can be of great help in these circumstances (you could apply before and after the trim to see which numbers correspond). Last edited by wonkey_monkey; 29th August 2014 at 11:00. |
29th August 2014, 11:29 | #3 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
FAUX EDIT: Already figured out ShowFrameNumber(), right after I posted this. Turns out ShowFrameNumber() shows the actual frame number (sans the trim), when appended to the FFVideoSource line (which makes sense, of course). This proved to be very useful, as it just showed 70803 in my test clip, so turns out I had no need to calculate, after all.
__________________
Gorgeous, delicious, deculture! |
|
30th August 2014, 16:01 | #4 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
On the matter of trimming, could Trim() be used to splice two or more sources? (Cut on I-Frames boundaries, of course). That way, instead of doing 1 huge >200 hour encoding session, I might chop it up into several (lossless) parts, and spice em all together later on.
Or does AviSynth only alllow 1 video source? Thanks.
__________________
Gorgeous, delicious, deculture! |
30th August 2014, 16:12 | #6 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
Code:
a1=clip1 a2=clip2 a3=clip3 .... return a1+a2+a3+.... |
|
30th August 2014, 16:24 | #7 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
Now, that is good to know. Thx. In reality, however, I would probably want to encode the parts with a certain overlap (like for things like MCTemporalDenoise(), so as not to see the sudden transition, kinda like how threading works with overlap). And then use Trim() to splice em together. So, if all parts had like 100 frames (including overlap), like: return a1.Trim(0, 90)+a2.Trim(10, 90)+a3.Trim(10, 90)... From what you're saying, it looks like that will be possible. Thx again.
__________________
Gorgeous, delicious, deculture! |
|
30th August 2014, 16:34 | #8 | Link | |
I'm Siri
Join Date: Oct 2012
Location: void
Posts: 2,633
|
Quote:
edit: if you split your clip at scene change frames, you don't need to overlap at all, and splitting at scene change frames is how mvtools2 works internally as well, there're 2 parameters "thscd1", "thscd2" in mvtools2 which control the detection of scene change stuff Last edited by feisty2; 30th August 2014 at 16:49. |
|
30th August 2014, 17:07 | #9 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
__________________
Gorgeous, delicious, deculture! |
|
30th August 2014, 21:36 | #10 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Perhaps of interest:
Trim Splice from Multiple source clips: http://forum.doom9.org/showthread.php?t=162446 Trim Splice from single source clip: http://forum.doom9.org/showthread.ph...59#post1683559 Both with audio fade at splices (default 1ms) to avoid clicks and cracks in audio.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
30th August 2014, 21:43 | #11 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
__________________
Gorgeous, delicious, deculture! |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|