-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AnalystAnimations
Varying time:
#!/bin/bash
# BOUNDING BOXES
# brooklyn/queens
#bbox="-74.02587890625,40.650038657421916,-73.751220703125,40.769491796481404"
#res=20
# nyc regional
bbox="-74.26277160644531,40.47254674190491,-73.16413879394531,40.974714106324654"
#res=80
# ORIGIN LOCATIONS
#openplans
origin="40.719518%2C-73.9997"
counter=0
for h in {0..4}; do
for m in {0..59}; do
for s in {0..59..20}; do
TIME=`printf "%02d:%02d:%02d" ${h} ${m} ${s}`
echo $TIME
DATE="2012-11-10"
URL="http://localhost:8080/opentripplanner-api-webapp/ws/wms?layers=traveltime&styles=color30&batch=true&mode=TRANSIT%2CWALK&maxWalkDistance=4000&date=${DATE}&time=${TIME}&fromPlace=${origin}&toPlace=${origin}&format=image/geotiff&srs=EPSG:3857&width=1280&height=720&bbox=${bbox}×tamp=true"
wget $URL -O "$counter.tif"
counter=$((counter+1))
done; done; done
Varying position:
In the Ubuntu package, h.264 encoding support is not built in to avconv. You can install the x264 package which has command line utilities to handle encoding images to video with h.264.
The YUV colorspace called i420 has separate luminance for each pixel, but only one blue and red value for each block of 4 pixels. This is the native representation for h264 encoding. Therefore the input images' width and height must be multiples of 2. x264 will not do autocropping on principle. Fortunately x264 has crop / resize filters built in.
Example command line:
x264 "./%d.tif" --crf 25 --vf crop:129,100,120,103 -o test.mp4
crop values are left,top,right,bottom
(these were chosen to get 1280x720 720p video)
The -crf switch controls the quality. Smaller numbers mean larger file sizes.
You can specify the output color space with --output-csp rgb but this makes the file much bigger and VLC can't seem to play it.
unless you are intentionally working with legacy versions of OpenTripPlanner. Please consult the current documentation at readthedocs