This file contains 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
require 'choice' | |
# Choice Block for argument definition | |
Choice.options do | |
header 'Application options:' | |
option :template, :required => true do | |
short '-t' | |
long '--template=TEMPLATE' | |
desc 'The path to the preset settings template' |
This file contains 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 argparse | |
################################################## | |
# Create the argument parser | |
# http://docs.python.org/dev/library/argparse.html | |
################################################## | |
parser = argparse.ArgumentParser(description="Parse arguments") | |
parser.add_argument("input_file", action="store", help="File to read", metavar="INFILE") | |
parser.add_argument("output_file", action="store", default="output.txt", help="File to write", metavar="OUTFILE") |
This file contains 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
################################################## | |
# Add natural number sorting to arrays | |
################################################## | |
class Array | |
# Method which sort an array composed of strings with embedded numbers by | |
# the 'natural' representation of numbers inside a string. | |
def natcmp | |
reg_number = /\d+/ |
This file contains 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
ffmpeg -debug_ts -re -copyts -i <intput_ts> -f null out.null |
This file contains 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
ffmpeg -re -copyts -i <input_ts> -f mpegts -c copy udp://localhost:4567 |
This file contains 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
ffmpeg -i <input_file> -f image2 "img-%03d.bmp" |
This file contains 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
ffmpeg -f image2 -i foo-%03d.jpeg -r 12 -s WxH foo.avi |
This file contains 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
ffprobe -i <input file> -sexagesimal -show_packets -print_format compact > output.log |
This file contains 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
ffprobe -show_frames -pretty -print_format compact <input file> |
This file contains 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
ffmpeg -i <input> -map 0:v -vcodec copy -map 0:1 -c:a:0 libfaac -b:a 384k -map 0:1 -c:a:1 copy <output> |