ストリーミングダウンロードスクリプト
[twitter:@riocampos]さんにトラックバックをいただいた(http://d.hatena.ne.jp/riocampos+tech/20130726/p1)ので自分が使用しているスクリプトをさらします。*1
動作環境
ffmpeg は homebrew でインストールしています。
$ brew info ffmpeg ffmpeg: stable 1.2.1, HEAD http://ffmpeg.org/ /usr/local/Cellar/ffmpeg/1.2.1 (149 files, 26M) * Built from source with: --with-rtmpdump, --with-openssl, --with-ffplay From: https://github.com/mxcl/homebrew/commits/master/Library/Formula/ffmpeg.rb
$ ffmpeg -version ffmpeg version 1.2.1 built on Jul 20 2013 13:52:04 with Apple LLVM version 4.2 (clang-425.0.27) (based on LLVM 3.2svn) configuration: --prefix=/usr/local/Cellar/ffmpeg/1.2.1 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=cc --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-librtmp --enable-ffplay --enable-openssl libavutil 52. 18.100 / 52. 18.100 libavcodec 54. 92.100 / 54. 92.100 libavformat 54. 63.104 / 54. 63.104 libavdevice 54. 3.103 / 54. 3.103 libavfilter 3. 42.103 / 3. 42.103 libswscale 2. 2.100 / 2. 2.100 libswresample 0. 17.102 / 0. 17.102 libpostproc 52. 2.100 / 52. 2.100
*1:[twitter:@riocampos]さんが最新版(V2.0)を公開されています。http://d.hatena.ne.jp/riocampos+tech/20130729/p1
Rails 2.3 と mongrel_cluster と prefix
Railsを2.3にあげたら、こんなエラーが出るようになった。
'load_missing_constant': uninitialized constant ActionController::AbstractRequest (NameError)
Rails 2.3 には、 ActionController::AbstractRequest がなくなったので、mongrel_cluster で prefix を指定することができなくなったということらしい。
かわりに、どうするかというと
(1) config/environment.rb か config/environments/production.rb あたりに、次のように書いておく。
config.action_controller.relative_url_root = '/prefix'
(2) このままだと、cssやjsなどの静的ファイルが読めなくなるので、apacheの設定を次のように変更しておく。
# Rails 2.3の設定 ProxyPass /prefix http://localhost:4000 ProxyPassReverse /prefix http://localhost:4000 # Rails 2.2の設定 # ProxyPass /prefix http://localhost:4000/prefix # ProxyPassReverse /prefix http://localhost:4000/prefix
JSFと数値文字参照
今頃になってやっとJBossSeam 2.0を使い始めたら、以前に解決したはずの数値文字参照の問題が再発している。
JSFの実装がApache MyFacesからSunのJSF RIに変わったためらしい。
http://sourceforge.jp/projects/japan-jbug/wiki/JSF-I18N
手順