Extract audio from a YouTube video file
ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3
Cut 3s length
ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4
class AsyncLock { | |
private _lock = new Int32Array(new SharedArrayBuffer(4)) // SharedArrayBuffer for multi-threading, 4 bytes for 32-bit integer | |
static INDEX = 0 | |
static UNLOCKED = 0 | |
static LOCKED = 1 | |
lock() { | |
while (true) { | |
console.log("lock") |
Extract audio from a YouTube video file
ffmpeg -i INPUT.mp4 -ab 256k OUTPUT.mp3
Cut 3s length
ffmpeg -y -ss 00:00:03 -i INPUT.mp4 -codec copy OUTPUT.mp4