A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| #include <stdio.h> | |
| #include <stdint.h> | |
| // Philips Sonicare NFC Head Password calculation by @atc1441 Video manual: https://www.youtube.com/watch?v=EPytrn8i8sc | |
| uint16_t CRC16(uint16_t crc, uint8_t *buffer, int len) // Default CRC16 Algo | |
| { | |
| while(len--) | |
| { | |
| crc ^= *buffer++ << 8; | |
| int bits = 0; | |
| do |
| /* | |
| * m1cat: a proof of concept for the M1RACLES vulnerability in the Apple M1. | |
| * | |
| * This program implements a covert channel that can be used to transmit data | |
| * between two processes when run on the Apple Silicon "M1" CPUs. | |
| * | |
| * The channel is slightly lossy due to (presumably) the scheduler sometimes | |
| * scheduling us on the wrong CPU cluster, so this PoC sends every byte twice | |
| * together with some metadata/framing bits, which is usually good enough. | |
| * A better approach would be to use proper FEC or something like that. |
| /** | |
| * Generates a check digit from a partial EAN13. | |
| * | |
| * https://www.gs1.org/services/how-calculate-check-digit-manually | |
| * | |
| * @param {string} barcode - 12 digit EAN13 barcode without the check digit | |
| */ | |
| function checkDigitEAN13(barcode) { | |
| const sum = barcode.split('') | |
| .map((n, i) => n * (i % 2 ? 3 : 1)) // alternate between multiplying with 3 and 1 |
| from moviepy.editor import * | |
| import numpy as np | |
| clip = VideoFileClip("hams.mkv") | |
| import sounddevice as sd | |
| import soundfile as sf | |
| from queue import Queue | |
| from collections import OrderedDict | |
| import pprint | |
| pp = pprint.PrettyPrinter(indent=4) | |
| print('started') |
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| $(document).on('drop', function (e) { | |
| e.stopPropagation(); | |
| e.preventDefault(); | |
| $("body").removeClass("drop"); | |
| var files = e.originalEvent.dataTransfer.files; | |
| //console.log(files[0]); | |
| new BinaryLoader(files[0], function (archive) { | |
| console.log(archive); | |
| if (archive != null) { |
This function returns the nearest aspect ratio of a width and height within a limited range of possible aspect ratios.
In other words, while 649x360 technically has an aspect ratio of 649:360, it’s often useful to know that the nearest normal aspect ratio is actually 9:5 (648x360).
nearestNormalAspectRatio(width, height, [side], [maxWidth], [maxHeight])
| /* | |
| * This work is free. You can redistribute it and/or modify it under the | |
| * terms of the Do What The Fuck You Want To Public License, Version 2, | |
| * as published by Sam Hocevar. See the COPYING file for more details. | |
| */ | |
| /* | |
| * Easing Functions - inspired from http://gizma.com/easing/ | |
| * only considering the t value for the range [0, 1] => [0, 1] | |
| */ | |
| EasingFunctions = { |