digitalFAQ.com Forums [Archives]

digitalFAQ.com Forums [Archives] (http://www.digitalfaq.com/archives/)
-   Video Encoding and Conversion (http://www.digitalfaq.com/archives/encode/)
-   -   DVD2SVCD: Let's create a menu plugin for DVD2SVCD (http://www.digitalfaq.com/archives/encode/5533-dvd2svcd-create-menu.html)

azel 09-11-2003 02:41 PM

Let's create a menu plugin for DVD2SVCD
 
I've made a little avisynth script to make a chapterselection menu for SVCD/VCD/KVCD.
Here is the results:


http://www.digitalfaq.com/archives/error.gif


Code:

### Setup

# Enter Source
Source=mpeg2source("D:\NeroImages\VCD\DVD2SVCD\DVD2AVI_PROJECT_FILE.d2v")

# Enter Text
MovieTitle="Sweet Home Alabama"
CDNum="1/1"
EncType="KVCD"

# Chapters (Enter chapeter start frame)
Chapt1Start=0
Chapt2Start=2001
Chapt3Start=4001
Chapt4Start=6001
Chapt5Start=8001
Chapt6Start=10001
ChaptStartafter=200

# Width, Height, Framerate
MenuWidth=720
MenuHeight=576
MenuFramerate=25

# Time
Thump_time=100

# Details (Advanced)
ThumbWidth=150
ThumbHeight=150

NrThumbWidth=4
NrThumbHeight=2

FromEdge=10

### Calculations
StartWidth1=MenuWidth*FromEdge
StartWidth=StartWidth1/100
StartHeight1=MenuHeight*(FromEdge+7)
StartHeight=StartHeight1/100

EndWidth1=MenuWidth*(100-FromEdge)
EndWidth2=EndWidth1/100
EndWidth=EndWidth2-ThumbWidth
EndHeight1=MenuHeight*(100-FromEdge-5)
EndHeight2=EndHeight1/100
EndHeight=EndHeight2-ThumbHeight


### Script

# Background
Background1=Trim(Source,0,-1)
Background2=Loop(Background1)


## Subtitle
# "Title"
Background=Subtitle(Background2, MovieTitle, x=MenuWidth/2, y=25, first_frame=0, last_frame=99999, font="Arial", size=50, text_color=$FFFFFF, align=8)
# "CD Number"
Background=Subtitle(Background, CDNum, x=StartWidth+5, y=MenuHeight-40, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$FFFFFF)
# "CD type" (SVCD, VCD, KVCD, Etc.)
Background=Subtitle(Background, EncType, x=EndWidth2, y=MenuHeight-40, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$FFFFFF, align=6)


# Thump lenght
Clip1=Trim(Source, Chapt1Start+ChaptStartafter,Chapt1Start+ChaptStartafter+Thump_time)
Clip2=Trim(Source, Chapt2Start+ChaptStartafter,Chapt2Start+ChaptStartafter+Thump_time)
Clip3=Trim(Source, Chapt3Start+ChaptStartafter,Chapt3Start+ChaptStartafter+Thump_time)
Clip4=Trim(Source, Chapt4Start+ChaptStartafter,Chapt4Start+ChaptStartafter+Thump_time)
Clip5=Trim(Source, Chapt5Start+ChaptStartafter,Chapt5Start+ChaptStartafter+Thump_time)
Clip6=Trim(Source, Chapt6Start+ChaptStartafter,Chapt6Start+ChaptStartafter+Thump_time)

# Thump Size
Clip1=LanczosResize(Clip1, ThumbWidth, ThumbHeight)
Clip2=LanczosResize(Clip2, ThumbWidth, ThumbHeight)
Clip3=LanczosResize(Clip3, ThumbWidth, ThumbHeight)
Clip4=LanczosResize(Clip4, ThumbWidth, ThumbHeight)
Clip5=LanczosResize(Clip5, ThumbWidth, ThumbHeight)
Clip6=LanczosResize(Clip6, ThumbWidth, ThumbHeight)
# Thumb numbers
Clip1=Subtitle(Clip1, "1", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)
Clip2=Subtitle(Clip2, "2", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)
Clip3=Subtitle(Clip3, "3", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)
Clip4=Subtitle(Clip4, "4", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)
Clip5=Subtitle(Clip5, "5", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)
Clip6=Subtitle(Clip6, "6", x=0, y=0, first_frame=0, last_frame=99999, font="Arial", size=40, text_color=$DD0B01, align=7)


# Mix
v1=Layer(Background, Clip1,"add",255,StartWidth,StartHeight)
v2=Layer(v1, Clip2,"add",255,(MenuWidth/2)-(ThumbWidth/2),StartHeight)
v3=Layer(v2, Clip3,"add",255,EndWidth,StartHeight)
v4=Layer(v3, Clip4,"add",255,StartWidth, EndHeight)
v5=Layer(v4, Clip5,"add",255,(MenuWidth/2)-(ThumbWidth/2), EndHeight)
v6=Layer(v5, Clip6,"add",255,EndWidth, EndHeight)


Trim(v6,0,-1)

What about make a litle plugin for DVD2SVCD, so this goes automaticly?
With this method I also can make motion menues, but the encoding time will be long....
My biggest problem is to change the xml-file for VCDxBuild. Can anybody help me???[/IMG]

azel 09-13-2003 11:40 AM

Quote:

Originally Posted by Avalon
Let's see. I'll try it out today. :wink: How do the motion-menu work? Is it possible to add a backround?

Motion menu:
-Edit last line: Trim(v6,0,100)
This will create 4 sec motion

Bacground:
-From the movie (still):
Background1=Trim(Source,1000,1001)
-From the movie (motion):
Background1=Trim(Source,1000,1100)

You can also use BMP, JPG, color, etc, but I haven't tried it jet.

PS! Motion menu will use VERY much of your CPU. Even 4 second motion menu will take up to several minutes!!!


All times are GMT -5. The time now is 11:51 PM  —  vBulletin Jelsoft Enterprises Ltd

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