Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index

Hi *,

Got response and he is fine with people using the track as background
for their own videos \o/ - so here's the fixed version:

Did record it in 720p this time, to have YT create a HD version of it.
I added a fast-forward marker to the sections that I accelerate more
than I accelerate the typing itself and added a fade-out. Also fixed
the problem with the audio. Playtime of the video is now about 320

Boring technical details for those interested below. If you're not
interested in video recording/editing, feel free to skip the rest :-)

The following is how I did do it, there are many ways that work...

0) edit the recording from the bug to add a clear screen command
* open with vim in binary-mode (vim -b ttyrecord.tty) or in a hexeditor
* replace the " in line 1 at position 9 (=decimal value 34) to )
(=decimal value 41, for the 7 additional characters/control codes that
are added later - first 4 bytes ("characters") is seconds since epoch,
next 4 bytes is microseconds, next 4 is length of payload (i.e. the
number of characters that are input), all in LSB order.)
* add <esc>[2J<esc>[H starting at position 13 (insert <esc> with
<ctrl>+v,<esc> or by hex-value) - <esc>[2J is "clear whole screen",
<esc>[H is "go to home position" (first row, first column)

1) record a lossless video - I prefer to call x264 manually than to
use ffmpeg's builtin switches
ffmpeg -loglevel warning -f x11grab -r 15 -s 1202x698 -i :0.0+0,102
-vf pad=1280:720:39:11 -f yuv4mpegpipe -pix_fmt yuv420p - | x264
--demuxer y4m --preset veryfast --qp 0 -o buildsession.mkv -

I recorded a window of 1202x698 pixel, starting at the very left, 102
down of my screen (I placed my terminal so that window borders are out
of screen to the left & bottom), and then pad it to 1280x720,
centering the captured are. Record with a framerate of 15 frames per
second. ffmpeg hands it over to x264 in yuv4mpeg format in the yuv420p
x264 encodes it with lossless setting, and the veryfast preset (don't
bother to create a small file, just work quickly).

2) load file in avidemux and determine frame numbers of parts to
accelerate. Then, with those numbers…

3) create timecode file & mux a sped-up version. The timecode file I
used looked like this (first frame of ttyplayback in recording was
frame 79)
# timecode format v1
assume 15
# installing git
#installing build-deps, left-out part is phonon-dummy screen
#cloning the repo - that was slooooow in realtime :-)
#listing and installing gnome-vfs package
# building & quitting (with a little excess frames)

format v1 is "startframe,endframe,fps-for-that-section" - assume 15 is
for all frames not explicitly listed, use 15 frames per second
for more details

4) In aegisub use the same framenumbers to define part where the
fast-forward marker should be shown. I used a Karaoke-template to make
it "blink"- but that's more for the sake of learning how to use it and
"because I can", a steady one would have served the purpose as well
:-). Fade at the end is also done as subtitle.
Explaining ass commands would be too specific, even is this detailed
post, but if people are curious, I could do so in a separate post.

5) as framerate of 900fps causes performance problems on playback :-)
- flatten down the whole thing to 15fps again. As we're using lossless
format, no loss in picture quality, just throwing away some frames.
Also trim to the actual length. Seek value was known from loading in
avidemux the first time, the number of resulting frames was not. As I
was to lazy to calculate, I just did encode it once without limit,
opened result in in avidemux, then did run with the limit & the
placebo preset to have it create an as-small-as-possible file (placebo
is much slower and almost no gain compared to "slower" preset, but as
the clip is short, and my upload is low...)
ffmpeg -loglevel warning -i bigterminal_timecodes.mkv -vf
ass=bigterminal_timecodes.ass -f yuv4mpegpipe -r 15 - | x264 --demuxer
y4m --preset placebo --qp 0 --seek 79 --frames 6213 -o big_speedup.mkv

6) last step - mux video with audio and match their length. did
stretch-factor of video is 0.765 (just divide

Done :-)


Unsubscribe instructions: E-mail to
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.