Skip to content

Instantly share code, notes, and snippets.

dd if=/dev/nvme0n1 | gzip -1 -c > /home/studio1/shows/backups/studio1ProdRig_image_2017-01-28.gz
ffmpeg -loop 1 -r 2 -i ~/Desktop/2niteFinal_3000_2.jpeg -i ./2nite-5_master_podcast.mp3 -vf scale=-1:380 -c:v libx264 -preset slow -tune stillimage -crf 18 -c:a copy -shortest -pix_fmt yuv420p -threads 0 output.mkv
#!/usr/bin/env perl
use File::Basename;
use Cwd 'abs_path';
use 5.014;
use strict;
use warnings;
use utf8;
my $FS=44100;
my $BITRATE="64k";
#!/usr/bin/env perl
use 5.014;
use strict;
use warnings;
use utf8;
#input in pairs: video1 audio1 video2 audio2 etc...
#my $ext = ".mkv";
my $ext = ".mp4";
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for a in *.flac; do
name=${a%%.flac}
fout="$name.mp3"
echo "$a->$fout"
ffmpeg -i "$a" -qscale:a 0 "$fout"
done
@fredmajor
fredmajor / convertVideoFastSmallPreview_nvidia.pl
Created February 13, 2019 16:43
collecton of scripts for converting video
#!/usr/bin/env perl
use File::Basename;
use Cwd 'abs_path';
use 5.014;
use strict;
use warnings;
use utf8;
my $CQ="35";
my $TARGET_WIDTH="800";
ffmpeg -i ep1_r1.wav -vn -ar 44100 -ac 1 -ab 64k -f mp3 gears_ep1.mp3
ffmpeg -i ep1_r1.wav -vn -ar 44100 -ac 2 -ab 128k -f mp3 gears_ep1.mp3
ffmpeg -i ./CommandLine1_master.wav -vn -ar 44100 -c:a aac -strict -2 -ac 1 -ab 64k ./commandLineMono.aac
#!/usr/local/bin/python3
import glob
import subprocess
import argparse
parser=argparse.ArgumentParser()
parser.add_argument('out_file', type=str, help='the output audio file', default='out.mp3')
args = parser.parse_args()
args = args.__dict__
def print_df_markdown(df, index=True):
"""
This prints a pandas dataframe in a form ready to be used as a markdown table.
Simply print and copy-paste to your hot, new blog post.
"""
print()
cols = list(df)
if index:
cols = ['Index'] + cols
header = ' | '.join(cols)
#!/usr/bin/env perl
use File::Basename;
use Cwd 'abs_path';
use 5.014;
use strict;
use warnings;
use utf8;
my $CRF=18;
my $PRESET="slow";