Difference between revisions of "Home"

From Robert-Depot
Jump to: navigation, search
Line 4: Line 4:
  
 
[[Teaching]]
 
[[Teaching]]
 +
 +
[[Video Tools]]
  
 
== Teaching Resources ==
 
== Teaching Resources ==
Line 127: Line 129:
 
== NLP ==
 
== NLP ==
 
[[NLP]]
 
[[NLP]]
 
== Video Tools ==
 
=== Non-finalcut capture path===
 
* FireWireSDK capture utility to m2t file
 
* m2t to mov:
 
<code>ffmpeg -i ocean_hdv_ca_200903_200911.m2t -f mov -vcodec copy -acodec copy ocean_hdv_ca_200903_200911.mov</code>
 
*
 
=== High Resolution Video ===
 
* 24P workflow with open source tools [http://eugenia.gnomefiles.org/2007/07/13/canon-hv20-24p-pulldown]
 
* HDMI capture card (BlackMagic Intensity) [http://www.blackmagic-design.com/products/intensity/]
 
* PCI-Mini and BlackMagic card solution on MBPro [http://panocamera.com/blog/?cat=3]
 
 
=== Sub-titles and Closed- Captioning===
 
[[subtitle manipulation]]
 
 
=== VIDEO CONVERSION ===
 
* ffmpeg command reference http://linux.die.net/man/1/ffmpeg
 
 
* <code> ffmpeg -i infile.avi -vcodec mpeg4 -b 8000k outfile.mp4 </code>
 
* drop audio <code> ffmpeg -i infile.avi -vcodec mpeg4 -an -b 8000k outfile.mp4 </code>
 
* resize to youtube preferred HD <code> ffmpeg -i infile.avi -vcodec mpeg4 -s 1280x720 -b 8000k outfile.mp4 </code>
 
* youtube recommendations http://www.youtube.com/t/howto_makevideo
 
* vimeo http://www.vimeo.com/help/compression
 
 
=== VIDEO -> FRAMES ===
 
* <code> ffmpeg -i infile.avi -s 720x480 -f image2 infile-%03d.tga</code>
 
* <code> ffmpeg -i toiletpaperhead\ wind.mov -deinterlace -r 0.5 -an -y -vcodec mjpeg -f image2 -sameq /Volumes/Reservoir/Frames/toilet_0.5/toiletpaper_wind_0.5_%05d.jpg</code>
 
=== FRAMES -> VIDEO ===
 
<code> ffmpeg -i /Volumes/Reservoir/Frames/toilet_0.5/toiletpaper_wind_0.5_%05d.jpg \
 
-r 30 -vcodec mpeg4 -an -b 4000k toiletpaper_wind_0.5.mp4
 
</code>
 
 
* Force input framerate to 8 fps, output framerate to 30fps:
 
<code>
 
ffmpeg -r 8 -i dfsp%04d.tif -r 30 -vcodec mpeg4 -an -b 24000k dfsp03.mp4
 
</code>
 
 
*imagemagick to crop/convert images:
 
 
<code>
 
convert '*.tif' -resize 1280x720 resized/dfsp%04d.tif
 
</code>
 
 
<code>
 
convert -verbose 'dfsp01_%04d.tif'[1-500] -resize 1280x720 resized/dfsp%04d.tif
 
</code>
 
 
*converting through python script
 
<source lang="python">
 
from subprocess import call
 
 
import sys
 
for i in range(751,6992):
 
    try:
 
        cmd = "dfsp01_%04d.tif -resize 1280x720 /Volumes/Reservoir/Process/dfsp/dfsp%04d.tif"%(i, i)
 
        print "convert " + cmd
 
        retcode = call("convert " + cmd, shell=True)
 
        if retcode < 0:
 
            print >>sys.stderr, "Child was terminated by signal", -retcode
 
        else:
 
            print >>sys.stderr, "Child returned", retcode
 
    except OSError, e:
 
        print >>sys.stderr, "Execution failed:", e
 
 
</source>
 
 
* downsizing 4k frames to HD 1080p (using imagemagick):
 
imconvert scstereo_01628.tif -geometry 1920x1080 small.tif
 
* joining left and right frames to make single-frame images (with python and imagemagick <code> montage </code> command):
 
<source lang="python">
 
from subprocess import call
 
 
import sys
 
for i in range(0,5856):
 
    try:
 
        cmd = "-geometry +0+0 left/scstereo_left_%05d.tif right/scstere_right_%05d.tif -depth 8 joined/wide_1080p_%05d.tif"%(i, i, i)
 
        print "montage " + cmd
 
        retcode = call("montage " + cmd, shell=True)
 
        if retcode < 0:
 
            print >>sys.stderr, "Child was terminated by signal", -retcode
 
        else:
 
            print >>sys.stderr, "Child returned", retcode
 
    except OSError, e:
 
        print >>sys.stderr, "Execution failed:", e
 
 
</source>
 
=== TIMELAPSE ===
 
<code>
 
 
ffmpeg -r 1 -i %04d.jpg -vcodec mjpeg -qscale 1 -s 1440x1080 -an output_1080.avi
 
 
</code>
 
 
=== Misc ===
 
[[ffmpeg to make a dvd]]
 
 
DV cam as a webcam
 
* http://www.trackercam.com/TCamWeb/dvdriver.htm
 
 
Monitor Mount
 
* http://en.wikipedia.org/wiki/Flat_Display_Mounting_Interface
 
* M4 screws (approx 10mm long), in square 100mm across.
 
 
=== Modifying VideoInput lib for OpenFrameworks ===
 
* Added "Bdaiface.h" to DShow.h in C:\\Dev-CPP\\Include
 
* install ffdshow filter for MPEG2 Decoding http://sourceforge.net/projects/ffdshow-tryout/
 
 
DirectShow details:
 
<source lang="cpp">
 
// Setup the other filters necessary to handle MPEG2TS Stream
 
// Capture Device -> MPEG-2 Demultiplexer -> ffdshow Video Decoder -> Frame Grabber
 
 
// MPEG-2 Demultiplexer Filter
 
// Major Type: Video
 
// Sub Type: MPEG2_VIDEO
 
// Format: MPEG2Video
 
// New Pin
 
//  Name: Video
 
//  Media Type: MPEG2 Program Video
 
// PID Mapping:
 
//  PID: x0810
 
//  Pin: Video
 
//  Elementary Stream (A/V only)
 
 
// ffdshow Video Decoder Filter
 
// Codecs
 
//  Format: MPEG2
 
//  Decoder: libmpeg2
 
//  Supported FOURCCs/remarks: MPEG2 codec
 
// In:
 
//  Major Type: Video
 
//  Sub Type: MPEG2_VIDEO
 
//  Format: MPEG2Video
 
// Out:
 
//  Major Type: Video
 
//  Sub Type: YV12
 
//  Format: YV12 1536x-1080, 12bits,
 
//  Aspect Ratio: 16x9,
 
//  Interlace format: Frames
 
//  rcSrc=[0,0,1440,1080]
 
//  rcDst=[0,0,1440,1080]
 
</source>
 
  
 
== Book Formatting ==
 
== Book Formatting ==

Revision as of 09:53, 16 May 2012

Classes

Projects

Teaching

Video Tools

Teaching Resources

potential classes

Advanced Video Processing

Language Processing for Art

workshops

Language Processing and Self-Representation

Reference

dig lit, writing

other

NLP

Fabrication

fabrication and rapid prototyping


Proposals

EMPAC

DAC 2009

Compact Space W2010

Conferences

Krysta Now

Krysta Now

American Industry

generative

  • BlackBox is an applied research resource. The group’s parametric modeling and scripting expertise is focused primarily on two broad areas of interest: the search for the “optimal” (goal-oriented) and the search for the “novel” (explorational). http://www.som.com/content.cfm/services_blackbox

mediated cultures / digital ethnography

MediatedCultures @ Kansas State

http://mediatedcultures.net/mediatedculture.htm

Networked Individualism

http://en.wikipedia.org/wiki/Barry_Wellman

social dimensions

LCD hacks

DIY Projector from LCD panel

Lense hacks

Scanner cameras

DOF adapters

Vision

Translating - assistant in language learning. Vision

NLP

NLP

Book Formatting

Auto-generating Books

  • render txt files to whole-page images

OS hacking

even better... sun virtualbox

virtual box

slipstream installers

slipstream windows install

live CDs

XP from USB stick

  • article [2]
  • forum [3]
  • microsoft CAB SDK [4]
  • WinISO [5]
  • from make magazine [6]

Corn Fed Nation

Related Links

cellulite

corn fed nation

car games

lcd tv

Graphic Design Service

E-Ink Facemask

Performance

Semantic Web

Graphing

Misc

visualization

decision making algorithms

MedTech

DIY ECG

other

Transcranial Magnetic Stimulation (TMS)

Electronic Muscle Stimulation (EMS)

MedTech

Map-Reduce

Massive Data Storage: the cloud

Massive Data Storage

Misc

AJAX versus traditional web design

Enabling OBEX with motorola Razr V3c

Online Culture

Forensic Photoshop

Articles

HCI Rich Guidance

Classes

Linux Commandline Stuff

remove page numbers in place with perl

perl -pi -e "s/p+\s+\d+(-\d*)*\.|p+\d+(-\d*)*\.//g" reading.txt

rsync to transfer files to server

  • local current directory to home/pictures directory:

rsync -avz --stats --progress Pictures roberttwomey.com:~/pictures/

  • local directory to current directory:

rsync -avz --stats --progress /Volumes/BOOTCAMP/Users/rtwomey/Documents/ .

  • local directory to server backup:

rsync -h -e ssh -avz --stats --progress ./Movies/* b393466@hanjin.dreamhost.com:~/Movies/

rsync -e ssh -avz --stats --progress ./Documents USER@SERVER.dreamhost.com:~/

  • server backup to local directory:

rsync -e ssh -avz --stats --progress USER@SERVER.dreamhost.com:~/Documents .

  • grab documents from online backup:

rsync -n -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/Documents/dxarts473_s11/ Documents/

rsync push.sh

with optional delete

#!/bin/bash

echo name of script is $0
echo first argument is $1

if [ $# -lt 1 ]
then
        echo "usage: $0 [DIRECTORY]"
        echo "  or"
        echo "       $0 -n [DIRECTORY]"
        echo "  or "
        echo "       $0 -n --delete [DIRECTORY]"
        exit
fi


if [ $1 = "-n" ]
then
        if [ $2 = "--delete" ]
        then
                cmd="rsync -n --delete -h -e ssh -avz --stats --progress $3 b393466@hanjin.dreamhost.com:~/$3"
        else
                cmd="rsync -n -h -e ssh -avz --stats --progress $2 b393466@hanjin.dreamhost.com:~/$2"
        fi
elif [ $1 = "--delete" ]
then
        cmd="rsync --delete -h -e ssh -avz --stats --progress $2 b393466@hanjin.dreamhost.com:~/$2"
else
        cmd="rsync -h -e ssh -avz --stats --progress $1 b393466@hanjin.dreamhost.com:~/$1"
fi

echo $cmd
$cmd

rsync pull.sh

#!/bin/bash

echo name of script is $0
echo first argument is $1

if [ $# -lt 1 ]
then
	echo "usage: $0 [DIRECTORY]"
	echo "  or"
	echo "       $0 -n [DIRECTORY]"
        echo "  or "
        echo "       $0 -n --delete [DIRECTORY]"
	exit
fi

if [ $1 = "-n" ]
then
        if [ $2 = "--delete" ]
        then
                cmd="rsync -n --delete -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/$3 $3"
        else
                cmd="rsync -n -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/$2 $2"
        fi
elif [ $1 = "--delete" ]
then
        cmd="rsync --delete -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/$2 $2"
else
        cmd="rsync -h -e ssh -avz --stats --progress b393466@hanjin.dreamhost.com:~/$1 $1"
fi

echo $cmd
$cmd

finding things with ls and grep

  • find this filename in a recursive search and show previous 30 lines of result:

ls -laR . | grep -b30 "scale_signal.o"

forwarding localhost mysql to a remote machine

  • do this to connect to 192.168.0.39 for instance:

ssh -f -L 3306:localhost:3306 rtwomey@192.168.0.39 sleep 10

  • tunnelMySql.sh:

ssh -fNg -L 3306:localhost:3306 rtwomey@192.168.1.191

grabbing a website with wget

  • grab a website recursively

wget -r --level=1 http://www.ppc.sas.upenn.edu/ppquestionnaires.htm

GCC Stuff

forcing compile as 32bit, i386 on os x

  • find occurrences of '-m64':

grep -r0 -e"x86_64" *

  • replace occurrences of '-m64' with '-m32':

grep -l -r0 -e"-m64" * | xargs sed -i "" 's/-m64/-m32/g'

  • replace occurrences of x86_64 with i386:

grep -l -r0 -e"x86_64" * | xargs sed -i "" 's/x86_64/i386/g'

compile pocketsphinx as universal static lib on OS X

  • make x86_64 version of libsphinxbase:

cd sphinxbase-0.7
./configure
make

  • copy resulting libsphinxbase.a file from /sphinxbase-0.7/src/libsphinxbase/.libs/ to libsphinxbase.x86_84.a in temp directory
  • make x86_64 version of libspocketsphinx:

cd pocketsphinx-0.7
./configure
make

  • copy resulting libpocketsphinx.a file from /pocketsphinx-0.7/src/libpocketsphinx/.libs to libpocketsphinx.x86_64.a file in temp directory
  • make i386 versions of libsphinxbase:

export CFLAGS="-arch i386" 
export LDFLAGS="-arch i386"
cd sphinxbase-0.7
make clean
./configure
make

  • copy resulting libsphinxbase.a file from /sphinxbase-0.7/src/libsphinxbase/.libs/ to libsphinxbase.i386.a in temp directory
  • make i386 versions of libpocketsphinx:

cd pocketsphinx-0.7
make clean
./configure
make

  • copy resulting libpocketsphinx.a file from /pocketsphinx-0.7/src/libpocketsphinx/.libs to libpocketsphinx.i386.a file in temp directory
  • combine files with lipo

lipo -create -output libsphinxbase.a libsphinxbase.x86_64.a libsphinxbase.i386.a
lipo -create -output libpocketsphinx.a libpocketsphinx.x86_64.a libpocketsphinx.i386.a