Convert a Video to MP4 Using python-opencv
¶
The code below converts a MOV vidoe file to a MP4 vidoe file using OpenCV in Python.
Extract Images from Video Using OpenCV in Python
Tips and Traps¶
- Most videoes have a FPS of 24. Some videos have higher FPS (e.g., 30 or 60) so that they can capture motions better. A record video on a computer has a FPS of the refresh rate of the monitor, which is usually 60. You can get the FPS of a video using OpenCV in Python.
Get User's Information in Python
Encoding and Decoding Base64 String in Python
Resizing Hard Disk of Guest Machine in Virtualbox
Suppose you have virtual hard disk in VirtualBox called xp.vdi
,
you can resize it (megabytes) using the following command.
VBoxManage modifyhd xp.vdi --resize 40960
The command currently doesn't support vmdk virtual disk.
So if you have a virtual disk called xp.vmdk
,
you have to first convert it …
Packaging Python Dependencies for PySpark Using python-build-standalone
You can build a portable Python environment following steps below.
-
Install python-build-standalone.
-
Install Python packages using pip of the installed python-build-standalone distribution.
-
Pack the whole python-build-standalone directory into a compressed file, e.g.,
env.tar.gz
.
The GitHub repo dclong/python-portable has good examples of building portable Python environments leveraging …