digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Conversão e Codificação de Vídeo (Português) (http://www.digitalfaq.com/archives/portugues/)
-   -   Trim(xx,xxx) - Como usar? (http://www.digitalfaq.com/archives/portugues/8805-trimxxxxx-usar.html)

FlavioMetal 03-26-2004 09:32 AM

trim(xx,xxx) - Como usar?
 
Fala, galera entendida!

Bom, eu vi em algum tópico que dá pra dividir o MPEG em capítulos com o comando trim(xx,xxx) no script. Como usá-lo?

Prodater64 04-03-2004 07:28 PM

Re: trim(xx,xxx) - Como usar?
 
Quote:

Originally Posted by FlavioMetal
Fala, galera entendida!

Bom, eu vi em algum tópico que dá pra dividir o MPEG em capítulos com o comando trim(xx,xxx) no script. Como usá-lo?

Trim(clip clip, int first_frame, int last_frame)

Trim(clip clip, int first_frame, int -num_frames)
Apara um clip do video de modo que inclua somente o first_frame dos frames através do last_frame.
O áudio é aparado similarmente de modo que permaneça sincronizado.
Recorde começos de AviSynth contar no frame 0.
Se você passar um número negativo para last_frames retorna o first_frame dos frames através do first_frame + dos num_frames - 1. Para o exemplo: Trim(100, -100) # mesmos que Trim(100,199)
Se você o passar a 0 para o last_frame meios "extremidade do clip".
Isto significa também que a única maneira retornar apenas o primeiro frame deve usar a sintaxe alterna com num_frames. Para o exemplo: Trim(100,0) # suprimem os primeiros 100 frames
Trim(0, -1) # NÃO o mesmo que Trim(0,0) -- que retornaria apenas a coisa inteira se você rachasse, a 1a parte seria Trim(0, x) a à parte seria Trim(x+1, y)

Em inglés
Trim(clip clip, int first_frame, int last_frame)

Trim(clip clip, int first_frame, int -num_frames)

Trim trims a video clip so that it includes only the frames first_frame through last_frame. The audio is similarly trimmed so that it stays synchronized. Remember AviSynth starts counting at frame 0.

If you pass a negative number for last_frames it returns frames first_frame through first_frame + num_frames - 1. For example:

Trim(100,-100) # same as Trim(100,199)

If you pass 0 for last_frame it means "end of the clip". This also means the only way to return just the first frame is to use the alternate syntax with num_frames. For example:

Trim(100,0) # deletes the first 100 frames

Trim(0,-1) # NOT the same as Trim(0,0) -- that would just return the whole thing

If you are splitting, the 1st part would be Trim(0,x) the 2nd part would be Trim(x+1,y)


All times are GMT -5. The time now is 04:02 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.