mattfoster / zshkit forked from bkerley/zshkit

My way-overdone zsh config scripts

This URL has Read+Write access

zshkit / 05_video
100644 36 lines (34 sloc) 1.011 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# See: http://omino.com/sw/qt_tools/
if [[ -x `which qt_export` ]]; then
  create_image_mov() {
    if [[ $# = 0 ]]
    then
      echo "Usage: $0 image_name move_name"
      echo "Create movie using png compression."
      echo "Example: $0 watershed_01.png (outputs watershed.mov)"
      echo "Example: $0 watershed_01.png out.mov (outputs out.mov)"
    else
      if [[ $# > 1 ]]
      then
        out=$2
      else
        out=$(echo $aa:r | sed 's/_*[0-9]*//g').mov
      fi
      qt_export --sequencerate=1 $1 --video=png,1 --audio=0 --replacefile $out
    fi
  }
fi
 
if [[ -x `which mencoder` ]]; then
  function mkv_to_avi(){
      # Remux .mkv or .ogm to .avi with mp3 audio.
      input=''
      output=${input:r}.avi
      mencoder $input -oac mp3lame -ovc copy -o $output
  }
 
  function mkv_to_avi(){
      # Convert .mkv or .ogm to .avi with XViD and mp3 audio.
      input=''
      output=${input:r}.avi
      mencoder $input -oac mp3lame -ovc xvid -xvidencopts pass=1 -o $output
  }
fi