Implement progress reporting for commandline version

Specifying -p will output information on stderr, in the form

progress current_position_in_ms total_duration_in_ms
shot current_position_in_ms total_duration_in_ms