20 December, 2012

Applying Watermark With FFMpeg

Assuming you have a watermark png file 'watermarklogo.png' and a input file 'screenCap.mpg', you can apply a watermark in the upper right hand corner by running the following command:

$ ffmpeg -i screenCap.mpg -vf "movie=watermarklogo.png [watermark]; [in] [watermark] overlay=main_w-overlay_w-10:10 [out]" /var/tmp/foo.mpg

13 December, 2012

Getting UTC Time From Web

At work we suspect our embedded devices are susceptible to clock drift. To accurately assess, a 'true' clock is required. An alternative would be to use NTP on a local laptop, using the laptop time as 'true' time. The alternative is to access an atomic clock via web interface periodically and use it's value as the reference time. Done by repeating the URL navigation using curl, repeated by using the watch command.

$ watch -n 1 'curl http://tycho.usno.navy.mil/cgi-bin/timer.pl'
Grabbing the time and embedded time via Ethereal should achieve what we want. Cheers.