Skip to content

Instantly share code, notes, and snippets.

View davidonet's full-sized avatar

David Olivari davidonet

  • David O Net
  • Fozières, France
View GitHub Profile
@davidonet
davidonet / gist:1242138
Created September 26, 2011 12:41
Generate a movie from image collection
ffmpeg -i filename-0%3d.jpg -threads 0 -vcodec libx264 -vpre fast -qmin 20 -qmax 25 test.mp4
@davidonet
davidonet / gist:1242139
Created September 26, 2011 12:42
Portable h264/aac video
ffmpeg -i inFile -threads 0 -vcodec libx264 -flags +loop+mv4 -cmp 256 -partitions +parti4x4+parti8x8+partp4x4+partp8x8+partb8x8 -subq 7 -trellis 1 -refs 5 -bf 0 -flags2 +mixed_refs -coder 0 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 26 -qmax 51 -qdiff 4 -acodec libfaac -ab 128k outFile.mp4
@davidonet
davidonet / gist:1242141
Created September 26, 2011 12:43
Printer optimized PDF
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=fly20112012_p.pdf fly20112012.pdf
@davidonet
davidonet / gist:1257310
Created October 2, 2011 10:13
grub prompt after failed boot
at the end of your /etc/grub.d/00_header file, comment out the if condition except for the regular set timeout line like this:
#if [ \${recordfail} = 1 ]; then
# set timeout=-1
#else
set timeout=${GRUB_TIMEOUT}
#fi
@davidonet
davidonet / gist:1367188
Created November 15, 2011 14:21
ffmpeg mp4 to 720p webm
for f in ../*.mp4; do\
ffmpeg -i $f -threads 4 -vpre libvpx-720p -vb 3900k -pass 1 -an -f webm -s 1280x720 -y /dev/null -passlogfile `basename $f .mp4`.log;\
ffmpeg -i $f -threads 4 -vpre libvpx-720p -vb 3900k -pass 2 -acodec libvorbis -ab 100k -f webm -s 1280x720 -passlogfile `basename $f .mp4`.log -y `basename $f .mp4`.webm; done
@davidonet
davidonet / gist:1399174
Created November 28, 2011 05:03
extract png from video
ffmpeg -itsoffset -4 -i test.avi -vcodec mjpeg -vframes 1 -an -f rawvideo -s 320x240 test.jpg
@davidonet
davidonet / gist:2239577
Created March 29, 2012 16:36
remove empty txt celle
db.txt.remove({'$and':[{'t': { '$exists': 0 }},{'i': { '$exists': 0 }}]})
@davidonet
davidonet / gist:2300373
Created April 4, 2012 11:03
stop/remove/disable the system bar (need to be su before issuing this command)
http://stackoverflow.com/questions/5109988/is-there-a-way-to-hide-the-system-bar-in-android-3-0-its-an-internal-device-an
To stop/remove/disable the system bar (need to be su before issuing this command):
$ service call activity 79 s16 com.android.systemui
To restore the system bar just simply issue this command:
$ am startservice -n com.android.systemui/.SystemUIService
@davidonet
davidonet / gist:2349467
Created April 10, 2012 08:51
FullScreen Hack Android
try {
Process proc = Runtime.getRuntime().exec(new String[] {
"su", "-c", "service call activity 79 s16 com.android.systemui"
}
);
try
{
proc.waitFor();
}
@davidonet
davidonet / gist:2875268
Created June 5, 2012 14:15
Processing jar signing
http://www.akeric.com/blog/?p=1352
$ ant build
$ jarsigner -verbose -keystore ~/my-release-key.keystore `pwd`/bin/MucemApp-release-unsigned.apk davidonet