![]() Or more accurately, it needs more help than with most other output formats. This is one thing FFmpeg is less good at. That’s the video output finished, but it would be nice to create an animated gif for ease of display on the web. You can make the MP4 and overlay in one command:įfmpeg -framerate 10 -i %03d.png -i legend.png -filter_complex "pad=ceil(iw/2)*2:ceil(ih/2)*2 overlay=50:90,format=yuv420p" -c:v libx264 -movflags +faststart out.mp4Įxcellent. $ ffmpeg -i blooms_2019.mp4 -i legend.png -filter_complex "overlay=50:90" blooms_2019_legend.mp4 Feedback from FFmpegīefore we continue, I got a response after posting this article from the Twitter account suggesting the following combined code: There’s not much to this, just the overlay options which decides the legend positioning: ![]() Now we’ve created an MP4, we can add out legend by adapting this guide on adding a watermark. You can read those articles for more info on the options, but this should be roughly what you need to convert output from TimeManager: The following code is modified from this guide and this Stack Overflow answer. Instead, you can create a legend image (ideally a PNG with a transparent background) then add it to your output with FFmpeg. One issue with using TimeManger is you can’t easily add a legend as the output is created from the QGIS Map View. From here on in, I’ll presume you’ve added it to your Windows path. ![]() If you’ve not used FFmpeg before, it’s a hugely-flexible command line video converter. This will export a series of numbered PNGs, which we can stitch together using FFmpeg – this gives us maximum flexibility for our output. In TimeManager, hit the ‘export video’ button and select ‘frames only’. ![]() Oh, and let’s add some country polygons on there too! FFmpeg – MP4, Legends & GIF Output With his suggested addition of graticules, we can add a bit more information to the background map too. The settings I used in TimeManager (including the time display options) EPSG 102038 & GraticulesĪfter seeing this great blog post from Alasdair Rae, I thought this ‘World_From_Space’ projection would work nicely for this project.
0 Comments
Leave a Reply. |