Quantcast Avisynth: Filter to Cut Out Commercials? - digitalFAQ.com Forums [Archives]
  #1  
12-23-2003, 01:24 PM
Bchteam Bchteam is offline
Free Member
 
Join Date: Jan 2003
Posts: 275
Thanks: 0
Thanked 0 Times in 0 Posts
I have some captures, which contain commercial breaks and I just want to know whether there's a filter, that can cut the commercials out ???
Reply With Quote
Someday, 12:01 PM
admin's Avatar
Site Staff / Ad Manager
 
Join Date: Dec 2002
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
  #2  
12-23-2003, 01:30 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
You can use the avisynth function Trim(x,x). Load the capture into vdub to find the cut points
Reply With Quote
  #3  
12-23-2003, 02:00 PM
Bchteam Bchteam is offline
Free Member
 
Join Date: Jan 2003
Posts: 275
Thanks: 0
Thanked 0 Times in 0 Posts
Ok, that's helpful...

But how do I use that filter ???

I mean, I have found out the cutpoints, but how can I adjust the filter ?

I know for my limited language knowledge it's hard to describe...

What should I put in here:

Trim (IN HERE)
Reply With Quote
  #4  
12-23-2003, 03:19 PM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Bchteam
Ok, that's helpful...

But how do I use that filter ???

I mean, I have found out the cutpoints, but how can I adjust the filter ?

I know for my limited language knowledge it's hard to describe...

What should I put in here:

Trim (IN HERE)
Load AVI or MPEG into VirtualDub
Select sets of trim points
Under FILE, select SAVE PROCESSOR SETTINGS
Run vcf2avs_gui.exe against processor settings file to generate AVI file with trim() statements
Cut and Paste trim statement into avs directly after MPEG2SOURCE or AVISOURCE statement.
That's it.

Be sure to save wav file also in VirtualDub, as it will match trimmed video.
Reply With Quote
  #5  
12-23-2003, 03:31 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
here's one example:

you got a commercial that starts at frame 787 and ends at 927

Code:
c=AviSource("C:\CAPTURE.avi",false)

trim(c,0,787) ++ trim(c,927,0)
trim(c,0,787) selects start to start of commercial
trim(c,927,0) selects end of commercial to end of clip
++ joins the two
Reply With Quote
  #6  
12-23-2003, 04:01 PM
Bchteam Bchteam is offline
Free Member
 
Join Date: Jan 2003
Posts: 275
Thanks: 0
Thanked 0 Times in 0 Posts
@ Nicksteel

2 Questions

Where do I select the trim sets in Vdub ?

Where do I get vcf2avs_gui.exe ?

@ rendalunit

Please, could make an example with multiple commercial breaks ???

Thank you
Reply With Quote
  #7  
12-23-2003, 04:28 PM
rendalunit rendalunit is offline
Free Member
 
Join Date: Apr 2002
Location: san jose, Ca
Posts: 1,148
Thanks: 0
Thanked 0 Times in 0 Posts
Sure,

commercial #1 starts- 1000 ends- 1300
commercial #2 starts- 2000 ends- 2500
commercial #3 starts- 3200 ends- 4000
commercial #4 starts- 5100 ends- 5800

Code:
c=AviSource("C:\CAPTURE.avi",false)

trim(c,0,1000) ++ trim(c,1300,2000) ++
\     trim(c,2500,3200) ++ trim(c,4000,5100) ++ trim(c,5800,0)
Reply With Quote
  #8  
12-23-2003, 05:25 PM
nicksteel nicksteel is offline
Free Member
 
Join Date: Nov 2002
Posts: 863
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Bchteam
@ Nicksteel

2 Questions

Where do I select the trim sets in Vdub ?

Where do I get vcf2avs_gui.exe ?

http://forum.doom9.org/showthread.ph...435#post310435

@ rendalunit

Please, could make an example with multiple commercial breaks ???

Thank you
At the bottom of the VirtualDub screen, there is a slider bar and buttons. Use slider bar or buttons to locate start frame to cut
Press the next to the last button
Locate the end frame to cut
Press the last button

At the top of the VirtualDub screen
Select "Edit"
Select "Delete Section"
This will mark frames to delete

Repeat these steps until you have deleted all the sections you want to delete.

At the top of the VirtualDub screen
Select "File"
Select "Save processing settings"
Save the file.
Select "Save Wav"
Save the file (use to mux with the m1v or m2v file from KVCD)

run vcf2avs_gui.exe
select the file you created with "Save processing settings"
create new AVI file.

Open the new AVS file with processor settings
Copy trim statement
Open your AVS file
Past the trim statement after your Source statement.

That's it.
Reply With Quote
  #9  
12-24-2003, 04:09 AM
Bchteam Bchteam is offline
Free Member
 
Join Date: Jan 2003
Posts: 275
Thanks: 0
Thanked 0 Times in 0 Posts
Both methods worked

Thanks Nicksteel and Rendalunit
Reply With Quote
  #10  
12-24-2003, 04:31 AM
incredible incredible is offline
Free Member
 
Join Date: May 2003
Location: Germany
Posts: 3,189
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to incredible
@ Nickstel & Bchteam

Its easier than you think! In case of using Avisynth the best choice is VirtualDubMod!! Cause it generates avisynth lines so that vcf2avs way isn't needed:

- Open VirtualDubMod

- Select "Open Video File via Avisynth"

- In VirtualDubMod now you specify the markers and do your deletings until all commercials ar cut out.

- Now right above select Tools/ScriptEditor

- Now you entered the Avisynth editor of VdubMod and in there you go to "Edit" and choose "Import Frameset as Trims" and ... schwupps ... the exactly needed Trim(xxx,xxx) ++ Trim .... Lines will be placed where the cursor in the avisynth script is.

- After this you can choose in the editor Window "Safe & Refresh". Now you can close VdubMod and your AVS is ready made!

This way is also my first choice for testing AVS Filters, cause the "Safe & Refresh" option shows directly in VdubMod what will happen.

CHeers
Inc.
Reply With Quote
Reply




Similar Threads
Thread Thread Starter Forum Replies Last Post
Avisynth: HQdn3d - mplayer filter ported to avisynth incredible Avisynth Scripting 1 10-25-2004 09:51 AM
Best way to cut commercials from tv capture? nicksteel Video Capturing / Recording 29 06-30-2003 12:18 AM
Recording Video: Cutting WINDVR commercials nicksteel Video Capturing / Recording 23 04-29-2003 09:28 PM
Cutting Commercials from TV recordings? nicksteel Video Capturing / Recording 4 04-11-2003 12:58 PM
Audio problems after editing out commercials? Pnumonic Video Capturing / Recording 2 05-27-2002 06:56 AM

Thread Tools



 
All times are GMT -5. The time now is 03:51 AM  —  vBulletin Jelsoft Enterprises Ltd