How to Trim using AVIsynth Script

Questions and answers on how to get the most out of FFAStrans
Post Reply
vijm1972
Posts: 128
Joined: Fri Apr 24, 2015 7:35 am

How to Trim using AVIsynth Script

Post by vijm1972 »

Hi Steipal,

I wanted to trim video files using AVISynth or with any other option. Can you please help to create the script to trim the video files.
Source file TC start with
Black and Color Bar 09:58:50:00 to 09:59:59:59 want to cut this TC
Actual program start 10:00:00:00 till 10:15:00:00
Break Bumper from 10:15:00:01 to 10:15:30:00 want to cut this TC

Thanks
Vijay
admin
Site Admin
Posts: 1687
Joined: Sat Feb 08, 2014 10:39 pm

Re: How to Trim using AVIsynth Script

Post by admin »

Try this:

"
m_clip = Trim(m_clip, 1750, m_clip.framecount-750) #25 fps
Return m_clip

"

1750 = the start frame: 70 seconds og black and color bar * 25 fps
m_clip.framecount-750 = Total length of the clip - 750 (30 seconds of break bumper * 25 fps)

Just remember to always have "A/V Media"-decoder prior to your custom avisynth script. Also, the "m_clip" variable is always your media input provided by the decoder and should always be the last line in your custom script.

Besides that, please consult the AviSynth web page for generic usage: http://avisynth.nl/index.php/Main_Page


-steipal
Post Reply