
Nový program GPX animátor od Martina Ždilu umožňuje vizualizovať zaznamenanú trasu v gpx formáte a následne z nej urobiť video s podkladovou mapou. Aby sme mohli program používať a následne vytvoriť video z generovaných obrázkov, budeme potrebovať programy Java, FFmpeg a samotný Martinov jar program.
1) stiahneme si FFmpeg a rozbalíme ho do adresára, napr. C:\ffmpeg
2) do systému pridáme cestu k adresáru s binárkou, aby vedel spustiť ffmpeg z príkazového riadku
Klikneme na Start -> Control Panel -> System and Maintenance -> System -> Advanced System Settings -> Enviromental Variables -> a klikneme na PATH aby sme editovali systémové premenné
Do poľa PATH pridáme nasledovný riadok (ak sa v riadku už niečo nachádza, nezabudnime pridať pred text bodkočiarku):
;C:\ffmpeg\bin
Reštartujeme systém, aby sa uplatnili nastavenia.
3) samotný GPX animátor spustíme z príkazového riadku príkazom
java -jar GpxAnimator.jar --input track.gpx --tms-url-template http://c.freemap.sk/T/{zoom}/{x}/{y}.png --zoom 13
Prípadne môžeme nastaviť ostatné položky.
Voľby nastavenia môžeme vyvolať príkazom
java -jar GpxAnimator.jar --help
–input | input GPX filename; can be provided multiple times for multiple tracks |
–output | output filename template for saved frames; default frame%08d.png |
–label | text displayed next to marker; can be specified multiple times if multiple tracks are provided |
–color | track color in #RRGGBB representation; can be specified multiple times if multiple tracks are provided |
–line-width | track line width in pixels; can be specified multiple times if multiple tracks are provided; default 2.0 |
–time-offset | time offset for track in seconds; can be specified multiple times if multiple tracks are provided |
–forced-point-time-interval | interval between adjanced GPS points in milliseconds – useful for GPX files with missing point time information; if specified, absolute time must be set with –time-offset option; can be specified multiple times if multiple tracks are provided; 0 for no forcing; default 0 |
–tail-duration | latest time of highlighted tail in seconds; default 3600 |
–margin | margin in pixels; default 20 |
–speedup | speed multiplication of the real time; default 1000.0; complementary to –total-time option |
–total-time | total length of video in seconds; complementary to –speedup option |
–fps | frames per second; default 30.0 |
–width | video width in pixels; if not specified but –zoom option is specified, then computed from GPX bounding box and margin, otherwise 800 |
–height | video height in pixels; if unspecified, it is derived from width, GPX bounding box and margin |
–zoom | map zoom typically from 1 to 18; if not specified and –tms-url-template option is used then it is computed from –width option |
–tms-url-template | slippymap (TMS) URL template for background map where {x}, {y} and {zoom} placeholders will be replaced; for example use http://tile.openstreetmap.org/{zoom}/{x}/{y}.png for OpenStreetMap |
–background-map-visibility | visibility of the background map in %, default 50.0 |
–font-size | datetime text font size; default 12; set to 0 for no date text |
–keep-idle | don’t skip parts where no movement is present |
–flashback-color | color of the idle-skipping flashback effect in #AARRGGBB representation; default is opaque white – #ffffffff |
–flashback-duration | idle-skipping flashback effect duration in milliseconds; set to 0.0 for no flashback; default 250.0 |
–debug | toggle debugging |
4) program začne generovať obrázky
5) vytvoríme video z obrázkov príkazom
ffmpeg -i frame%08d.png -vcodec mpeg4 -b 3000k -r 30.0 video.avi
[…] Vďaka Martinovi Ždilovi môžete používať GPX animátor na vizualizáciu vašich výletov, či mapping party. Podrobnosti nájdete v samostatnom článku. […]