video hack - scrolling credits

12 views
Skip to first unread message

Big Bad Bob

unread,
Sep 22, 2020, 3:45:25 AM9/22/20
to
this is my ObHack too...

Ever want to make scrolling credits for a movie? I don't know how many
tools out there can do it, but what I came up with looks as good as
anything Hollyweird might do for a typical movie. I had dual columns
and single column and different size fonts all mixed in nice and
purdy-like, with background music of my own authorship. yeah I'm
working on a video, an educational one, actually. I hope to have it up
on youtube soon...

Anyway, here's how the hack works:

a) use Libre Office Writer, but set the page length really really long,
but make it a normal width. Then, put all of your text in there as you
want it to be. You'll want to leave "screen height" space above the
first line, though, so the text scrolls into view.

Next, use 'File Export' and save it to a bitmap. Adjust the DPI and
otehr parameters so that the width comes out the way you want it (let's
say 1280 pixels, with 720 pixel screen height for 720p format). If you
do it right you should end up with a REALLY tall JPEG containing your
scroll text. So far so good.

NEXT, you'll probably want to invert the colors from black text on white
to white text on black. Simple, use 'gimp', choose 'invert' under
'color' (after selecting 'all'), re-export it back. Also time to edit
the bottom and top to the way you like it.

FINALLY, you'll want to use ImageMagick with some kind of script to
scroll the thing by writing a series of JPEG files into a diretory
someplace. Something like this:

(in my case, it's 720 lines per screen, with 720 lines of black at the top)

# outdir is where the jpegs go
mkdir outdir

lines_per_frame=1

height=`identify "$1" | \
awk '{ A=$3; I=index(A,"x"); print substr(A, I+1); }'`

lines=`expr ${height} - 720`

curline=0

while test ${curline} -lt ${lines} ; do

frameno=`echo $curline | \
awk '{ AA="00000000"$1; LL=length(AA); print substr(AA,LL-5,6); }'`

outfile=outdir/frame${frameno}.jpg

# this snags a slowly lowering window that fits the screen size
# and writes it to 'outfile' for ya
convert -crop 1280x720+0+${curline} ${input_file} ${outfile}

curline=`expr ${curline} + ${lines_per_frame}`

done



OK now the output directory has a bunch of jpegs in it. You can create
a movie from this similar to the following (have a sound track ready)

mencoder "mf://outdir/*jpg" -idx -ovc x264 -mf type=jpeg:fps=25 \
-o out.avi -audiofile credit_music.mp3 -oac lavc

This should get you a basic AVI, but I sometimes have trouble working
with mencoder on the same file, like when i want to combine a bunch of
stuff. To fix it, just use ffmpeg, which generally cleans it anyway.

ffmpeg -i out.avi -c:a mp2 out.mp4

Note I force the audio track to use 'mp2' - other things create
artifacts and I _HATE_ that. ALso if you prefer mkv you can do that,
too, with ffmpeg.

So you can put together your movie from multiple AVI files [as long as
they're the same format - use mencoder or ffmpeg to convert formats as
needed, paying close attention to FRAME RATES - they need to match] and
a final step with mencoder might be like this:

mencoder -idx -o movie.avi -ovc x264 -oac lavc \
file1.mp4 file2.mp4 file3.mp4 file4.mp4 credits.mp4

and

ffmpeg -i movie.avi -c:a mp2 movie.mp4

(you can add titles etc. if it needs them and do mkv also, just see
ffmpeg docs for all that)


So there ya go - one big hack, using open source software.
Libre Office
gimp
Image Magick
ffmpeg

and other things you'd probably find useful
Audacity
fluidsynth
mplayer (test playback, comes with mencoder)


anyway, have fun!

--
(aka 'Bombastic Bob' in case you wondered)

'Feeling with my fingers, and thinking with my brain' - me

'your story is so touching, but it sounds just like a lie'
"Straighten up and fly right"

Eli the Bearded

unread,
Sep 22, 2020, 3:32:02 PM9/22/20
to
In alt.hackers, Big Bad Bob <BigBadBob-at...@testing.local> wrote:
> this is my ObHack too...
>
> Ever want to make scrolling credits for a movie?

Yes, but it was _so_ long ago. Maybe 1989 or 1990. I wrote a program in
BASIC on a computer with a RCA (yellow plug) video out to scroll the text
and recorded it on a VCR then gave it to a friend who knew how to add an
audio layer to it. This was for a school project on movie music, so the
idea was for a movie style presentation.

But your method of big image, sliced into frames and made into a movie
is probably close to how I'd do it these days. A couple of years ago I
got into making GIFs for Imgur and would create them frame by frame and
assemble them. Then Imgur started supporting video upload and I just had
to change the tooling on the frame-to-output part of the assembly.

Super simple hack paper recycling:

Make yourself a pad of paper for notes and lists from any available
paper by slapping a binder clip on it. Accidentally print something
wrong and need to reprint it? The old paper, if it has sufficent blank
space, makes a great source of pad material. Typical letter size paper
might work best as quartersize pad. Rough slice it with a box cutter,
collate the pile, put a binder clip on it, done.

I use a pad like that at my desk to:

* Take notes while screen sharing and don't want to type in front
of the group (discussion of a page full of notes in a wiki, but
edit vs view views can be ugly); pull out and dispose when done
* Keep track of open tickets I'm working on, in the form of ticket
number to subject, so I can quickly find it for code commit messages
without consulting a browser
* Making shopping lists; pull out and take to store
* Take notes during calls with $SICK_RELATIVE, then pull
the sheets out for a $SICK_RELATIVE collection
* Making other notes to pull out and put in other pads

The two pads I've been using recently are from one from an 8.5x11 paper,
cut in half and top part discarded because of printing, bottom part
halved again and clipped (with a scrap wood backer board clipboard
style); and the other from cut-offs making from US legal (8.5x14) into
US letter (8.5x11). The paper is a non-white paper that was super cheap
because of a misorder. Like 10,000 sheets for 1000 sheet price.

(My wife has a use for it in legal size, but has sometimes also used it
in letter, hence the cut-offs. In both uses it gets used as a cover for
saddle-stitched 8.5x5.5 booklets, most of which have a fold over flap to
seal them, but a few need to not have the flap.)

Elijah
------
booklets with inclusions need to be sealed
Reply all
Reply to author
Forward
0 new messages