[encoder] Improved motion estimation.
[schroedinger/research-port.git] / misc / encode_vts_streams
blob24e72e4d7b7879e5cfdb571a969df1f921733bb7
1 #!/bin/sh
3 mediadir=/home/ds/media
5 all="SD-default SD-VBR-10dB SD-VBR-20dB SD-VBR-30dB SD-VBR-40dB \
6 SD-CBR-250kb SD-CBR-500kb \
7 SD-CBR-1Mb SD-CBR-2Mb SD-LD-40Mb SD-LD-10Mb SD-lossless SD-intra-only"
9 list="$all"
10 #list=SD-default
12 extraopts=""
14 trap exit INT
16 get_profile() {
17 case $1 in
18 SD-default) schroopts="" ;;
19 SD-VBR-10dB) schroopts="rate-control=0 noise-threshold=10" ;;
20 SD-VBR-20dB) schroopts="rate-control=0 noise-threshold=20" ;;
21 SD-VBR-30dB) schroopts="rate-control=0 noise-threshold=30" ;;
22 SD-VBR-40dB) schroopts="rate-control=0 noise-threshold=40" ;;
23 SD-CBR-250kb) schroopts="rate-control=1 bitrate=250000" ;;
24 SD-CBR-500kb) schroopts="rate-control=1 bitrate=500000" ;;
25 SD-CBR-1Mb) schroopts="rate-control=1 bitrate=1000000" ;;
26 SD-CBR-2Mb) schroopts="rate-control=1 bitrate=2000000" ;;
27 SD-LD-40Mb) schroopts="rate-control=2 bitrate=41472000 intra-wavelet=1" ;;
28 SD-LD-20Mb) schroopts="rate-control=2 bitrate=20736000 intra-wavelet=1" ;;
29 SD-LD-10Mb) schroopts="rate-control=2 bitrate=10368000 intra-wavelet=1" ;;
30 SD-lossless) schroopts="rate-control=3" ;;
31 SD-intra-only) schroopts="gop-structure=1" ;;
32 esac
35 encode() {
36 # engine3
37 get_profile $prof
38 output=$file.$prof.drc
39 gst-launch-0.10 videotestsrc num-buffers=300 ! \
40 cairotimeoverlay ! \
41 cairotextoverlay text="$prof" halign=left deltay=-100 ! \
42 ffmpegcolorspace ! \
43 video/x-raw-yuv,format=\(fourcc\)"UYVY",width=$width,height=$height,framerate=$framerate,pixel-aspect-ratio=$par ! \
44 ffmpegcolorspace ! \
45 schroenc $schroopts $extraopts ! \
46 filesink location=$output
49 encode_all() {
50 input=$mediadir/$subdir/$file.yuv
51 size=$(($height*$width*2))
53 for each in $list
55 prof=$each
56 encode
57 done
61 height=480
62 width=720
63 par=10/11
64 framerate=30/1
65 file=vts
67 encode_all