2014年5月27日 星期二

install lxqt on archlinux

update: 2014-6-6
lxqt 就是 lxde 的 qt 版?!
可能沒有這麼簡單吧。整個使用的感覺很不錯,比 lxde 容易,預設就好看得多。可能是我原先是用 KDE,一些設定都可以共用吧。

安裝

$ yaourt -S lxqt-desktop-git qterminal-git --nofonfirm

.
.
.
.

If you upgraded LXQt from <0.7.0, you may need to reset your lxqt-session settings
Do that with the following command: rm ~/.config/lxqt/session.conf
lxqt-desktop-git 的可選依賴
pcmanfm-qt-git: The LXQt file manager
lximage-qt-git: The LXQt image viewer
openbox: Recommended window manager
sddm-git: Recommended display manager
qterminal: Pure Qt terminal
juffed: Pure Qt text editor (Kate clone)
screengrab: Screenshot capture
qps: Task Monitoring
上面的可選依賴全部沒裝,等以後有時間再來玩。目前先用 kde 的軟體搭配。

配置

好像也沒配置什麼,就 panel 上加了系統資訊的小元件。反正就在 panel 上按滑鼠右鍵,然後就照 menu 上的指示操作,不難。 然後,把 panel 放到桌面的上方。 當然,目前看起來只有英文介面,還是得等一段時間,讓 lxqt 團隊撰寫。 目前 lxqt 真的可以用了,很順。

~/.config/lxqt/panel.desktop

panel 上有一個 quicklaunch,上面放了常用的軟體。這個的設定好像就得去修改 ~/.config/lxqt/panel.desktop
[quicklaunch]
type=quicklaunch
apps\size=4
apps\1\desktop=google-chrome.desktop
apps\2\desktop=dolphin.desktop
apps\3\desktop=emacs.desktop
apps\4\desktop=
alignment=Left

修改預設的 wm

進 ~/.config/lxqt/session.desktop ,修改
window_manager=xmonad
是的,我用的是 xmonad 這個 twm,而且是這樣設定就好了。 目前為止,與 lxqt 配合得很好。至少比 kde 順,不會有一堆煩人的 plasma 軟體閃來閃去。

配合 KDE

使用 oxygen-gtk

1. 依據 Archlinux Wiki 說明,
Note: Before KDE 4.10, you needed to create the file ~/.kde4/share/config/gtkrc-2.0,
or let it automatically create like described below.
But that is actually counter-productive with KDE 4.10’s oxygen-gtk,
and you should delete this file after upgrading to prevent it from messing with your colors.
Cleanup-removal of ~/.kde4/share/config/gtkrc might be necessary, too.
我把 gtkrc 與 gtkrc-2.0 這兩個檔砍了。
  1. 進 lxqt 外觀設定,把 widget style 改為 oxygen。

使用 qtconfig

要用 qtconfig 前,先要設定以下的環境變數,否則沒法開啟。 不過,qtconfig 也不好用,尤其是 fonts,無論怎麼設定,下次回來又會變成預設值。
export QTCHOOSER_RUNTOOL=qtconfig
export QT_SELECT=4

停用 lxqt-runner 與 lxqt-powermanagement

lxqt-runner 要進 lxqt 快捷鍵,把 Alt-F2 的 enable 取消掉。用 kupfer 取代。 lxqt-powermanagement 直接進 Power Management 中,將所有功能取消。我用的是桌機,不是筆記本。 是不是乾脆不要裝這 2 個就好了?因為與 lxqt-desktop-git 相依,暫時先不處理。

結論

以前用 lxde 就覺得很不錯,也用了一整年。轉到 kde 是因為 htc 的關係。現在,我又回來試 lxqt,初步的感覺很好。 只要能解決以下 3 個問題
  1. mtp,解決與 htc 連線的需求。
  2. usb automount,這個應該不難。archlinux wiki 中有一些描述,可以試試。
  3. qbittorrent 中,能正確地開啟檔案所在目錄。現在是時有時無。
那就滿足地用 lxqt,感謝這個 team 的努力,讓我有個不錯的桌面可用。

後記

在安裝 lxqt 的過程中,看到了一個看圖軟體,看起來不錯用,先記錄下來吧,免得忘了。 nomacs ,有空再研究。

2013年6月5日 星期三

ffmpeg 使用心得







使用了一陣子的 FFMpeg 處理影片,越用越喜歡這套軟體。
一開始,為了要將影片轉成 ipod touch 3代,可用的格式,特別學習
ffmpeg,試了好幾天,終於找出來滿意的方法,特此記錄下來,免得忘了。

轉檔時的指令

ffmpeg -i $1 -s 720x406 -vpre ipod -ac 2 -sn -y -vf subtitles=$1.srt $1.m4v
其中
-i \$1 是要轉檔的檔名
-s 720x406 是轉檔後的解析度,406 = 720 * 720 /
1280,(原始檔的解析度為
1280x720)。這個一定要去計算,不然,在電視上看,畫面比例會不對,字幕可能出不來。
-vpre ipod 是為了 ipod 特別找出來的 preset,設定如後。
--ac 2 是轉成立體聲,不然 ipod touch 沒辦法播放。
--sn 不顯示原始檔中的字幕。因為,我要用另外的字幕檔。
--vf subtitles 為 srt 字幕檔。

preset設定

preset 可以放在 \~/.ffmpeg,檔名為 arg.ffpreset。
例如,我設定了一個專門轉到 ipod touch 的 preset 檔,命名為
ipod.ffpreset。 :
strict=-2

vcodec=libx264
vprofile=main
level=30
maxrate=10000000
bufsize=10000000

preset=fast
#preset=slower

crf=20
#bf=0
#refs=1

#ab=192k

字幕

參考 How to burn subtitles into the
video

原檔中已有圖片格式的字幕時,可直接燒錄:

-filter_complex '[0:v][0:s:1]overlay[v]' -map [v] -map 0:a
此處 -map 一定要下,不然會有錯誤訊息。 其中 -map 0:a
是指所有的音軌,也可以直接指定音軌 -map 0:1
出現的訊息如下:
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #0:4 (pgssub) -> overlay:overlay (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)

加入外部字幕檔

1. 自行編輯字幕檔

這個很少用到,在 linux 中,就找到 aegisub
是可用的,那就拿來用了,沒有什麼特別的考慮。

2. 提取 mkv 內 srt 或 ass 字幕

提取 mkv 內的文字字幕,用 :
ffmpeg -i $1.mkv -vn -an -scodec copy $1.ssa
或:
ffmpeg -i \$1.mkv -vn -an -scodec copy \$1.srt
有時會出現下列的錯誤訊息,內嵌的應該就是圖片格式字幕。 :
Could not write header for output file #0 (incorrect codec parameters ?): Operation not permitted
爲了能改變字型大小,使用 ass 格式。

3. srt

先轉成 ssa 檔,
ffmpeg -i s.srt s.ssa
s.ssa 中加上
; 同步字幕
Synch Point:0
; PlayResX/Y 影片解析度
PlayResX:720
PlayResY:480
; 調整字幕速度
Timer:100.0000
作出 ssa 檔後,可以用文字編輯器開啓,修改一下 fontname 和
fontsize,讓字型美一點。 各參數用法見 ASS
字幕格式

如果不想控制字幕格式,就不須轉成 ass 格式,就用下列指令燒錄到影片。
-vf subtitles=sub.srt

4. 字幕轉成繁體

可以再用 opencc 把字幕轉成繁體:
opencc -i $1.ssa -o o.ssa

5. ass

用 -vf 燒錄到影片中。
-vf ass=s.ssa
或直接加入影片中,不是燒錄上去。
ffmpeg -i video.avi -i sub.ass -map 0:0 -map 0:2 -map 1 -c:a copy -c:v copy -c:s copy video.mkv
其中 video.avi 有一個視頻軌、兩個音頻軌,取其中的視頻軌 (mpa 0:0)
和第二個音頻軌 (map 0:2) 加 sub.ass (map 1) 做成 video.mkv
而不重新編碼。
重點注意: -i sub.ass -map 1 -c:s copy。 此處的 sub.ass 也可以是
sub.srt。

合併多個影片

參考 How to concatenate (join, merge) media
files

mpeg:
ffmpeg -i "concat:input1.mpg|input2.mpg|input3.mpg" -c copy output.mpg
not mpeg:
This is easiest to explain using an example::

    ffmpeg -i input1.mp4 -i input2.webm \
    -filter_complex '[0:0] [0:1] [1:0] [1:1] concat=n=2:v=1:a=1 [v] [a]' \
    -map '[v]' -map '[a]' <encoding options> output.mkv

On the -filter_complex line, the following:

'[0:0] [0:1] [1:0] [1:1]
tells ffmpeg what streams to send to the concat filter;
in this case, streams 0 and 1 from input 0 (input1.mp4 in this example),
and streams 0 and 1 from input 1 (input2.webm).

concat=n=2:v=1:a=1 [v] [a]'
This is the concat filter itself. n=2 is telling the filter that there are two input files;
v=1 is telling it that there will be one video stream;
a=1 is telling it that there will be one audio stream.
[v] and [a] are names for the output streams, to allow the rest of the ffmpeg line to use the output of the concat filter.

Note that the single quotes ' ' around the whole filter section are required.

-map '[v]' -map '[a]'
This tells ffmpeg to use the results of the concat filter rather than
the streams directly from the input files.

catflv

寫了個小小的 script,用來合併 flv,並轉成 ipod可用的 mp4。 :
#!/bin/bash

icnt=0

for file in $@
do
    filenames="$filenames -i $file "
    scat="$scat[$icnt:0][$icnt:1]"

    #echo $filenames, [$icnt], $scat
    icnt=$(($icnt+1))

done

scmd="ffmpeg $filenames -filter_complex '$scat concat=n=$#:v=1:a=1 [v] [a]' -map '[v]' -map '[a]' -vpre ipod -ab 132k out.mp4"
echo $scmd
eval $scmd

DVD備份

DVD to ISO

爲了保存有價值的影片,儘量用比較高品質的壓縮方法。
​1. 參考:Encoding DVD into HQ flash video using
ffmpeg

將 DVD copy 成 ISO 檔,並掛上: :
$ dd if=/dev/cdrom of=dvd.iso
$ mkdir mnt
$ sudo mount dvd.iso mnt -o loop
$ ls -al mnt/
total 10
dr-xr-xr-x 4 4294967295 4294967295  136 2009-09-30 20:45 .
drwxr-xr-x 5 dpavlin    dpavlin    4096 2009-10-15 22:01 ..
dr-xr-xr-x 2 4294967295 4294967295   40 2009-09-30 17:25 AUDIO_TS
dr-xr-xr-x 2 4294967295 4294967295  560 2009-09-30 18:45 VIDEO_TS
​2. 或使用 dvdbackup,就不必再 mount dvd.iso,而且可以用 libdvdcss
解除保護。
yaourt -S dvdbackup libdvdcss
dvdbackup -i /dev/cdrom -M -o ~/dvd_backup

DVD to MKV

先將 ISO 轉成 MKV :
cat VTS_01_[1234].VOB | ffmpeg -i - -probesize 214748000 -analyzeduration 214748000 \
-map 0:0 -map 0:1 -map 0:2 \
-crf 18 -preset veryslow -tune help\
-filter:v yadif \
-c:a copy -c:s copy -y a.mkv
-probesize 214748000 -analyzeduration 214748000
有時會因爲音軌或字幕軌太晚出現,ffmpeg
會偵測不到,這時就加長偵測的時間和大小。
-map 0:0 -map 0:1 -map 0:2 是要封裝到 mkv 的軌道。
-crf 18 -preset veryslow
用這個參數大概就好了,眼睛看不出來與原始有何差異。 有必要時可以再加上
-tune。
-filter:v yadif 就是 deinterlace。
-c:a copy -c:s copy 音軌和字幕軌都不重新編碼。
如果沒有字幕,可以先取得字幕檔,再保存到 mkv 中,如下: :
$ cat VTS_01_[1234].VOB | ffmpeg -i - -i a.ssa \
-map 0:0 -map 0:2 -map 1 \
-crf 18 -preset veryslow -tune zerolatency \
-filter:v yadif \
-c:a copy -c:s copy \
-y a.mkv
重點是 -i a.ssa -map 1 -c:s copy

MKV 轉成 mp4

如果要在 ipod 或智慧型手機上看,那就不需要太考慮品質,能用就好。
就用上面轉好的 mkv 檔,再轉一次。 如此,既可以用 mkv
保存高品質的影片,再轉成 mp4 的速度也比較快。
這是要注意字幕是圖片格式或是 srt/ass 文字式。

字幕是圖片格式

用 -filter_complex 直接燒錄 :
$ ffmpeg -i a.mkv \
-filter_complex '[0:v][0:s:1]overlay[v]' -map [v] -map 0:a \
-vpre ipod -ac 2 -ab 192k \
-y a.mp4

字幕是 srt 或 ass


  1. 先處理字幕檔 (前述)

  2. 用 -vf subtiles=a.srt 或 -vf ass=a.ass 把字幕燒進 mp4 中。 :
    $ ffmpeg -i a.mkv \
    -vpre ipod -ac 2 -ab 192k \
    -vf subtitles=a.srt \
    -y a.mp4
    

metadata

參考 ffmpeg
-metadata[:metadata_specifier] key=value (output,per-metadata) Set a
metadata key/value pair.
An optional metadata_specifier may be given to set metadata on streams
or chapters. See -map_metadata documentation for details.
This option overrides metadata set with -map_metadata. It is also
possible to delete metadata by using an empty value.
For example, for setting the title in the output file :
ffmpeg -i in.avi -metadata title="my title" out.flv
To set the language of the first audio stream :
ffmpeg -i INPUT -metadata:s:a:1 language=eng OUTPUT
例子: :
-metadata:s:1 title="日語" -metadata:s:2 title="國語" -metadata:s:3 title="中文"

參考資料


  1. FFmpeg wiki:
    x264EncodingGuide

  2. 直接看 help :
    $ ffmpeg --help
    $ x264 --fullhelp
    

2013年5月3日 星期五

太極拳進度20130503

玉女穿梭,第二、四式,第三動:右腳出去的時候,不是用搬的,而是右腳整個虛掉,由左腳湧泉帶動,旋到定位。轉左掤時,手不可拉回來,要飄下來到定位,拉回來,推手的空間都不見了。

今天的進度是「按」。這個真不好練,因爲,人的習慣就是會想要用力,上半身就會先動。

我的認知是:吐氣,落胯,胯向前平移,不可以向上撐起,整個上半身向下鬆。不要想着要把人打出去,只要平移就好。說的是很簡單,練起來就不是那麼一回事了。都是因爲習慣,下意識會想用力。所以太極拳難練,難練在要改這些習慣。

2013年4月26日 星期五

太極拳進度20130426

這禮拜就專心練習「左掤」第二動。
這時最後,我被叫出去改正的式子。原以爲已經打得不錯了,結果,才一動,就被指正,胯跑出去。

心得是,左胯要像門軸,不能向外跑。是裏面帶動外面,下面指揮上面,而不是上身先動。上身先動,胯就一定會跑出去。
後來終於感覺到,左邊的臀部是如何「鬆」下到湧泉。
才這麼一下,左腳好酸啊。

抄錄《道幾》的話:虛腳之換形移位,重心移動時,必須以自己重心交替於實腳湧泉之慣性動作餘勢,帶動虛腳之換形移位。虛腳絕對不可自動。

拳架後是單練「推手」、「大(扌履)」。

本週繼續「推戰車」,重點有以下幾點:

  1. 右胯不能先頂出去,這一點老是搞不定。莊教練乾脆叫我用單腳晃動,真的有一點找到感覺。
  2. 上身不要向前傾,這一點其實是上一點的問題。
  3. 不要哈腰。

我看莊教練接到的時候,整個上身就像是一個「樁」,隨著胯向下沉,就像他說的,直線拉好。

2013年4月12日 星期五

太極拳進度20130412

二炁陰陽盪逍遙,前手出氣,後手吸氣,很神奇吧,我是試不出來啦。先記住後慢慢練吧。
玉女穿梭,彎弓射虎的手要由夾脊帶動。
彎弓射虎定勢,45度半面向左。左腳上半步,重心落到左腳時,拳變掌。再一個白蛇吐信,左旋,右手掌變拳。
搬攔捶的時候,左手不要拿回來,是身體前進,左手在原地等著,蓋到右手。
「推戰車」,胯不要撐起來,平移就好。鬆下去,接到湧泉就平移,不要想太多,也不要想打出去。我觀察教練的胯,真的就只是平平的移動,很漂亮。
今天練的時候,發現自己的前面還是鬆不下,再練練「六合真氣任我盜」吧。

2013年4月10日 星期三

Tile windows 平鋪式視窗 - Pytyle 3

Tile windows 平鋪式視窗

有的時候,開了很多的視窗,想要看到所有視窗的內容,這個時候,「平鋪式視窗」就很有用了。

因為我用的是 archlinux + lxde,所以就找與 openbox 配合度好的 Pytyle 3 來試試看。

安裝

很簡單,下個指令就裝好了:

yaourt -S pytyle3-git

裝好之後,記得把配置檔 copy 到 ~/.config/pytyle3:

mkdir ~/.config/pytyle3

cp /etc/xdg/pytyle3/*py ~/.config/pytyle3

也就只有 keybind.py 和 config.py 這 2 個檔,可以開起來看看。

執行

在終端機中輸入:

pytyle3

預設的啟動鍵是 A-a,我試著想把它改成 W-a,但沒有成功。查看 ~/.config/pytyle3/keybind.py,可以知道有那些快速鍵,表列如下:

'A-a':       啟動平鋪(tile)
'A-u':       不再平鋪(untile)
'A-h':       減小主視窗 (decrease_master)
'A-l':       加大主視窗 (increase_master)
'A-j':       tile.cmd(prev_client)
'A-k':       tile.cmd(next_client)
'A-Shift-j': tile.cmd(switch_prev_client)
'A-Shift-k': (switch_next_client)
'A-comma':   (remove_master)
'A-period':  增加當前視窗為主視窗(add_master)
'A-Return':  設定當前視窗為主視窗(make_master)
'A-m':       切換到主視窗(focus_master),
'A-z':       切換水平或垂直排列(cycle),

'A-q':       除錯 (debug_state)
'A-Shift-q': 離開,

很好玩的「平鋪式視窗」。不想用的時候,就把 pytyle 關掉,如此就不必裝 dwm, awesome 之類的視窗管理器。

參考文件:

Pytyle on arch wiki

2013年3月29日 星期五

太極拳進度20130328

本週延續上週,還是「推戰車」。在練習之前,先複習了「鳥申」、「二炁陰陽盪逍遙」,特別又糾正「肘底捶」。
重點如下:
「盪逍遙」是軸線不要跑掉,手不要用力,不要用上身轉,肩不可動,用腳底帶動旋轉,注意下手。
「鳥申」的胯鬆下去,身體不要浮起。腳尖不要用力向上勾,而是要去找到炁向下,腳向上的頻率和感覺。
「肘底捶」第三動,手盪下來像熊經的手,不要「死板板」地旋。右手心對心窩,然後,手腳隨著胯送上。
「推戰車」最重要的是上身一定要正,鬆下去,力量接到湧泉後,身體隨著左胯向前平移,胯不可浮起,timing 很重要。不要想著要把對方打出去,這樣子身體就會僵硬,不鬆就是捱打的架子。

2013年3月22日 星期五

太極拳進度20130322

現在拳架越改越細,今天講的是,用腳底帶動,走直線,屁股不要先動。糾正了「倒攆猴」、「單鞭下式」、「退步跨虎、轉身擺蓮」這三式,加強練習「推手單練」。
倒攆猴,當重心向後移的時候,注意不能斜著走,這樣子屁股會凸出,轉的時候就無法將重心維持住,也就不能由腳底發動啦。
單鞭下式注意,膝蓋對腳尖,移位。當向下時,屁股不要凸出。手向後,身體往下鬆,否則,身體就會往前傾。這一式真的不好練。
總而言之,重點在於如鬆胯,由腳底帶動。
「推戰車」,練的是「勁」要能從腳底發出,想要發得出去,timing 很重要。不能等到對方的力量都來了之後,才想要移位,這是已經來不及了。而是當對方的力量來的時候,往下鬆,接到了就移位。我現在是鬆下後,看著後面遠遠的地方,平移向前,勁自然由腳底發出。

ffmpeg 使用心得

ffmpeg 使用心得

為了要將影片轉成 ipod touch 3代,可用的格式,特別學習 ffmpeg,試了好幾天,終於找出來滿意的方法,特此記錄下來,免得忘了。

轉檔時的指令

ffmpeg -i $1 -s 720x406 -vpre ipod -ac 2 -sn -y -vf subtitles=$1.srt $1.m4v

其中

-i $1 是要轉檔的檔名

-s 720x406 是轉檔後的解析度,406 = 720 * 720 / 1280,(原始檔的解析度為 1280x720)。這個一定要去計算,不然,在電視上看,畫面比例會不對,字幕可能出不來。

-vpre ipod 是為了 ipod 特別找出來的 preset,設定如後。

--ac 2 是轉成立體聲,不然 ipod touch 沒辦法播放。

--sn 不顯示原始檔中的字幕。因為,我要用另外的字幕檔。

--vf subtitles 為字幕檔。

preset設定

preset 可以放在 ~/.ffmpeg,檔名為 arg.ffpreset,例如,我設定了一個專門轉到 ipod touch 的 preset 檔,命名為 ipod.ffpreset。

strict=-2

vcodec=libx264
vprofile=baseline
level=30
maxrate=10000000
bufsize=10000000

#preset=fast
preset=slower

crf=19
bf=0
refs=1

ab=192k

調整字幕時間

這個很少用到,在 linux 中,就找到 aegisub 是可用的,那就拿來用了,沒有什麼特別的考慮。

提取 mkv 內嵌字幕

為了要把 mkv 中的字幕,轉成繁體。使用以下三道指令即可:

ffmpeg -i $1.mkv -vn -an -scodec copy $1.ssa
opencc -i $1.ssa -o o.ssa
ffmpeg -i $1 -s 720x406 -vpre ipod -ac 2 -sn -y -vf ass=$1.ssa $1.m4v

參考資料

ffmpeg help

Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Getting help:
    -h      -- print basic options
    -h long -- print more options
    -h full -- print all options (including all format and codec specific options, very long)
    See man ffmpeg for detailed description of the options.

Print help / information / capabilities:
-L                  show license
-h topic            show help
-? topic            show help
-help topic         show help
--help topic        show help
-version            show version
-formats            show available formats
-codecs             show available codecs
-decoders           show available decoders
-encoders           show available encoders
-bsfs               show available bit stream filters
-protocols          show available protocols
-filters            show available filters
-pix_fmts           show available pixel formats
-layouts            show standard channel layouts
-sample_fmts        show available audio sample formats

Global options (affect whole program instead of just one file:
-loglevel loglevel  set libav* logging level
-v loglevel         set libav* logging level
-report             generate a report
-max_alloc bytes    set maximum size of a single allocated block
-y                  overwrite output files
-n                  do not overwrite output files
-stats              print progress report during encoding
-bits_per_raw_sample number  set the number of bits per raw sample
-croptop size       Removed, use the crop filter instead
-cropbottom size    Removed, use the crop filter instead
-cropleft size      Removed, use the crop filter instead
-cropright size     Removed, use the crop filter instead
-padtop size        Removed, use the pad filter instead
-padbottom size     Removed, use the pad filter instead
-padleft size       Removed, use the pad filter instead
-padright size      Removed, use the pad filter instead
-padcolor color     Removed, use the pad filter instead
-vol volume         change audio volume (256=normal)

Per-file main options:
-f fmt              force format
-c codec            codec name
-codec codec        codec name
-pre preset         preset name
-map_metadata outfile[,metadata]:infile[,metadata]  set metadata information of outfile from infile
-t duration         record or transcode "duration" seconds of audio/video
-fs limit_size      set the limit file size in bytes
-ss time_off        set the start time offset
-timestamp time     set the recording timestamp ('now' to set the current time)
-metadata string=string  add metadata
-target type        specify target file type ("vcd", "svcd", "dvd", "dv", "dv50", "pal-vcd", "ntsc-svcd", ...)
-frames number      set the number of frames to record
-filter filter_list  set stream filterchain
-reinit_filter      reinit filtergraph on input parameter changes

Video options:
-vframes number     set the number of video frames to record
-r rate             set frame rate (Hz value, fraction or abbreviation)
-s size             set frame size (WxH or abbreviation)
-aspect aspect      set aspect ratio (4:3, 16:9 or 1.3333, 1.7777)
-bits_per_raw_sample number  set the number of bits per raw sample
-croptop size       Removed, use the crop filter instead
-cropbottom size    Removed, use the crop filter instead
-cropleft size      Removed, use the crop filter instead
-cropright size     Removed, use the crop filter instead
-padtop size        Removed, use the pad filter instead
-padbottom size     Removed, use the pad filter instead
-padleft size       Removed, use the pad filter instead
-padright size      Removed, use the pad filter instead
-padcolor color     Removed, use the pad filter instead
-vn                 disable video
-vcodec codec       force video codec ('copy' to copy stream)
-timecode hh:mm:ss[:;.]ff  set initial TimeCode value.
-pass n             select the pass number (1 to 3)
-vf filter list     video filters
-b bitrate          video bitrate (please use -b:v)
-dn                 disable data

Audio options:
-aframes number     set the number of audio frames to record
-aq quality         set audio quality (codec-specific)
-ar rate            set audio sampling rate (in Hz)
-ac channels        set number of audio channels
-an                 disable audio
-acodec codec       force audio codec ('copy' to copy stream)
-vol volume         change audio volume (256=normal)
-af filter list     audio filters

Subtitle options:
-s size             set frame size (WxH or abbreviation)
-sn                 disable subtitle
-scodec codec       force subtitle codec ('copy' to copy stream)
-stag fourcc/tag    force subtitle tag/fourcc
-fix_sub_duration   fix subtitles duration
-spre preset        set the subtitle options to the indicated preset

參考指令

假設video.avi有一個視頻軌、兩個音頻軌,取其中的視頻軌和第二個音頻軌加sub.ass做成video.mkv而不重新編碼:

ffmpeg -i video.avi -i sub.ass -map 0:0 -map 0:2 -map 1 -c:a copy -c:v copy -c:s copy video.mkv

如果要重新編碼(字幕合成到視頻圖像):

ffmpeg -i video.avi -map 0:0 -map 0:2 -c:a copy -c:v <視頻編碼庫,比如libx264> -vf ass=sub.ass video.mkv

2013年3月8日 星期五

太極拳進度20130308

掤:先練「潑水」。手是由後腳輕輕的送上,肩不可動。
左右分腳:重點在胯,留在原位,不要踢腳,身體纔不會浮起。
摟膝拗步:身體不要先轉,發勁時,遇到阻力,往實腳的湧泉鬆下,手不要折到,不要「貪」。
發勁這玩意還真不好練,碰到阻力就想去「抗」,鬆不下去。看來還要花一點時間。
回家的時候,一路上都看到中華對日本的電視轉播。
到了九局上,又被日本跑回一分,變成了 3 比 3。九局下,中華隊沒有得分,進入延長賽。十局上,又被日本得了 1 分,現在是 3:4,中華隊進攻。
聽到歡呼聲,應該是第七棒張建銘擊出右外野安打,一人出局,一、二壘有人。
很多年沒有看到臺灣為棒球加油的盛況,希望臺灣的棒球能夠復活。
聽到哀嚎聲了,第八棒陳鏞基擊出內野滾地球,造成雙殺,三人出局。
可惜了。