Posted in 2022
Add Timestamp to Videos
- 2022-07-01
I am involved with some experimental work, and a lot of the video footage is captured with a GoPro. They are durable and work well in the field. Unfortunately, they don’t support timestamp overlay with the date and time on the video. I used FFmpeg and a shell script to automate the process. The following script will take the video, extract the creation_time
tag from the video and use that to generate the timestamp overlay.
Python - Loops and Exception Block Else Statements
- 2022-05-22
The try/except block has an option else clause. That else
clause is executed if an exception is not raised in the block. Loops, also have an else clause. I never thought that I would actually need to use those and thought they were superfluous. Today, I used both. In the following code, I wanted to create a folder, but wanted to make sure that I didn’t create a duplicate folder (i.e. I didn’t want to write files into the same folder).
Windows Terminal and Cmder
- 2022-04-22
Using windows to develop can be a bit of a challenge. It doesn’t have any good tools for cross-platform python tools. On Linux, I use make and a makefile
to orchestrate building and configuring virtual environments. Clone the repo and make venv
and I have a functional and repeatable environment. A few months ago I discovered Cmder. I learned that it has make
and most of the tools I use out of the box for windows. The only issue, it is a bit of a pain. Recently I decided to try installing windows terminal and host Cmder in that. That works really well and seems to be pretty stable and is relatively easy to install. It would be nicer if it was an automated install, but these instructions are not too bad.
Uncertainty Propagation in Calculations
- 2022-02-06
In science and engineering, uncertainties and errors are a fact of life. This post is a study of how uncertainties can be used in calculations. More importantly, this post explores how uncertainty is propagated to subsequent calcualtions. That is, given a series of calculations that build on top of one another, what happens to the uncertainty.