Skip to content

Instantly share code, notes, and snippets.

View machiq's full-sized avatar

Matthew Crnich machiq

View GitHub Profile
@machiq
machiq / dirCompress_mp4_1280x720_ultrafast_v002.sh
Last active June 22, 2018 19:48
FFMPEG - Recursively transcode a directory of quicktime movies
#!/bin/bash
#
# 2018-04-20 - Matt Crnich - v001 - ffmpeg conversion script, compresses directory to mp4(s)
# 2018-04-20 - Matt Crnich - v002 - added pixel format flag so mp4s will play within quicktime on OSX. Also adds thumbnails!
#
# Props to LordNeckBeard for the help.
#
for i in `find /input/dir -name "*.mov" -print0 | xargs -0`;
do o="output/dir/${i##*/}";
@machiq
machiq / 699284549-annotation.xml
Created July 2, 2018 22:18
xml-test-original
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xmeml>
<xmeml version="4">
<sequence id="sequence-1" TL.SQAudioVisibleBase="0" TL.SQVideoVisibleBase="0" TL.SQVisibleBaseTime="0" TL.SQAVDividerPosition="0.5" TL.SQHideShyTracks="0" TL.SQHeaderWidth="236" Monitor.ProgramZoomOut="20500520040000" Monitor.ProgramZoomIn="0" TL.SQTimePerPixel="0.19999999999999998" MZ.EditLine="20500520040000" MZ.Sequence.PreviewFrameSizeHeight="720" MZ.Sequence.PreviewFrameSizeWidth="1280" MZ.Sequence.AudioTimeDisplayFormat="200" MZ.Sequence.PreviewRenderingClassID="1297106761" MZ.Sequence.PreviewRenderingPresetCodec="1297107278" MZ.Sequence.PreviewRenderingPresetPath="EncoderPresets/SequencePreview/d8484cf3-c96c-4622-ab1f-ac1a16e196f9/I-Frame Only MPEG.epr" MZ.Sequence.PreviewUseMaxRenderQuality="false" MZ.Sequence.PreviewUseMaxBitDepth="false" MZ.Sequence.EditingModeGUID="d8484cf3-c96c-4622-ab1f-ac1a16e196f9" MZ.Sequence.VideoTimeDisplayFormat="110" MZ.WorkOutPoint="9471558096000" MZ.WorkInPoint="0" MZ.ZeroPoint="0" expl
@machiq
machiq / gsutil-rsync-exclude-hidden-files_v002.sh
Last active September 14, 2022 10:52
gsutil-rsync-exclude-hidden-files-jpgs-mp4
#Google GCloud Command line Tools
#2018-09-05 - Matthew Crnich - Original script excluded .mov(s). Updated to include .mov(s) but exclude .mp4(s)
gsutil -m rsync -r -x '\..*|.*/\.[^/]*$|.*/\..*/.*$|_.*|.*\.jpg$|.*\.mp4$' /source gs://destination-bucket
@machiq
machiq / ffmpeg-CV-compression-v005.sh
Last active October 24, 2018 16:03
ffmpeg-compression-settings-for-ComputerVision-APIs
#!/bin/bash
#
# 2018-07-17 - Matt Crnich - v001 - Settings for encoding files for GCP Video Intelligence API
# 2018-08-06 - Matt Crnich - v002 - Added audio mix down. Mixes multi-track audio down to stereo mix.
#
#
### Medium Preset, Fast Decode Tune with +Faststart at 1920x1080 ###
### copy Timecode track ###
### mix down multi-track audio track into stereo mix ###
@machiq
machiq / ffmpeg-aso-compressions-v001
Last active September 5, 2018 22:35
ffmpeg compression for aso spring
#!/bin/bash
#
# 2018-09-05 - Matt Crnich - v001 - Setup for ASO Spring Footage
#
#
### Medium Preset, Fast Decode Tune with +Faststart at 1920x1080 ###
### copy Timecode track ###
### mix down multi-track audio track into stereo mix ###
#
@machiq
machiq / gsutil-cp-jpg-v001
Last active September 6, 2018 19:32
gsutil copy only jpg images
find /sourceDir -name "*.jpg" -type f | xargs ./shellScript.sh
@machiq
machiq / ffmpeg-wmv-v001
Created September 6, 2018 22:37
ffmpeg make WMV
#!/bin/sh
# 2018-09-06 - Matthew Crnich - create WMV using FFMPEG
#
ffmpeg -i "input" -qscale 2 -vcodec msmpeg4 -acodec wmav2 "output.wmv"
@machiq
machiq / stillImage-remove-meta-v003.sh
Last active November 6, 2018 19:44
ExifTool remove all MetaData from JPEGs
#!/bin/bash
#File: stillImage-remove-meta-v003.sh
#
# 2018-11-02 - Matt Crnich - v001 - Use exiftool to remove still image metadata
# 2018-11-06 - Matt Crnich - v002 - quieted output
# 2018-11-06 - Matt Crnich - v003 - added awk to calculate total number of processed files
#
#
echo "enter path"
@machiq
machiq / stillImage-exportCSV-removeMeta
Last active June 26, 2019 18:00
Still Image - Export Subject MetaData to CSV and then give option to remove embedded MetaData
#!/bin/bash
#File: stillImage-exportCSV-removeMeta
#
#2019-01-11 Matt Crnich - Hacking on it
#2019-01-15 Matt Crnich - Removed find process in favor of exiftool native functionality
#2019-01-15 Matt Crnich - Adding function to remove metadata from files
#exiftool -IFD1:XResolution -IFD1:YResolution image.jpg
#Extract image resolution from EXIF IFD1 information (thumbnail image IFD).
@machiq
machiq / AutoML_data_preparation_AIA023.ipynb
Created July 2, 2019 21:58 — forked from yufengg/AutoML_data_preparation_AIA023.ipynb
Notebook for preparing a CSV for Google Cloud AutoML Vision
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.