Saturday, March 18, 2017

How to split videos in command line

The command:

ffmpeg -i source-file.foo -ss 0 -t 600 first-10-min.m4v

will work but is slow. Solution:

ffmpeg -ss 00 -t 00:01:0.0 -i source.mp4 -vcodec copy -acodec copy result.mp4

Will split the source.mp4 from the beginning to the first 60 seconds and save it in result.mp4.

Friday, March 17, 2017

How to Concatenate Video Files

I needed to stitch intro and outro to my screencast video. I installed ffmpeg on my mac, created a text file, stitch.txt:

file './intro.mp4'
file './semantics3.mp4'

file './outro.mp4'

To stitch videos:

ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4

Install ffmpeg on Mac

To concatenate intro and outro to my screencasts, I use ffmpeg to stitch the videos from the command line. It is faster and easier than using the ScreenFlow.

brew options ffmpeg

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools


Sunday, March 12, 2017

How to Setup Textmate to use RVM

Go to Textmate preferences, click on Variables and create a TM_RUBY variable the value should be set to the output of the which rvm-auto-ruby command run in the terminal. The changes will take effect without requiring any restart of textmate.

Sunday, March 05, 2017

configure: error: clang version 3.0 or later is required

~ $gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0
Thread model: posix
~ $clang -v
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin13.4.0

Thread model: posix