This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import glob | |
| import subprocess | |
| import os | |
| import shutil | |
| glob_pattern = "./**/*.mp4" | |
| ffmpeg_command_pattern = 'ffmpeg -y -hide_banner -loglevel panic -i "{}" -threads 8 -stats -framerate 60000/1001 -c:v libx264 -crf 23 -preset slow "{}{}" -r 60000/1001 -async 1 -vsync 1' | |
| compressed_file_suffix = ".mp4" | |
| files = glob.glob(glob_pattern, recursive=True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Script: update-moodle.sh | |
| # From: https://gist.github.com/ | |
| # This script will update Moodle within the same major version (example: 3.6.1 to 3.6.3). | |
| # The nice thing about this simple approach is that it won't affect your plugins. | |
| # Assumes you used "git clone" to create and install your instance of Moodle. If you did not, don't use this script! | |
| # | |
| # Copyright TNG Consulting Inc. | |
| # Author: Michael Milette - <www.tngconsulting.ca> | |
| # Release: 1.0 Alpha - 2019-04-16 | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| echo "This script updates your moodle installation." | |
| echo "You will need a few pieces of information to complete this process." | |
| echo "" | |
| echo "Warning: This will disable Web-Access to the moodle installation!" | |
| echo "Make sure nobody is logged in at the moment or activate maintenance mode manually so no data is lost." | |
| echo "" | |
| echo "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Listen for Xdebug", | |
| "type": "php", | |
| "request": "launch", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| FILETYPE=mp4 | |
| if [ "$#" -ne 1 ]; then | |
| echo "Usage: <path-to-compress.mp4> target-top-level-directory" | |
| exit | |
| fi | |
| # for all the mp4 except the already scaled ones |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt install software-properties-common && sudo add-apt-repository ppa:ondrej/php -y | |
| sudo apt update | |
| sudo apt upgrade -y | |
| sudo apt install php8.1 -y | |
| sudo apt install php8.1-bcmath -y | |
| sudo apt install php8.1-bz2 -y | |
| sudo apt install php8.1-cli -y | |
| sudo apt install php8.1-common -y | |
| sudo apt install php8.1-curl -y |
I've accumulated too many quadcopter (drone) footage files (.mp4, .MOV, etc).
I researched how to ffmpeg re-encode with "practical" losslessness (i.e. not lessless, but human eye acceptable).
These are my resultant scripts. The filenames say "reduce" but should actually be "re-encode".
In the gase of GoPro, these scripts should reatin the Gyro data.
I recommend footage filenames and folder-names to not include spaces. I rename all existing files in a folder with the command rename "s/[[:space:]]/_/g" * to make certain i have no spaces in filenames.
You could rename all files in subfolders as well: e.g. find ~/SYNC/YT-Archive/ -type f -name "*[[:space:]]*" -exec rename "s/[[:space:]]/_/g" "{}" \;.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Salvar num arquivo ~/encode.sh, conceder direito de execução e | |
| # executar desta forma (adaptar nomes de diretórios e arquivos para seu caso): | |
| # $ ~/encode.sh ~/Video/bigFile.mp4 ~/Video/smallFile.mp4 | |
| ffmpeg -i "$1" -vcodec h264 -acodec aac "$2" |
| title | subtitle | author | date | source |
|---|---|---|---|---|
Docker Compose Cheatsheet |
Quick reference for Docker Compose commands and config files |
Jon LaBelle |
April 7, 2019 |