unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: "Gábor Boskovits" <boskovits@gmail.com>
Cc: Guix-devel <guix-devel@gnu.org>
Subject: Re: Outreachy project infrastructure
Date: Wed, 21 Nov 2018 16:19:17 +0100	[thread overview]
Message-ID: <87muq231ca.fsf@elephly.net> (raw)
In-Reply-To: <CAE4v=pgFYoWzjzaqmLt5niMbHjcJmwe5pBsEt297Zy1ntHCVBw@mail.gmail.com>


Hi Gábor,

> Now we can start thinking about what tools to use […]
> It would be nice if someone with more exprerience in translating
> documentation, or even videos could also comment on this. Anyone?

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.

What do you think?

Laura, would you like to give this a try and play a little with these
tools to see if this is feasible?  You could take a few of the SVG files
from ./talks/icg-2018 from the guix-maintenance.git repository.  Do you
have a copy of this repository already?

--
Ricardo

  parent reply	other threads:[~2018-11-21 17:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 13:51 Outreachy project infrastructure Gábor Boskovits
2018-11-21 14:37 ` Laura Lazzati
2018-11-21 15:34   ` Julien Lepiller
2018-11-21 15:19 ` Ricardo Wurmus [this message]
2018-11-21 20:18   ` Laura Lazzati
2018-11-21 22:28     ` Ricardo Wurmus
2018-11-22  1:13       ` Laura Lazzati
2018-11-22 12:32       ` Thorsten Wilms
2018-11-22 13:12         ` Ricardo Wurmus
2018-11-22 14:23           ` Thorsten Wilms
2018-11-22 20:11     ` Björn Höfling
2018-11-23  1:54       ` Laura Lazzati
2018-11-23  9:04       ` Ricardo Wurmus
2018-11-23 10:24         ` Gábor Boskovits
2018-11-23 11:01           ` Ricardo Wurmus
2018-11-23 11:38             ` Gábor Boskovits
2018-11-23 12:27               ` Ricardo Wurmus
2018-11-25 23:08         ` Björn Höfling
2018-11-26  0:30           ` Laura Lazzati
2018-11-26 14:07             ` Björn Höfling
2018-11-26 15:40               ` Laura Lazzati
2018-11-29 15:19           ` Laura Lazzati
2018-11-29 15:36             ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87muq231ca.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=boskovits@gmail.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).