PDA

View Full Version : Is it possible to have "nested" script? + Possible addition of "comments" in vid?


zeldAIS
8th December 2007, 23:58
1. Is it possible to have a nested script using avisynth? I'm thinking that during combining vids together using alignedsplice, one or more of the vids will be adding filters.

This is a sample of what i have in mind
a = directshowsource("\Splash.avi", fps=29.97)

b = {
DirectShowSource("\ShiniBara03.avi", fps=29.970)
LoadVirtualDubPlugin("\VirtualDubMod_1_5_10_2_All_inclusive\plugins\Logo.vdf","Logo",0)
ConvertToRGB()
Logo(5, 5, 100, 2, 35, 195, 35, 5, "\logo.bmp", 0, 0, 0, 0, 0, 0, 0)
ConvertToYV12()

TextSub("\03.ass")
}

AlignedSplice(a,b)

of course, the syntax of this is wrong right? is there any way that it's possible? Another idea i have in mind is that - Is there a filter where you can call another avisynth script into another avisynth script? cause if it's possible, that can be a solution, methinks.

2. How will you add comments in a vid using avisynth? Is it possible? Comments i mean like this (the encircled one) -
http://i24.servimg.com/u/f24/11/51/47/04/th/commen10.jpg (http://www.servimg.com/image_preview.php?i=47&u=11514704)

thanks in advance for the people who will reply :)

Wilbert
9th December 2007, 00:20
For example (best is to load your AVIs with AviSource):

LoadVirtualDubPlugin("\VirtualDubMod_1_5_10_2_All_inclusive\plugins\Logo.vdf","Logo",0)

a = AviSource("\Splash.avi")
b = AviSource("\ShiniBara03.avi").ConvertToRGB()
b = b.Logo(5, 5, 100, 2, 35, 195, 35, 5, "\logo.bmp", 0, 0, 0, 0, 0, 0, 0).ConvertToYV12()
b = b.TextSub("\03.ass")

a+b

You can add text using Subtitle.

Sagekilla
9th December 2007, 01:39
Those comments you're talking about are actually chapters, you'll need to add those in your muxing application (mkvmerge for example)

talen9
9th December 2007, 01:41
If I understand the OP correctly, he wants to know how to include informations like the "title" into the final multimedia file.

@zeldAIS:
That's an issue of muxing, rather than stream producing; AviSynth only covers the latter.
Comments are part of the container (be it AVI or MKV or whatever) and it's the muxer which has the responsibility of filling those comments.

zeldAIS
9th December 2007, 08:11
@Wilbert - thanks a bunch ^0^ will test that out =3

@Sagekilla and talen9 - aaa. i see. hmm - i use Yamb mostly as i produce mp4 rather than mkv. thanks a bunch will research on commenting (google is ever your best friend XD)

Edit: any suggestions what muxer can add comments? thanks

R3Z
9th December 2007, 11:44
@Wilbert - thanks a bunch ^0^ will test that out =3

@Sagekilla and talen9 - aaa. i see. hmm - i use Yamb mostly as i produce mp4 rather than mkv. thanks a bunch will research on commenting (google is ever your best friend XD)

Edit: any suggestions what muxer can add comments? thanks

You need to make a chapters file first, setting out the time points and the name of the chapters. You can do this with DVD decrypter or create a text file yourself based on say the OGG chapter file template ie;

CHAPTER01=00:00:00.000
CHAPTER01NAME=Intro
CHAPTER02=00:10:00.000
CHAPTER02NAME=Eating A Pie
CHAPTER03=00:20:00.000
CHAPTER03NAME=Scratching Self
CHAPTER04=00:25:00.000
CHAPTER04NAME= Sleep Time

etc..

Then use YAMB and select the chapters file and then mux.

talen9
9th December 2007, 14:01
I find ChapterXtractor (which is included in GordianKnot distribution, btw) easy to use to obtain the "chapters" file; you only have to open the right IFO file and specify "OGG format" for the file you want to obtain. If you want to change the chapters' names, I suggest you open the file later with Notepad (editing is not so easy from inside ChapterXtractor, IMO).

You will then be able to include it into MKV files using mkvmerge and his GUI; regarding YAMB (which i don't use), R3Z has already replied :p

zeldAIS
10th December 2007, 00:47
thanks to both you for replying :)

but does chapters also considered as comments? I've never tried to add chapters before at my encodes but i think i'll give it a try and post things up when something ain't right :P

again, thank you very much :D

Edit: comments i mean are like the one that can be added in the streams > video comments at virtualdubmod. But i'm testing commenting in .mp4/.mkv containers and h24 encoding. any help will be much appreciated :)

R3Z
10th December 2007, 02:00
thanks to both you for replying :)

but does chapters also considered as comments? I've never tried to add chapters before at my encodes but i think i'll give it a try and post things up when something ain't right :P

again, thank you very much :D

Edit: comments i mean are like the one that can be added in the streams > video comments at virtualdubmod. But i'm testing commenting in .mp4/.mkv containers and h24 encoding. any help will be much appreciated :)

Chapters are considered chapters :p Only difference here is that you can actually name them and have that visible in an mp4/mkv container on playback.

This is pertaining to what you asked for in your first post with your screenshot.

Adding chapters does not require a re-encode. Its a simple remux using whatever tool you want. I use YAMB, or the mp4 muxer in megui - but thats me.