digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   TMPGEnc: simple fade out from an mpeg-1 file? (http://www.digitalfaq.com/archives/encode/2966-tmpgenc-simple-fade.html)

TKS 03-12-2003 09:43 PM

TMPGEnc: simple fade out from an mpeg-1 file?
 
Wasnt too sure where to post this, but does anyone know of a program that could help me do a simple fade out from an mpeg-1 file? Ive looked around and most of em will only do it with an .avi file..

thanks

tks

kwag 03-12-2003 10:36 PM

I guess you mean while encoding right :?:
You can use the "Fade" functions in a avisynth script.
Read here: http://www.avisynth.org/index.php?page=Fade

-kwag

rendalunit 03-12-2003 10:41 PM

hi TKS,

Avisynth has a FadeOut filter that will do that 8O

kwag 03-12-2003 10:43 PM

Beat you by 5 minutes ren :lol:

rendalunit 03-12-2003 10:47 PM

Quote:

Originally Posted by kwag
Beat you by 5 minutes ren

Yep! I pushed the "post reply" button and thought for five minutes fade out for pre or post processing :?: :mrgreen:

jorel 03-13-2003 01:43 AM

:oops:
hi to all....

please,i need a script sample of :

fade in and out for audio e video.

i never understood things like that:

"FadeIn(clip clip, int num_frames [, int color])
FadeIO(clip clip, int num_frames [, int color])
FadeOut(clip clip, int num_frames [, int color])

FadeIn2(clip clip, int num_frames [, int color])
FadeIO2(clip clip, int num_frames [, int color])
FadeOut2(clip clip, int num_frames [, int color])"

and my klinglish don't understand the avisynth site.
for me the site is out of orther,very confuse.
tons of links that goes to links that turn to the first link. 8O 8O
i can't find a simple example there!
only bla,bla and bore! :?

help me please!

thanks in advance!
:)

kwag 03-13-2003 03:07 AM

Hi jorel,

If you add this to your script:
Code:

FadeIn(120)
Assuming your source is 23.976fps, the above would fade in your movie from black to full brightness in ~5 seconds.
Play with the values in FadeIn and FadeOut :wink:
You can experiment with things like "Trim(0,-1).FadeOut(240)", which will fade out to black the last ~10 seconds of your movie :)

-kwag

jorel 03-13-2003 03:11 AM

Quote:

Originally Posted by kwag
Hi jorel,

If you add this to your script:
Code:

FadeIn(120)
Assuming your source is 23.976fps, the above would fade in your movie from black to full brightness in ~5 seconds.
Play with the values in FadeIn and FadeOut :wink:
You can experiment with things like "Trim(0,-1).FadeOut(240)", which will fade out to black the last ~10 seconds of your movie :)

-kwag

thank you really much my friend Kwag :D

you know,i was waiting for this treasure here!!
very simple for who knows,fantastic help to who don't know!! :wink:

you're the one!
8)

TKS 03-13-2003 06:31 PM

actually...
 
Thanks for the replies :)


But the file is already encoded as an mpeg-1.

Stupid question: but could i just frameserve the mpeg into vdub back into tmpgenc to make it fade out with some sorta vdub filter? if any..

tks

rendalunit 03-13-2003 07:07 PM

hi TKS,

You can reencode the mpeg1 by using Avisynth and VDub to frameserve to TMPGenc if you want.

I would use MovieStacker or SwiftAVS to create the avisynth script. Then add Nic's MPEGDecoder plugin to load the mpeg1 (it replaces the MPEG2DEC.dll). Add the FadeOut filter. Then load the .avs into VDub and add any vdub filters you want and frameserve to TMPGenc.

ren

vhelp 03-13-2003 10:29 PM

mini MPEG-1 "filtering" guide..
 
hay guys..

An Mini Guide to adding "Filtering" to an already made MPEG-1 clip
------------------------------------------------------------------------------------------

you don't have to re-encode your MPEG-1 clip, and end up making it
even worse (than it already might be anyways) ..

Apps you'll need are:
1, Virtualdub
2, any MPEG-1 editor ie, M1, TMPG etc.

instead.. try this:

* first, load your MPEG-1 clip into vdub

* next, make sure you do NOT have "Video/Direct Stream Copy" enabled.
..rather, keep it on "Video/Full Processing mode"

* next, since you want to make a FadeOut at the END of your clip,
..select (highlight) the video via the time-line using the begin/end
..markers, ie, press Ctrl_Lt, and then select the /__ and then
..press Ctrl_Lt, and then back video like 2 seconds to your left with
..the Crsr_Lt and note the seconds readout on bottom of time-line.
..and then finally press the __\ button (this is your markout)
..NOTE.. remember to jot down the time-line's number readout, for
..later joining (hopefully, accurate)

* next, press delete..

* NOW, you have the last 2 seconds (or whatever time length you chose)
..in your video window. It's now time to SAVE this small video clip..
..so proceed to save segment - - could cost you anywheres from 25MB
..to 50MB (or more) depending on your captures' resolution size ie, 352x480
..or 720x480 etc. because it's saving it as an RGB format, NOT as an its
..original MPEG-1. vdub won't save back to MPEG-1. So do bare this in
..mind when working this way w/ MPEG-1 clips under vdub.

.
Ok, so now that we've finally saved our last 2 seconds clip, it's now
time to proceed to the next step..
.

* open an AVIsynth (*.AVS) script file or start a NEW one for just this
..project, and maybe call this script, FadeOut.avs and bring in this new
..fade.avi clip into the script

* now include in your AVS script, this line:
..making any adjustments to number bewtween () per your cut length
Code:

FadeOut(70)
* SAVE this script ie, fade.avs

.
ok, NOW we JOIN our original MPEG-1 clip plus our new fade.avs but..
here's the trick he he.. don't loose me here..
.

* open your MPEG-1 editor (whatever you use for MPEG-1 edits/cuts/joins)

* first, bring in the original MPEG-1 clip

* then, remembering those numbers in the time-line (above) proceed to CUT
..the last 2 seconds out (or whatever seconds you used in YOURS)
..this is where you'll replace the last 2 seconds w/ your fade.avi clip.

* so, using your MPEG-1 editor, highlight the last 2 seconds and CUT that
..out -- ( i ment the video clip he he.. )

* next, insert or import your fade.AVS script (note, or if encoded to an
..MPEG-1 clip, should work then)

* now, proceed to re-SAVE..

* Vualla.. you're done. well, almost..

I don't know for sure (untested) if your MPEG-1 editor will JOIN that
last 2 second *.AVS script. It may have to be encoded to MPEG-1 first,
THEN for SURE, you'll be able to JOIN the two together. and again, Vualla..
a nice fade out at the end of your MPEG-1 clip.

Note 1, of course, this could be adapted to MPEG-2 clips as well. Just
do a little experimenting on a few first. I can't speak for every MPEG-1
editor and their features out their. Only you know what works or not.
But this is the easyiest, quickest way (w/out re-encoding the whole clip)

Note 2, you could ALSO apply other filtering ideas to this process.

Note 3, who cares about "quality" for the last 2 seconds!! At least your
99.99 % MPEG-1 clip will be whole.

Let me know if this works (for anyone)
Good luck to you guys.
-vhelp

jorel 03-26-2003 04:25 AM

@ Kwag, friendalunit, vhelp and everybody:

fade in and fade out works really cool!!!!
:D thank you!!

but...
and the audio fading? :? :? :? :?

how can i fade in and out the audio in the script?

of course i was in avisynth page and for me there is very complicated cos using the search,the only thing that i got was:
links going to other links.....no answer. i'm tired...read too much.
i read ALL the readme of avisynth....maybe was my klinglish,
i don't see how can i do it!

help me,please???!!! :wink:

thanks in advance!

:wink: :wink: :wink: :) please,please!!

ps:
i did a search in doom9 too.
not found!
:(

Boulder 03-26-2003 10:10 AM

@jorel:

Fadeout does fadeout both the audio and video, I use it with my TV caps.

If you want to fadeout the audio without fading out the video, you'll have to process the video and audio streams separately in the script and then bring them back together after the processing. I'm sure the lads here can tell you the correct syntax, I've never done any audio dubbing in Avisynth.

Edit: Fadeout(250) would for example fadeout the last 250 frames of the clip that is loaded. I've usually used it with Trim as Trim(0,10000).Fadeout(100) or something like that.

jorel 03-26-2003 10:16 AM

Quote:

Originally Posted by Boulder
@jorel:

Fadeout does fadeout both the audio and video, I use it with my TV caps.

If you want to fadeout the audio without fading out the video, you'll have to process the video and audio streams separately in the script and then bring them back together after the processing. I'm sure the lads here can tell you the correct syntax, I've never done any audio dubbing in Avisynth.

Edit: Fadeout(250) would for example fadeout the last 250 frames of the clip that is loaded. I've usually used it with Trim as Trim(0,10000).Fadeout(100) or something like that.

thanks vm friend Boulder!! :wink:

now i see how it works.
:D

wait,i see but don't know how can i do it. :(

can someone post a sample script or something,please!

:?:

Boulder 03-26-2003 10:29 AM

Hmm..now that I think of it a bit more, if you do a normal DVD->KVCD conversion, you'll have to save the audio track as WAV, process it in some audio editing tool to do the fadeout and then encode it to MP2. You can't edit the AC3 file in Avisynth at the moment. If you convert a DivX or XviD clip or any TV captures, fadeout will work for both video and audio.

jorel 03-26-2003 11:34 AM

:lol:

very cool my friend.

i was thinking in some like this but now you show me the road!!!

:D :D :D

thank you friend Boulder, it will work very fine!

:wink:


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

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