Skip to content

Instantly share code, notes, and snippets.

View greatseth's full-sized avatar

Seth Thomas Rasmussen greatseth

View GitHub Profile
@greatseth
greatseth / blankslate.rb
Created January 30, 2009 22:36
basic object class from Builder
#!/usr/bin/env ruby
#--
# Copyright 2004, 2006 by Jim Weirich ([email protected]).
# All rights reserved.
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#++
_\m/ store (master) | ffmpeg -y -i ../videos/dinner.3g2 -sameq -f mp4 -s cif -r 25 -ar 32000 -ac 2 dinner.mp4
FFmpeg version git-611415b, Copyright (c) 2000-2008 Fabrice Bellard, et al.
configuration: --prefix=/usr/local --enable-libmp3lame --disable-vhook --enable-shared --disable-mmx --enable-libfaac --enable-libfaad --enable-gpl --enable-libx264 --enable-libamr-nb --enable-libamr-wb --enable-nonfree
libavutil 49.12. 0 / 49.12. 0
libavcodec 52. 7. 0 / 52. 7. 0
libavformat 52.23. 1 / 52.23. 1
libavdevice 52. 1. 0 / 52. 1. 0
built on Feb 6 2009 09:49:33, gcc: 4.0.1 (Apple Inc. build 5490)
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '../videos/dinner.3g2':
Duration: 00:03:36.00, start: 0.000000, bitrate: 241 kb/s
#!/usr/bin/env ruby
class Array
def nearest_to(given)
if given < min
min
elsif given > max
max
else
low, high = map do |r|
diff --git a/lib/commit_list_item.rb b/lib/commit_list_item.rb
index 5969894..14dd083 100644
--- a/lib/commit_list_item.rb
+++ b/lib/commit_list_item.rb
@@ -18,11 +18,11 @@ class CommitListItem < Shoes::Widget
def draw_contents
@slot.clear do
- if @selected
+ @background = if @selected
# The flag used to set video bitrate has apparently changed between
# different ffmpeg versions. In the latest builds -b is used.
# In older builds it was -v which is now used to set verbosity of logging.
cattr_accessor :video_bit_rate_parameter
self.video_bit_rate_parameter = "b"
include AbstractTool::InstanceMethods
attr_reader :frame, :q, :size, :time, :output_bitrate, :video_size, :audio_size, :header_size, :overhead, :psnr, :output_fps
Ffmpeg Pass 2: ffmpeg -y -i /Users/seth/diversion/hdcloud/encodes/dinner_105_393.3g2 -pass 2 -vcodec libx264 -ab 128k -b 1500k -bt 1500k -r 30 -s 480x320 -ar 44100 -acodec libfaac -ac 2 -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions +parti8x8+parti4x4+partp8x8+partb8x8 -me_method umh -subq 8 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 4 -directpred 3 -trellis 1 -flags2 +bpyramid+wpred+mixed_refs+dct8x8+fastpskip -f mp4 /Users/seth/diversion/hdcloud/encodes/393/dinner_105_1500.mp4 $2 2>&1
Ffmpeg Pass 2: FFmpeg version git-611415b, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr/local --disable-vhook --disable-mmx --enable-shared --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-nonfree --enable-libamr-nb --enable-libamr-wb
libavutil 49.14. 0 / 49.14. 0
libavcodec 52.13. 0 / 52.13. 0
libavformat 52.25. 0 / 52.25. 0
# Include in ActiveRecord::Base to have your models automatically convert
# empty strings and the like to nil before save.
module StringNullifier
def self.included(model)
model.class_eval do
extend StringAttributesAccessor
before_validation :nullify_strings
end
end
sudo rake gems:install
Password:
(in /Users/seth/diversion/hdcloud)
no such file to load -- rubyist-aasm
...
...
...
Missing these required gems:
rubyist-aasm
greatseth-rvideo
Ffmpeg Pass 1: ffmpeg -y -i /encodes/dinner_180_919.3g2 -pass 1 -vcodec libx264 -b 1500k -bt 1500k -s 604x540 -padleft 178 -padright 178 -padtop 0 -padbottom 0 -padcolor 000000 -r 15 -ar 44100 -an -threads 0 -coder 1 -flags +loop -cmp +chroma -partitions -parti8x8-parti4x4-partp8x8-partp4x4-partb8x8 -me_method dia -subq 1 -me_range 16 -g 250 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -b_strategy 1 -qcomp 0.6 -qmin 10 -qmax 51 -qdiff 4 -bf 16 -refs 1 -directpred 1 -bidir_refine 0 -trellis 0 -flags2 -bpyramid-wpred-mixed_refs-dct8x8+fastpskip -f mp4 /dev/null 2>&1
Ffmpeg Pass 1: FFmpeg version SVN-r17587, Copyright (c) 2000-2009 Fabrice Bellard, et al.
configuration: --prefix=/usr/local --disable-vhook --enable-pthreads --enable-shared --enable-gpl --enable-libmp3lame --enable-libfaac --enable-libfaad --enable-libx264 --enable-nonfree --enable-libamr-nb --enable-libamr-wb
libavutil 49.15. 0 / 49.15. 0
libavcodec 52.19. 0 / 52.19. 0
libavformat 52.30. 0 / 52.30. 0
libavdevice 52
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:442:in `load_missing_constant': uninitialized constant IRB::ExtendCommandBundle (NameError)
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:77:in `const_missing_not_from_s3_library'
from /Users/seth/diversion/hdcloud/vendor/gems/aws-s3-0.4.0/lib/aws/s3/extensions.rb:173:in `const_missing'
from /usr/local/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/commands/irb.rb:11
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/command.rb:51:in `load_commands'
from /usr/local/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug/command.rb:50:in `each'