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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 26th June 2015, 11:34   #1  |  Link
srfscenar
Registered User
 
Join Date: May 2003
Posts: 477
Replace frames with black

Hi all,
Newbie in avisynth.

I have a video which is 271200frames.
I want to replace the part of my video between 800-950 frames
with total black.
How can I do that?

Thank you,
__________________
" 2 minds are better than 1 "
srfscenar is offline   Reply With Quote
Old 26th June 2015, 15:57   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,414
Here is one way to do it

Code:
orig=last

bl=blankclip(orig)

orig.trim(0,799) ++ bl.trim(800,950) ++ orig.trim(951,0)
poisondeathray is offline   Reply With Quote
Old 26th June 2015, 16:30   #3  |  Link
srfscenar
Registered User
 
Join Date: May 2003
Posts: 477
Thanks! Seems logical. But Avspmod says 'Splince: one clip has audio and the other doesn't (not allowed)' got any ideas?
__________________
" 2 minds are better than 1 "
srfscenar is offline   Reply With Quote
Old 26th June 2015, 16:32   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,414
killaudio()

Code:
orig=last

bl=blankclip(orig).killaudio()

orig.trim(0,799) ++ bl.trim(800,950) ++ orig.trim(951,0)
poisondeathray is offline   Reply With Quote
Old 26th June 2015, 16:43   #5  |  Link
srfscenar
Registered User
 
Join Date: May 2003
Posts: 477
That did it! Now it says Frame sizes doesn't match. Any idea about this?
__________________
" 2 minds are better than 1 "
srfscenar is offline   Reply With Quote
Old 26th June 2015, 16:54   #6  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 3,414
Are you sure ?

Blankclip(orig) will take on the dimensions , fps, and colorspace of "orig" (or whatever clip you specify)

What are your video characteristics (eg. use mediainfo), and source filter - post your full script
poisondeathray is offline   Reply With Quote
Old 26th June 2015, 17:00   #7  |  Link
srfscenar
Registered User
 
Join Date: May 2003
Posts: 477
Sorry my bad! Worked perfectly!!!
__________________
" 2 minds are better than 1 "
srfscenar is offline   Reply With Quote
Old 26th June 2015, 22:53   #8  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Quote:
Originally Posted by poisondeathray View Post
Blankclip(orig) will take on the dimensions , fps, and colorspace of "orig" (or whatever clip you specify)
It will also take on the presence or absence of an audio track - eg, if "orig" is video only, you get a blank video only clip - so the KillAudio() should not be necessary either. I suspect user error here too.
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:24.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.