2013.09.17 Tuesday
一定期間更新がないため広告を表示しています
- - -
是非とも見なかったことに…
|
files/patch-singls.c--- modules/control/signals.c.orig 2009-07-24 17:31:23.275029940 +0200 +++ modules/control/signals.c 2009-07-24 17:32:02.859035130 +0200 @@ -100,7 +100,7 @@ static void *SigThread (void *data) do { - sigwait (&set, &signum); + while (sigwait (&set, &signum)); #ifdef __APPLE__ /* In Mac OS X up to 10.5 sigwait (among others) is not a pthread
なお、これらのパッチを当てても vlc を終了(Ctrl+Q) するときに segmentation fault したりしなかったりします。files/patch-threads.c--- src/misc/threads.c.orig 2009-07-24 17:31:23.275029940 +0200 +++ src/misc/threads.c 2009-07-24 17:32:02.859035130 +0200 @@ -784,7 +784,7 @@ int vlc_clone (vlc_thread_t *p_handle, v pthread_sigmask (SIG_BLOCK, &set, &oldset); } -#if defined (_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING >= 0) ¥ +#if 0 && defined (_POSIX_PRIORITY_SCHEDULING) && (_POSIX_PRIORITY_SCHEDULING >= 0) ¥ && defined (_POSIX_THREAD_PRIORITY_SCHEDULING) ¥ && (_POSIX_THREAD_PRIORITY_SCHEDULING >= 0) {
2pass は面倒なのでスクリプト作りました。(6/10 追記:もうちょっと綺麗になるようにできたので書き直しました)1pass コマンドffmpeg -i /path/to/infile.avi -y -s 704x396 -b 700k ¥ -vcodec libx264 -mbd 2 -trellis 2 -aic 2 -cmp 2 -subcmp 2 ¥ -acodec libfaac -ac 2 -ab 128k ¥ -f mp4 outfile.mp4
このスクリプトだと、大抵の動画が 108MB に収まり、そこそこ綺麗(なはず)です。ホントは 104MB に収めたいのですが、なかなかどうしてうまくいきません。orz2pass 用スクリプト#!/bin/sh # input file name IFILE=$1 # output file name OFILE=$1 # size = 4cif or vga or wxga and so on... SIZE="704x396" # bit rate BT="500k" #################### # 2-pass #################### ffmpeg -i $IFILE -y -s $SIZE -b $BT -bt $BT -deinterlace ¥ -vcodec libx264 -r 23.97 -mbd 2 -trellis 2 -aic 2 -cmp chroma -flags loop ¥ -nr 600 -deblockalpha 0 -deblockbeta 0 -crf 16 -refs 1 -coder 0 -chromaoffset 10 ¥ -me umh -me_range 16 -subq 7 -partitions +parti4x4+partp8x8+partp4x4+partb8x8 ¥ -bf 16 -b_strategy 1 -directpred 3 -bidir_refine 1 -flags2 wpred+mixed_refs+brdo ¥ -g 240 -keyint_min 25 -level 30 -qmin 16 -qmax 31 -sc_threshold 40 -i_qfactor 0.71 ¥ -an ¥ -f mp4 -pass 1 $OFILE.mp4 && ¥ ffmpeg -i $IFILE -y -s $SIZE -b $BT -bt $BT -deinterlace ¥ -vcodec libx264 -r 23.97 -mbd 2 -trellis 2 -aic 2 -cmp chroma -flags loop ¥ -nr 600 -deblockalpha 0 -deblockbeta 0 -refs 1 -coder 0 -chromaoffset 10 ¥ -me umh -me_range 16 -subq 7 -partitions +parti4x4+partp8x8+partp4x4+partb8x8 ¥ -bf 16 -b_strategy 1 -directpred 3 -bidir_refine 1 -flags2 wpred+mixed_refs+brdo ¥ -g 240 -keyint_min 25 -level 30 -qmin 16 -qmax 31 -sc_threshold 40 -i_qfactor 0.71 ¥ -acodec libfaac -ac 2 -ar 48000 -ab 96000 -vol 410 ¥ -f mp4 -pass 2 -passlogfile "ffmpeg2pass" $OFILE.mp4 && ¥ rm ffmpeg2pass-0.log x264_2pass.log && ¥ echo "encoding Finished."
1pass の場合は以下です。使い方% sh this_script.sh "/path/to/どーがファイル(拡張子は何でもおk)"
1回で#!/bin/sh # input file name IFILE=$1 # output file name #OFILE=`echo "$1" | sed "s/¥.[A-Za-z0-9]*$//"` OFILE=$1 # size = 4cif or vga or wxga and so on... SIZE="704x396" # bitrate BT="768k" ffmpeg -i $IFILE -threads 2 -y -s $SIZE -b $BT -bt $BT -deinterlace ¥ -vcodec libx264 -r 23.97 -mbd 2 -trellis 2 -aic 2 -cmp +chroma ¥ -nr 1000 -deblockalpha 0 -deblockbeta 0 -crf 22 -refs 1 -coder 0 ¥ -bf 8 -me umh -me_range 16 -subq 6 -partitions +parti4x4+parti8x8+partp8x8 ¥ -g 240 -keyint_min 25 -level 13 -qmin 10 -qmax 22 -sc_threshold 40 -i_qfactor 0.71 ¥ -acodec libfaac -ac 2 -ar 48000 -ab 128000 -vol 400 ¥ -f mp4 $OFILE.mp4 && ¥ echo "encoding Finished."
旧マシンで% su - # /usr/local/etc/rc.d/mysql-server stop # cd /var/db/mysql # tar zcf /tmp/hoge.db.tar.gz hoge/
新マシンでget hoge.db.tar.gz by ftp or rsync or ssh % su - # /usr/local/etc/rc.d/mysql-server stop # cd /var/db/mysql # tar zxf /path/to/hoge.db.tar.gz # /usr/local/etc/rc.d/mysql-server start
あ、全く関係ないのですが xorg のバージョンを上げました。問題なく動いています。libX11 云々のエラーも吐かれなくなりました。/etc/devfs.conf# Commonly used by many ports link acd0 cdrom perm acd0 0666 perm xpt0 0666 perm pass0 0666 perm cd0 0666
上記の記述は 1スレッドに 1メールなら OK ですが、複数あると一番下のメールだけしか monospace になりませんでした。以下のように記述すると全メールが monospace になりました。userContent.css@-moz-document domain(mail.google.com) { div[class="h7 ie"] { font-family: "monospace" !important; font-size: 13pt; } }
userContent.css@-moz-document domain(mail.google.com) { div[class="nH hx"] { font-family: "monospace" !important; font-size: 13pt; } }
これは FreeBSD の問題 (Intel Speed Step 機能) だそうで、BIOS で EIST を切ればいいそうです。EIST を切ると以下のように powerd のみで速度が変化します。*** おおっと ***calcru: runtime went backwards from 54 usec to 43 usec for pid 758 (devd) calcru: runtime went backwards from 136 usec to 109 usec for pid 349 (dhclient) calcru: runtime went backwards from 504 usec to 401 usec for pid 333 (dhclient) calcru: runtime went backwards from 11672 usec to 9293 usec for pid 333 (dhclient) calcru: runtime went backwards from 196 usec to 156 usec for pid 179 (adjkerntz) calcru: runtime went backwards from 755 usec to 601 usec for pid 21 (swi6: task queue) calcru: runtime went backwards from 102 usec to 81 usec for pid 9 (thread taskq) calcru: runtime went backwards from 1621 usec to 1291 usec for pid 19 (swi5: +) calcru: runtime went backwards from 17 usec to 14 usec for pid 17 (swi1: net) calcru: runtime went backwards from 16892 usec to 13878 usec for pid 0 (swapper)
おぉ Hz が上がってる。そして… core の温度も上がってる。何もしてなくても 37℃ですか。うへぇ。(ちなみに OC する前は何もしてない時 33℃でした)sysctl dev.cpudev.cpu.0.%desc: ACPI CPU dev.cpu.0.%driver: cpu dev.cpu.0.%location: handle=¥_PR_.P001 dev.cpu.0.%pnpinfo: _HID=none _UID=0 dev.cpu.0.%parent: acpi0 dev.cpu.0.temperature: 37 dev.cpu.0.freq: 395 dev.cpu.0.freq_levels: 3162/-1 2766/-1 2371/-1 1976/-1 1581/-1 1185/-1 790/-1 395/-1 dev.cpu.0.cx_supported: C1/0 dev.cpu.0.cx_lowest: C1 dev.cpu.0.cx_usage: 100.00% dev.cpu.1.%desc: ACPI CPU dev.cpu.1.%driver: cpu dev.cpu.1.%location: handle=¥_PR_.CPU1 dev.cpu.1.%pnpinfo: _HID=none _UID=0 dev.cpu.1.%parent: acpi0 dev.cpu.1.temperature: 37 dev.cpu.1.cx_supported: C1/0 dev.cpu.1.cx_lowest: C1 dev.cpu.1.cx_usage: 100.00%
心なしか Linux Flash9 が早くなったようなそうでもないような…localedef コマンド (EUC-JP)% sudo /usr/compat/linux/usr/bin/localedef -i ja_JP -f EUC-JP ja_JP
localedef コマンド (UTF-8)% sudo /usr/compat/linux/usr/bin/localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
| Log in | RSS1.0 | Atom0.3 | (C) 2024 ブログ JUGEM Some Rights Reserved. |