Skip to content
Andrew Caudwell edited this page Aug 10, 2015 · 2 revisions

How to record videos of Logstalgia

Video Capture Software

By far the easiest way to record a video of Logstalgia is using a third party video capture program. The only downside of this approach is you will have less control over the final encoding quality of the video and you may need to manually start and stop recording.

I recommend these programs:

Raw Video Output and Encoding

You can capture raw video from Logstalgia using the -o (aka --output-ppm-stream) option. This creates an uncompressed sequence of screenshots in PPM format which can then be processed by a video encoder (such as ffmpeg) to produce a video.

You can also adjust the output frame rate with -r (aka --output-framerate). Note you will need to adjust the frame rate used by the encoder (eg ffmpeg -r) to match, unless you are going for a speed-up timelapse or slow motion effect.

Make sure you keep the window of Logstalgia entirely visible while recording. If you minimize or partially obscure the window, your video card may decide not draw the output consistently and you will get artifacts in your recording. You may like to use the -f option to run in full-screen mode to stop this happening.

You may want to record your video in widescreen as that is the trend for online video now days. You can record in 720p by adding -1280x720 to the command line.

Also check out the Controls section of the wiki for steps to customize the look of Logstalgia for your videos.

Linux / Mac

FFmpeg using x264 codec

The below command lines will create a video at 60fps using the x264 codec in an mp4 container.

This assumes you have recent version of ffmpeg with libx264 support. Some distributions like Ubuntu do not enable libx264 support by default in ffmpeg (See this thread for various ways to enable libx264 support on Ubuntu). Consult guides for your distribution if this is the case.

In one command (raw video piped directly into ffmpeg):

logstalgia -1280x720 -o - access.log | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 logstalgia.mp4

As two commands:

logstalgia -1280x720 -o logstalgia.ppm access.log
ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i logstalgia.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 logstalgia.mp4

This one has the advantage of keeping the raw video file (logstalgia.ppm) so you can go back and tweak the encoding parameters if you don't like the output quality or need a different video format without recording the video again. The disadvantage is that this raw uncompressed video and you can expect it to use up 100gs of gigs, so keep that in mind!

You can interchange the extension 'mp4' with 'mkv' or 'avi' to get ffmpeg to use a different container format for the video. 'avi' is typically discouraged for long videos as there is a 2GB file limit associated with that format.

Note: ffmpeg seems to be a constantly moving target, so you may find you need slightly different arguments with your version. There is a good guide to using x264 with ffmpeg here.

FFmpeg using WebM codec

A good alternative codec to x264 is WebM. Below is a very basic command line example of using ffmpeg to produce a Logstalgia WebM video:

logstalgia -1280x720 -o - access.log | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libvpx -b 10000K logstalgia.webm

Windows

Here is an example command-line using the built in PPM frame capture support and ffmpeg to generate a video:

logstalgia -1280x720 -o logstalgia.ppm access.log
C:\\ffmpeg\\bin\\ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i logstalgia.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 logstalgia.x264.avi

You can interchange the extension 'avi' with 'mp4' or 'mkv' to get ffmpeg to use a different container format for the video. 'avi' is typically discouraged for long videos as there is a 2GB file limit associated with that format.

You can get an ffmpeg build for Windows from here.

Note: ffmpeg seems to be a constantly moving target, so you may find you need slightly different arguments with your version. There is a good guide to using x264 with ffmpeg here.