From 66b8ce3fc65d526613a4886e49c607201d92512f Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Fri, 30 May 2014 11:27:55 -0700 Subject: [PATCH 1/2] Added ffmpeg, haxelib, Matt's Traceroute and imagemagick convert. --- pages/common/convert.md | 15 +++++++++++++++ pages/common/ffmpeg.md | 19 +++++++++++++++++++ pages/common/haxelib.md | 19 +++++++++++++++++++ pages/common/mtr.md | 19 +++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 pages/common/convert.md create mode 100644 pages/common/ffmpeg.md create mode 100644 pages/common/haxelib.md create mode 100644 pages/common/mtr.md diff --git a/pages/common/convert.md b/pages/common/convert.md new file mode 100644 index 000000000..4183f151f --- /dev/null +++ b/pages/common/convert.md @@ -0,0 +1,15 @@ +# convert + +> Imagemagick image conversion tool + +- Convert an image from JPG to PNG + +`convert {{image.jpg}} {{image.png}}` + +- Scale an image 50% it's original size + +`convert {{image.png}} -resize 50% {{image2.png}}` + +- Horizontally append images + +`convert {{image1.png}} {{image2.png}} {{image3.png}} +append {{image123.png}}` diff --git a/pages/common/ffmpeg.md b/pages/common/ffmpeg.md new file mode 100644 index 000000000..73d745cbf --- /dev/null +++ b/pages/common/ffmpeg.md @@ -0,0 +1,19 @@ +# ffmpeg + +> Video conversion tool + +- Extract the sound from a video and save it as MP3 + +`ffmpeg -i {{video-filename}} -vn -ar 44100 -ac 2 -ab 192 -f mp3 {{sound.mp3}}` + +- Convert frames from a video into individual numbered images + +`ffmpeg -i {{video-filename}} {{image%d.png}}` + +- Combine numbered images (image1.jpg, image2.jpg, etc) into a video + +`ffmpeg -f image2 -i {{image%d.jpg}} {{video.mpg}}` + +- Convert AVI video to MP4. AAC Audio @ 128kbit, Video @ 1250Kbit + +`ffmpeg -i {{in.avi}} -acodec libfaac -ab 128k -vcodec mpeg4 -b 1250K {{out.mp4}}` diff --git a/pages/common/haxelib.md b/pages/common/haxelib.md new file mode 100644 index 000000000..b8ce9a3fc --- /dev/null +++ b/pages/common/haxelib.md @@ -0,0 +1,19 @@ +# haxelib + +> Haxe Library Manager + +- Search for a Haxe library + +`haxelib search {{keyword}}` + +- Install a Haxe library + +`haxelib install {{libname}}` + +- Upgrade all installed Haxe libraries + +`haxelib upgrade` + +- Install the development version of a library from a Git repository + +`haxelib git {{libname}} {{GIT-URL}}` diff --git a/pages/common/mtr.md b/pages/common/mtr.md new file mode 100644 index 000000000..47e5c61c3 --- /dev/null +++ b/pages/common/mtr.md @@ -0,0 +1,19 @@ +# mtr + +> Combined traceroute and ping tool + +- Traceroute to a host and continuously ping all intermediary hops + +`mtr {{host}}` + +- Disable IP address and host name mapping + +`mtr -n {{host}}` + +- Generate output after pinging each hop 10 times + +`mtr -w {{host}}` + +- Force IP IPv4 or IPV6 + +`mtr -4 {{host}}` From 86e66afef950d6027c55eedfb218fbe655b0ed12 Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Fri, 30 May 2014 12:09:29 -0700 Subject: [PATCH 2/2] Added HandbrakeCLI and MP4Box --- pages/common/HandBrakeCLI.md | 19 +++++++++++++++++++ pages/common/MP4Box.md | 16 ++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pages/common/HandBrakeCLI.md create mode 100644 pages/common/MP4Box.md diff --git a/pages/common/HandBrakeCLI.md b/pages/common/HandBrakeCLI.md new file mode 100644 index 000000000..81cf73bc2 --- /dev/null +++ b/pages/common/HandBrakeCLI.md @@ -0,0 +1,19 @@ +# HandBrakeCLI + +> Video conversion tool + +- Convert a video file to MKV (AAC 160kbit audio and x264 CRF20 video) + +`HandBrakeCLI -i {{input.avi}} -o {{output.mkv}} -e x264 -q 20 -B 160` + +- Resize a video file to 320x240 + +`HandBrakeCLI -i {{input.mp4}} -o {{output.mp4} -w 320 -l 240` + +- List available presets + +`HandBrakeCLI --preset-list` + +- Convert an AVI video to MP4 using the Android preset + +`HandBrakeCLI --preset="Android" -i {{input.ext}} -o {{output.mp4}}` diff --git a/pages/common/MP4Box.md b/pages/common/MP4Box.md new file mode 100644 index 000000000..fe185f411 --- /dev/null +++ b/pages/common/MP4Box.md @@ -0,0 +1,16 @@ +# MP4Box + +> MPEG-4 Systems Toolbox - Muxes streams into MP4 container + +- Display information about an existing MP4 file + +`MP4Box -info {{filename}}` + +- Add an SRT subtitle file into an MP4 file + +`MP4Box -add {{input-subs.srt}}:lang=eng -add {{input.mp4}} {{output.mp4}}` + +- Combine audio from one file and video from another + +`MP4Box -add {{input1.mp4}}#audio -add {{input2.mp4}}#video {{output.mp4}` +