05 February 2016 0 Comments
At the end of his pre-FOSDEM talk on free software,
rms auctioned an adorable gnu.
"If you have a penguin at home, you need a gnu for your penguin."
The audience was allowed to film and publish the presentation provided that:
- The file format is free (as in "libre" or "vrij"). No mp4 or friends;
- No geo-tagging.
My usual video upload workflow goes like this:
- Connect the GoPro camera to the MacBook
- Import the video using Movie
- Crop the video clip using the mouse
- Add a title
- Choose "export to youtube"
The restrictions imposed by
rms turned out to be challenging. My GoPro camera most certainly doesn't know anything about a free format. (i)Movie on OSX neither. So I booted my not-entierly-free GNU/Linux distribution (Manjaro) on my old desktop. And the struggle to find a suitable video editing software began :-)
After contemplating the confusing, old-fashioned interface for minutes, I concluded it would take me ages to figure out how this software works.
Probably inappropriate for my simple editing needs.
Looks good, needs serious polishing compared to OSX Movie but that's ok. I couldn't get anything decent with the presets, even after tweaking. The best I could be was a low-quality 7Mb output. You can watch it, it's probably more than enough, but it's not what I wanted.
It crashes during encoding if you leave a blank on your video strip. Crashes if you enter something "wrong" in the video codec parameters (even a valid value, as proved by
ffmpeg later). Annoying bit rate setting in bits per second, so you have to enter
2000000 rather than
2M. But that doesn't matter, since it crashed during rendering anyway.
I went to their IRC channel, asking for tips. A committer told me he has no idea what settings to use.
Much more usable than Pitivi, but even "high quality" HD 720p yields a poor result. With a supposed 15Mb bit rate, although 2Mb will prove much better with
Very convenient, simple and intuitive. Sensible presets you can further tweak - and I had to make trials and errors here too. But the webm format was missing :(
At the stage, I turned to the command line. After several trials and errors with
ffmpeg, a suitable output was achieved with the following parameters:
$ ffmpeg -ss 0:12 -i GOPR0684.MP4 -c:v libvpx -qmin 0 -qmax 20 -crf 5 -b:v 2M -c:a libvorbis -threads 8 adorable-gnu.webm
The original file was 598Mb for slightly more than 2 minutes at 1080p (yes, the GoPro doesn't do much compression for obvious processing power reasons), and the converted video was 98Mb.
-ss 0:12skips the first 12 seconds, where I'm settling the camera.
-c:v libvpxto use the vpx codec.
-crf 5is the "quality" level. Lower means better. This parameter alone is not ideal, as it doesn't give the encoder any leeway to adjust the quality depending on the frame (more or less complex to encode).
-qmin 0 -qmax 20adding a "min/max" quantization resulted in an overall superior output. This implies a bit of tweaking.
-b:v 2Mfor variable bit rate, with a target average of 2Mb/s. Again, this is the result of experimenting;
1Mgave insufficient quality.
-c:a libvorbisto use the vorbis audio codec.
-threads 8to use the 2 CPU cores. I've read that
0should use all cores, but it wasn't the case.
Here, I have a decent output, although I don't have my title anymore :)
Upload to you... no wait
There are numerous video hosting sites other than youtube.
I asked for a free (libre) alternative on Twitter, StackOverflow, Reddit, G+, FB. The result did not surprise me: I got no answer.
So I SFTP 'ed it to my website. I don't expect the video to be a hit, otherwise my bandwith quota would quickly be exceeded B-)
I'm certainly not bashing at those free softwares. They're free, the source is available and I'm free to fix them if I'm not happy with the way they work. They fell short, given my expectations, but they may be suitable in other conditions.
In comparison to the Apple walled-garden, this simple operation required a substantial effort. All of this reminded me of the huge, gratis convenience many tools and platforms deliver, but what do I give up in exchange?
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.