Credit Roll

Back in February, I agreed to help Enric Farrés Duran and Ricardo Duque with the technical challenge of making a video that would show thousands of lines of scrolling text. The text listed the entire archive of MACBA, a museum for contemporary art and culture based in Barcelona. The challenge was to turn this into scrolling credits like you get at the end of a film or TV programme.

The video is now part of an exhibition called Coses que Passen (Things that Happen) that celebrates the 25th anniversary of MACBA’s archive and research centre. The project led by Enric Farrés Duran explores and questions the museum’s archive, based on a research process that recognises that “an archive is not only made up of the documents it contains, but also everything that allows them to be available”. In other words, an archive is not only the objects it contains but also the physical environment in which they are kept and the intangible information systems that organise and document them. In this case, MACBA’s archive comprises over 6,000 works, which amounted to around 45,000 words or 12,000 lines of text.

To make the video I used the free command-line program FFmpeg. I’ve used it previously for making animations from still image files, for adding audio to those videos, and for converting to different file types and encoding formats. FFmpeg code specifies the input and output files, plus any extra options. At its simplest, the code looks like this:

ffmpeg -i input.mp4 output.avi

It’s possible to create a video of scrolling text using FFmpeg’s drawtext filter which is part of the libfreetype library. Drawtext allows you to input text from a text file. So the first task was to convert the Excel spreadsheet into a text file and to format it to display correctly. The drawtext function has limitations on styling options that we had to work around. For example, it doesn’t wrap text, which meant that we needed to work out a suitable line length to split the text file into, and to split the lines without splitting words. The text needed to be centred horizontally, but FFmpeg would only centre-align the whole text instead of aligning each line individually, which meant that we had to add the correct number of leading spaces to each line that was less than the maximum width. Using a font with letters of different widths made some lines off-centre, which meant we had to use a monospace font. So it took a lot of trial and error to get the settings right – including line length, line spacing, horizontal position, scrolling speed, font size, image dimensions and frame rate – until the output video was as the artists wanted it. Here’s the final code (file paths replaced with generic names):

ffmpeg -f lavfi -i color=black:s=1920x1080:rate=60,format=rgba -ss 00:00:00 -t 01:40:00 -vf "drawtext=fontfile='Basis Grotesque Mono Pro Medium.otf':fontsize=36:fontcolor=0xF8F6E9:x=(w-text_w)/2:y=h-100*t:line_spacing=4:textfile='text.txt':expansion=none" -c:v libx264 -y -preset ultrafast output.mp4

It took 14 hours to render the video, which was 1.5 hours long and just under 1GB. Below is a screenshot from the video, and photos of the exhibition. You can see the exhibition via MACBA’s virtual space, including a video of a guided tour by the artist.

This entry was posted in Art, Research and tagged , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.