This command rotates a video by 90 degrees and reduces quality.
HandBrakeCLI -i input -o output.m4v --rotate=angle=90 -q 30
Valid values for rotate: 0, 90, 180, 270
Quality parameter q: 20 = very high, 25 = high, 30=medium, …
This command rotates a video by 90 degrees and reduces quality.
HandBrakeCLI -i input -o output.m4v --rotate=angle=90 -q 30
Valid values for rotate: 0, 90, 180, 270
Quality parameter q: 20 = very high, 25 = high, 30=medium, …
for vid in *.mp4; do ffmpeg -i "$vid" -vn -acodec libmp3lame -q:a 4 "output/${vid%.mp4}.mp3"; done
Found on http://askubuntu.com/questions/221026/how-can-i-batch-extract-audio-from-mp4-files-with-ffmpeg-without-decompression with own modifications to bitrate based on https://trac.ffmpeg.org/wiki/Encode/MP3
DVDs physically degrade over time. Before they become unusable and unreadable, it is possible to do full drive backups using this tool:
dvdbackup -Mvp -i /dev/sr0 -o ~/Backup/DVDs
Eclipse can be used for Arduino and avr embedded development with avr-gcc. There is a nice plugin for it: http://avr-eclipse.sourceforge.net/
The plugin parses the output of some command line program to provide some properties and settings in eclipse. When the system local is not english, this cannot be parsed correctly. The simple fix is to run eclipse with the english locale.
Just create a script with:
#!/bin/bash
LC_MESSAGES=C eclipse
To change the Eclipse indexer settings go to:
Project properties -> C/C++ General -> Preprocessor Include Paths, Macros etc. -> Tab Providers -> CDT GCC Built-in Compiler Settings
Append -std=c++0x (or -std=c++11) to the command. Afterwards it should look like this:
${COMMAND} -E -P -v -dD ${INPUTS} -std=c++0x
Found on:
Stackoverflow.com
There is a tool for that called “jhead”, which is in the ubuntu repositories.
This command automatically renames all jpg files in the current folder and all subfolders:
find . -iname *.jpg -exec jhead -nf%Y-%m-%d_%H-%M-%S {} \;
Nothing new and nothing surprising, but it still was painful to find out:
Do not use valgrind or helgrind in combination with the c++ compiler options -p and -pg for profiling.
This gave me some strange behavior of my app with sleeps not sleeping. I only had a crashing application, no clue what might be wrong with my code and the error message “Profiling timer expired”.
Just switch off the profiling options and everything was find, except the errors that I wanted valgrind to find for me.
Again I spent some time searching for free tools to improve my cnc toolchain. I stumbled upon two simple but helpful flash programs for handling g-code files:
C#
var watch = Stopwatch.StartNew(); // the code that you want to measure comes here watch.Stop(); var elapsedMs = watch.ElapsedMilliseconds;
Taken from: http://stackoverflow.com/questions/14019510/calculate-the-execution-time-of-a-method
Ubuntu brings a nice package called “pdftk” for editing pdfs using the command line. This command joins multiple pdfs into a single pdf:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
Here is another way to join pdf files, that only requires ghostscript:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=123.pdf 1.pdf 2.pdf 3.pdf