Skip to content

Video capture filename in --exec does not use the same time as the file #76

Open
@dyeo

Description

@dyeo

Occurred on Linux 5.15.7-xanmod1-tt-1 using xorg and i3wm

Steps to reproduce

  1. Start a video capture using the following command:
    escrotum -r '~/img/screenshots/%Y-%m-%d_%H-%M-%S.webm' -e 'echo $f'
  2. Wait 5 seconds and then end the video capture using Ctrl-Alt-s
  3. Notice that the echo'd video filename will have the seconds field be 5 seconds later than that of the actual saved file.

Possible cause

It seems as though the filename's substitutions are getting expanded once at the beginning of capture, and then expanded a second time when the command executes, which means that the strftime(2) evaluation will be different each time. By capturing the strftime once at the beginning of program execution we can ensure that this discrepancy will not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions