digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Avisynth Scripting (http://www.digitalfaq.com/archives/avisynth/)
-   -   Avisynth: filter to cut out Commercials? (http://www.digitalfaq.com/archives/avisynth/7345-avisynth-filter-cut.html)

Bchteam 12-23-2003 01:24 PM

Avisynth: filter to cut out Commercials?
 
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 ???

rendalunit 12-23-2003 01:30 PM

You can use the avisynth function Trim(x,x). Load the capture into vdub to find the cut points

Bchteam 12-23-2003 02:00 PM

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)

nicksteel 12-23-2003 03:19 PM

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.

rendalunit 12-23-2003 03:31 PM

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

Bchteam 12-23-2003 04:01 PM

@ 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

rendalunit 12-23-2003 04:28 PM

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)


nicksteel 12-23-2003 05:25 PM

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.

Bchteam 12-24-2003 04:09 AM

Both methods worked :!:

Thanks Nicksteel and Rendalunit :wink:

incredible 12-24-2003 04:31 AM

@ 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.


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

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.