Group: Guix/Video Documentation
GNU Guix Video Documentation
During Outreachy phase 2018/2019 Laura Lazzati is creating video documentations for Guix. This page collects ideas about that project
First Idea
A first proposal came from Ricardo:
https://lists.gnu.org/archive/html/guix-devel/2018-11/msg00386.html
I would like to recommend this workflow:
- create an environment:
guix environment --ad-hoc inkscape gettext itstool ffmpeg
- create slides in Inkscape (look at existing slides from past talks for style inspiration)
- extract texts as gettext template:
itstool -o slide.pot slide.svg
- initialize translation (e.g. for German):
msginit --locale=de --input=slide.pot
- translate texts in “de.po”
- compile “de.po” to “de.mo” binary format:
msgfmt de.po -o de.mo
- use itstool to create a translated SVG:
itstool -l de -m de.mo drawing.svg -o de/
This can be automated with a Makefile.
Translations themselves don’t have to be created as part of this project, but the pot files should be uploaded to the translationproject.org, which is what we already do for other Guix translations.
Once we’ve got the SVGs we can render them as PNGs in the desired output format with Inkscape (here as a Makefile rule):
%.png: %.svg inkscape -z --export-dpi=300 --export-png=$@ $<
Then write a simple concat demuxer file for ffmpeg to specify which slide to show for how long, e.g. this ’durations.txt’:
--8<---------------cut here---------------start------------->8--- file 'slide1.png' duration 5 file 'slide2.png' duration 1 file 'slide3.png' duration 3 file 'end.png' duration 2 file 'end.png' --8<---------------cut here---------------end--------------->8---
(According to the ffmpeg docs the last image has to be specified twice, the second time without a duration.)
Then compile this as a video:
ffmpeg -f concat -i durations.txt -vsync vfr -pix_fmt yuv420p output.mp4
(The above was taken from here: https://trac.ffmpeg.org/wiki/Slideshow)
With a slightly longer invocation we can merge an existing audio file into the output file (no need for a second call to ffmpeg).
I haven’t given much thought to subtitles yet. We could use the very simple “srt” format, which is just plain text, but maybe “usf” is better. It has support for styling and Unicode, and its format is XML, which means that we can use the same tools as above to handle translations.