Ben Chuanlong Du's Blog

It is never too late to learn.

Tips on FFmpeg

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

It is suggested that you use OpenCV for Python and moviepy (instead of FFmpeg) to manipulate multimedia.

  1. extrac audio from video

  2. convert between different formats of audios

Record Screen

The command …

Take Screenshots in Python

Comments

  1. PIL.ImageGrab works on macOS and Windows only.
  1. PIL.ImageGrab is relatively slow. python-mss and PyQt5 are better alternatives if performance of screenshot is critical. Notice that saving an (e.g., PNG) image can take significant time (might take up to 0.5 seconds) too, this is often due to image compression is slow. Lower the compression level can significant reduce the time needed to save an image. Please refer to Saving a PNG file is slow

Get Coordinates of Points on a Screen or Image

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Get the Coordinate of a Pixle/Point on an Image

Most image editing software (e.g., GIMP) can tell you the coordinate of a point on an image.

Get the Coordinate …