Skip to content

Instantly share code, notes, and snippets.

View Nottt's full-sized avatar
🎯
Focusing

ad90xa0-aa Nottt

🎯
Focusing
View GitHub Profile
@Brainiarc7
Brainiarc7 / ffmpeg-gnu-parallel-snippets.md
Last active April 17, 2024 10:33
Some snippets you can quickly adapt for use with FFmpeg and GNU Parallel for use for standard tasks.

Useful Examples of ffmpeg and GNU parallel on the command-line:

Transcoding FLAC music to Opus:

ffmpeg is a highly useful application for converting music and videos. However, audio transcoding is limited to a a single core. If you have a large FLAC archive and you wanted to compress it into the efficient Opus codec, it would take forever with the fastest processor to complete, unless you were to take advantage of all cores in your CPU.

parallel 'ffmpeg -v 0 -i "{}" -c:a libopus -b:a 128k "{.}.opus"' ::: $(find -type f -name '*.flac')

Transcoding Videos to VP9:

@xtman
xtman / Google_App_Script_Upload_Multi_Files_To_GoogleDrive_Form.html
Created December 6, 2016 04:36
Google App Script: Upload Multiple Files to Google Drive (Form.html)
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<form id="uploaderForm">
<label for="uploaderForm">Upload multiple Files</label>
<div>
<input type="text" name="applicantName" id="applicantName"
@sararob
sararob / speech-api-request.sh
Last active August 12, 2019 21:48
Bash script for recording audio and calling the Cloud Speech API
#!/bin/bash
# SETUP
# 1) This requires having SoX (http://sox.sourceforge.net/) installed. On a Mac, you can do this with `brew install sox --with-flac`
# 2) You'll also need an API key for your Google Cloud Platform project: https://support.google.com/cloud/answer/6158862
# Create a request file with our JSON request in the current directory
FILENAME="request-"`date +"%s".json`
cat <<EOF > $FILENAME
{
@davetromp
davetromp / UpOrDown.sh
Created November 28, 2012 22:29
Bash script that checks if a site is up or down and emails notifications
#!/bin/bash
################################################################################
# This script will check to see if a website is up/down by pinging the url
# If there is no response an email wil be send via an external smtp mail server
# If the site status is down an email will be send when the site is up again
# set your check interval here :-) #############################################
interval=3600 # hour