Re: Stumped, baffled, and perplexed.......
- From: Jan Panteltje <pNaonStpealmtje@xxxxxxxxx>
- Date: Sun, 04 Oct 2009 12:54:34 GMT
On a sunny day (Sat, 3 Oct 2009 23:36:45 -0400) it happened "Smarty"
<nobody@xxxxxxxxxx> wrote in <ha958e$uqv$1@xxxxxxxxxxxxxxxxxxxxxxxxxx>:
Jan,
What purpose does the integer variable frame_offset serve? I see it being
passed to the display / fprintf routine through that subroutine call, but
don't see it being modified. Is it a spacing for display purposes (like 100
units.....)?
Smarty
Ah, nothing complicated, it only means the count down clock will start at frame 100,
so after 4 seconds in a 25 fps movie.
subtitler-yuv is controlled by a script language, each line starts with a frame number, followed by a command or text.
I have appended the script I used at the end of this posting.
But before that, one remark that may be of interest to some:
The render time was mentioned.
I realised last night after writing that little program, that I could just as well have it
generate a .srt file, or a .ssa file (for substation alpha in windows), or any other
subtitle format files.
The advantage would then be, in case of srt for example, that you can have the script
in the same directory as the _unmodified_ movie, and it will just make a nice countdown timer
in the form of a subtitle.
And you can then add text too.
Programs like mplayer will then just add (overlay) the sub to the picture.
You can switch it off too that way, or even have different sub channels.
I will try to write that code (for srt) later, and publish it here, as it is an often used format.
I do not really need it myself, as the xste subtitler I wrote can can read the previous script (ppml),
and output srt, ssa, and some other subtitle formats.
So I will get back with that srt code later.
Should compile no problem in MS windows too.
Anybody still using substation alpha in MS windows? Used to be available for free, 10 years ago?
I dunno.
This is the start of the script used to make ftp://panteltje.com/pub/test_downcount.mpg :
; this is a comment, empty lines are ignored
; define a name for the main movie object
*main main_movie
; define name for the subtitles
*subtitle subtitle
; definition of object rose
*rose picture /root/rose.ppm
; definition of some text
*intro text Hi there, showing some possibilities
; definition of object flower
*flower picture /root/rose.ppm
; definition of object frame_counter
*counter frame_counter
; definition of object sun
*sun picture /root/sun.ppm
0 *main skip=0
; NOTE SET FOR YOUR FONT PATH!
1 *subtitle font_dir=/root/.subtitles/font/iso-8859-1/arial-28
1 *intro font_dir=/root/.subtitles/font/iso-8859-1/arial-28
1 *counter font_dir=/root/.subtitles/font/iso-8859-1/arial-18
; fade in main movie
2 *main contr=0.0 dcontr=1 sat=0 dsat=1
2 *main show_output=1
2 *subtitle center=0
; put the counter on x, y
; objects of type frame_counter are always on top
2 *counter xpos=100 ypos=10
; counter saturation, contrast, color vector increases each frame by 39
2 *counter sat=80.0 dcolor=39 contr=70
; fade in subtitle :-)
2 *subtitle color=0 sat=100 dcolor=0 contr=1 dcontr=1 transp=1 dtransp=0 espace=1 despace=0
; create 'the land of flower' for this demo
3 *flower xpos=160 ypos=150
; where it is midnight and dark (contrast to zero and saturation to zero)
3 *flower contr=0;
; no colors visible in the dark.
3 *flower sat=0;
3 *subtitle dypos=-.1
3 *subtitle color=0 sat=30 contr=70 dcolor=0 dtransp=0
3 *main skip=0
4 The Panteltje Picture Manipulation Language
; scroll welcome text to west (left) into the picture and out again.
4 *intro xpos=800 ypos=0 speed=5 heading=270
6 *counter espace=10 despace=.5 outline=0 doutline=.1
; place sun behind earth (zaxis!, earth is main movie is z zero)
10 *sun xpos=160 ypos=150 zpos=-1
; up, sunrise, sun moves towards top of screen (north)
11 *sun heading=0
; sun rizing slowly...
11 *sun speed=1
; only draw light part of .ppm, this masks out the black in the .ppm picture
11 *sun slice=128
; increment brightnes and color of the land of rose as the sun rises,
; creating the illusion it was caused by the sun.
11 *flower dcontr=1 dsat=1
16 *counter despace=-1
18 *subtitle color=0 sat=30 contr=70 dcolor=11 dtransp=-4
19 *subtitle center=1;
; explain
20 When the sun begins to rise, everything in the land of rose becomes visible and color appears
25 *subtitle dtransp=-4
32 *counter despace=0 espace=1
; move the frame counter
40 *counter ydest=500 xdest=600 speed=10 dspeed=3 ddspeed=3
50 *subtitle dtransp=4
50 *main debug=1
; move the flower to the left (overrides heading and speed)
50 *flower dxpos=-1
; hold flower at this size
80 *flower dxsize=0 dysize=0
; restore original sizes, and set size deltas to zero
91 *sun rsize
100 *flower rsize
100 *subtitle dypos=0 dtransp=0 transp=0
100 *main skip=0;
100 *subtitle dypos=0 transp=100 dtransp=-1 sat=70 color=70 dcol=39
; start of count down timer, update every 25 frames (once per second)
; the slashes push it up a line from the bottom.
; print it
100 01:02:02\\\\\\
125 01:02:01\\\\\\
; etc....
.
- References:
- Stumped, baffled, and perplexed.......
- From: Smarty
- Re: Stumped, baffled, and perplexed.......
- From: Arny Krueger
- Re: Stumped, baffled, and perplexed.......
- From: Smarty
- Re: Stumped, baffled, and perplexed.......
- From: Jan Panteltje
- Re: Stumped, baffled, and perplexed.......
- From: Smarty
- Stumped, baffled, and perplexed.......
- Prev by Date: Re: Stumped, baffled, and perplexed.......
- Next by Date: A simple down counter for use with mplayer
- Previous by thread: Re: Stumped, baffled, and perplexed.......
- Next by thread: Re: Stumped, baffled, and perplexed.......
- Index(es):
Relevant Pages
|