Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Misc. Notes

Michael Hirsch, Ph.D edited this page Sep 20, 2019 · 4 revisions

Editing video

ffmpeg is a universal tool for editing and viewing video

  • lossless video time cut: ffmpeg -i raw.avi -ss 00:10 -c:v copy rawcut.avi

  • rotate video (lossy unless lossless codecs used): ffmpeg -i raw.avi -vf "transpose=2" -c:v ffv1 rawrot.avi

  • create an animated .git from several .jpg or .png images named sequentially

    ffmpeg -framerate 5 -pattern_type glob -i '*.png' out.gif

sudo

In general with any operating system, one should not use Administrator or sudo unless they really need to. The most typical case is sudo apt install.

Headless X11

If you find yourself with an application that needs to have X11 running, even though you're not actually using a display with a device, virtual framebuffers can be a workaround:

  1. install XVFB

    apt install xvfb
  2. create a file ~/xvfb.sh:

    #!/bin/bash
    Xvfb :99 -screen 0 1024x768x16 &
    export DISPLAY=:99

Generating plots is expensive in CPU usage, so it's often something done "offline", after the data is captured to disk.

Clone this wiki locally