diff options
author | Michael Hanson <hansonorders@verison.net> | 2010-05-04 00:27:08 (GMT) |
---|---|---|
committer | Michael Hanson <hansonorders@verison.net> | 2010-05-04 00:27:08 (GMT) |
commit | b94d28649509115ec6821da376f88d284fe34e1f (patch) | |
tree | cdf0401200e0c93693237158e4cbc1497187f680 /abs/core-testing/test-pattern | |
parent | 4629a7669ffba21068576ca8aac2c2051d360536 (diff) | |
parent | 53625148909b257564b35ba93ff3f4fd18f983df (diff) | |
download | linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.zip linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.tar.gz linhes_pkgbuild-b94d28649509115ec6821da376f88d284fe34e1f.tar.bz2 |
Merge branch 'master' of mihanson@knoppmyth.net:LinHES-PKGBUILD
Diffstat (limited to 'abs/core-testing/test-pattern')
-rw-r--r-- | abs/core-testing/test-pattern/PKGBUILD | 4 | ||||
-rwxr-xr-x | abs/core-testing/test-pattern/test_pattern.bash | 155 |
2 files changed, 96 insertions, 63 deletions
diff --git a/abs/core-testing/test-pattern/PKGBUILD b/abs/core-testing/test-pattern/PKGBUILD index db15a0d..7ac825b 100644 --- a/abs/core-testing/test-pattern/PKGBUILD +++ b/abs/core-testing/test-pattern/PKGBUILD @@ -1,6 +1,6 @@ pkgname=test-pattern pkgver=1.0 -pkgrel=4 +pkgrel=6 arch=('i686') pkgdesc="script to create test pattern videos" depends=(imagemagick) @@ -13,4 +13,4 @@ build() { install -m755 -D test_pattern.bash $startdir/pkg/usr/bin/test_pattern.bash } -md5sums=('fbe06cf5a38090e2242f4c3e42f3fc7a') +md5sums=('3a427a5dee0763c6b0a5938fedbde883') diff --git a/abs/core-testing/test-pattern/test_pattern.bash b/abs/core-testing/test-pattern/test_pattern.bash index 6e7fff9..d220fb0 100755 --- a/abs/core-testing/test-pattern/test_pattern.bash +++ b/abs/core-testing/test-pattern/test_pattern.bash @@ -8,8 +8,10 @@ rate=50 TEMPDIR= unset remove_tempdir interlaced= +aspect_ratio= +bitrate= -while getopts ":w:h:t:r:i" opt; do +while getopts ":w:h:t:r:ia:b:" opt; do case $opt in w) w=$OPTARG @@ -26,8 +28,14 @@ while getopts ":w:h:t:r:i" opt; do i) interlaced=TRUE ;; + a) + aspect_ratio=$OPTARG + ;; + b) + bitrate=$OPTARG + ;; \?) - echo -n"\ + echo -n "\ Error: Invalid option -$OPTARG Usage: @@ -38,14 +46,28 @@ Usage: The height in pixels. -t tempdir Temporary directory for intermediate files. If no directory is specified, one is created and deleted at the end of processing. - -r framerate + -r fieldrate -i Generate an interlaced test pattern + -a n:m + Aspect ratio of generated video. + -b bitrate + Bitrate used for encoding. + +Example: +test_pattern.bash -w 1440 -h 1080 -t temp -r 50 -i -a 16:9 -b 12000k " exit 1 esac done +if [ -z "$aspect_ratio" ] ; then + aspect_ratio="${w}:${h}" +fi + +aspectx=$(echo $aspect_ratio | cut -d: -f1) +aspecty=$(echo $aspect_ratio | cut -d: -f2) + # Calculate some dimensions based on the requested size. barw=$((w/32)) @@ -54,14 +76,18 @@ barstart=$((-barw/barstep-1)) frames=$((w/2)) -unit=$((h*2/27)) -gridlw=$((unit*3/43)) +unity=$((h*2/27)) +unitx=$((unity*aspecty*w/(aspectx*h))) +gridlw=$((unity*3/43)) + +echo unity=$unity +echo unitx=$unitx -nvgrid=$(((h-gridlw)/unit)) -nhgrid=$(((((w-gridlw)/unit)-1)/2*2+1)) +nvgrid=$(((h-gridlw)/unity)) +nhgrid=$(((((w-gridlw)/unitx)-1)/2*2+1)) -gridstartx=$((w/2-(nhgrid*unit+gridlw)/2-1)) -gridstarty=$((h/2-(nvgrid*unit+gridlw)/2-1)) +gridstartx=$((w/2-(nhgrid*unitx+gridlw)/2-1)) +gridstarty=$((h/2-(nvgrid*unity+gridlw)/2-1)) echo nvgrid=$nvgrid echo nhgrid=$nhgrid @@ -86,88 +112,88 @@ checker=( -fill "rgb(192,192,192)" ) for ((g=-9;g<=7;g=g+2)) ; do checker=( "${checker[@]}" -draw - "rectangle $((w/2+g*unit*7/10)),$((gridstarty+unit*3+gridlw)) $((w/2+(g+1)*unit*7/10)),$((gridstarty+unit*4+gridlw))" ) + "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) done checker=( "${checker[@]}" -fill black ) for ((g=-8;g<=8;g=g+2)) ; do checker=( "${checker[@]}" -draw - "rectangle $((w/2+g*unit*7/10)),$((gridstarty+unit*3+gridlw)) $((w/2+(g+1)*unit*7/10)),$((gridstarty+unit*4+gridlw))" ) + "rectangle $((w/2+g*unitx*7/10)),$((gridstarty+unity*3+gridlw)) $((w/2+(g+1)*unitx*7/10)),$((gridstarty+unity*4+gridlw))" ) done unset stripe stripe=( -fill white ) for ((g=0;g<5;g++)) ; do - startx=$((w/2+(3-g*2)*unit)) - endx=$((startx+2*unit)) + startx=$((w/2+(3-g*2)*unitx)) + endx=$((startx+2*unitx)) for ((x=startx;x<endx;x=x+2*(g+1))) ; do stripe=( "${stripe[@]}" -draw - "rectangle $x,$((gridstarty+unit*7+gridlw)) $((x+g)),$((gridstarty+unit*9+gridlw))" ) + "rectangle $x,$((gridstarty+unity*7+gridlw)) $((x+g)),$((gridstarty+unity*9+gridlw))" ) done done for ((g=0;g<13;g++)) ; do stripe=( "${stripe[@]}" -draw - "rectangle $((gridstartx+(nhgrid/2-6+g)*unit)),$((gridstarty+unit*6+gridlw)) $((gridstartx+(nhgrid/2-6+g)*unit+gridlw)),$((gridstarty+unit*7+gridlw-1))" ) + "rectangle $((gridstartx+(nhgrid/2-6+g)*unitx)),$((gridstarty+unity*6+gridlw)) $((gridstartx+(nhgrid/2-6+g)*unitx+gridlw)),$((gridstarty+unity*7+gridlw-1))" ) done convert -size ${w}x${h} xc:white \ -fill "rgb(204,204,0)" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-4*unit)),$((gridstarty+unit*6+gridlw))" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*11+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*13+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*6+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*11+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*13+gridlw))" \ -fill "rgb(0,204,204)" \ - -draw "rectangle $((w/2-4*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-2*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(0,204,0)" \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*4+gridlw)) $((w/2-0*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(204,0,204)" \ - -draw "rectangle $((w/2-0*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*6+gridlw))" \ -fill "rgb(204,0,0)" \ - -draw "rectangle $((w/2+2*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+4*unit)),$((gridstarty+unit*6+gridlw))" \ - -draw "rectangle $((w/2-unit/2)),$((gridstarty+unit*11+gridlw)) $((w/2+unit/2)),$((gridstarty+unit*13+gridlw))" \ + -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*6+gridlw))" \ + -draw "rectangle $((w/2-unitx/2)),$((gridstarty+unity*11+gridlw)) $((w/2+unitx/2)),$((gridstarty+unity*13+gridlw))" \ -fill "rgb(0,0,204)" \ - -draw "rectangle $((w/2+4*unit)),$((gridstarty+unit*4+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*6+gridlw))" \ + -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*4+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*6+gridlw))" \ \ -fill black \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*6+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*9+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*6+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*9+gridlw))" \ "${stripe[@]}" \ -fill black \ - -draw "rectangle $((w/2-(unit-gridlw)/2)),$((gridstarty+unit*5+gridlw)) $((w/2+(unit-gridlw)/2-1)),$((gridstarty+unit*8+gridlw))" \ + -draw "rectangle $((w/2-(unitx-gridlw)/2)),$((gridstarty+unity*5+gridlw)) $((w/2+(unitx-gridlw)/2-1)),$((gridstarty+unity*8+gridlw))" \ -fill white \ - -draw "rectangle $((w/2-6*unit)),$((h/2-gridlw/2)) $((w/2+6*unit)),$((h/2-gridlw/2+gridlw))" \ - -draw "rectangle $((w/2-gridlw/2)),$((gridstarty+unit*5+gridlw)) $((w/2-gridlw/2+gridlw)),$((gridstarty+unit*8+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((h/2-gridlw/2)) $((w/2+6*unitx)),$((h/2-gridlw/2+gridlw))" \ + -draw "rectangle $((w/2-gridlw/2)),$((gridstarty+unity*5+gridlw)) $((w/2-gridlw/2+gridlw)),$((gridstarty+unity*8+gridlw))" \ \ -fill "rgb(0,0,0)" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-4*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-4*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(51,51,51)" \ - -draw "rectangle $((w/2-4*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-2*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-2*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(102,102,102)" \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*9+gridlw)) $((w/2-0*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2-0*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(153,153,153)" \ - -draw "rectangle $((w/2-0*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2-0*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(204,204,204)" \ - -draw "rectangle $((w/2+2*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+4*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2+2*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+4*unitx)),$((gridstarty+unity*10+gridlw))" \ -fill "rgb(255,255,255)" \ - -draw "rectangle $((w/2+4*unit)),$((gridstarty+unit*9+gridlw)) $((w/2+6*unit)),$((gridstarty+unit*10+gridlw))" \ + -draw "rectangle $((w/2+4*unitx)),$((gridstarty+unity*9+gridlw)) $((w/2+6*unitx)),$((gridstarty+unity*10+gridlw))" \ \ -fill black \ - -draw "rectangle $((w/2-2*unit)),$((gridstarty+unit*1+gridlw)) $((w/2+2*unit)),$((gridstarty+unit*2+gridlw))" \ - -draw "rectangle $((w/2-6*unit)),$((gridstarty+unit*2+gridlw)) $((w/2-3*unit)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((w/2+6*unit)),$((gridstarty+unit*2+gridlw)) $((w/2+3*unit)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unit)),$((gridstarty+unit*2+gridlw)) $((gridstartx+(nhgrid/2-2)*unit+gridlw)),$((gridstarty+unit*3+gridlw))" \ - -draw "rectangle $((w/2-3*unit+1)),$((gridstarty+unit*10+gridlw)) $((w/2+3*unit)),$((gridstarty+unit*11+gridlw))" \ + -draw "rectangle $((w/2-2*unitx)),$((gridstarty+unity*1+gridlw)) $((w/2+2*unitx)),$((gridstarty+unity*2+gridlw))" \ + -draw "rectangle $((w/2-6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2-3*unitx)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((w/2+6*unitx)),$((gridstarty+unity*2+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*2+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*3+gridlw))" \ + -draw "rectangle $((w/2-3*unitx+1)),$((gridstarty+unity*10+gridlw)) $((w/2+3*unitx)),$((gridstarty+unity*11+gridlw))" \ -fill white \ - -draw "rectangle $((gridstartx+(nhgrid/2-2)*unit)),$((gridstarty+unit*10+gridlw)) $((gridstartx+(nhgrid/2-2)*unit+gridlw)),$((gridstarty+unit*11+gridlw))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-2)*unitx)),$((gridstarty+unity*10+gridlw)) $((gridstartx+(nhgrid/2-2)*unitx+gridlw)),$((gridstarty+unity*11+gridlw))" \ "${checker[@]}" \ ${TEMPDIR}/centre.png convert -size ${w}x${h} xc:black \ -fill white \ - -draw "circle $((w/2)),$((h/2)) $((w/2)),$((h/2-6*unit))" \ + -draw "ellipse $((w/2)),$((h/2)) $((6*unitx)),$((6*unity)) 0,360" \ ${TEMPDIR}/circle.png unset drawgrid @@ -175,38 +201,38 @@ drawgrid=( -fill white ) for ((g=0;g<=$nhgrid;g++)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle $((gridstartx+g*unit)),0 $((gridstartx+g*unit+gridlw)),$h" ) + "rectangle $((gridstartx+g*unitx)),0 $((gridstartx+g*unitx+gridlw)),$h" ) done for ((g=0;g<=$nvgrid;g++)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle 0,$((gridstarty+g*unit)) $w,$((gridstarty+g*unit+gridlw))" ) + "rectangle 0,$((gridstarty+g*unity)) $w,$((gridstarty+g*unity+gridlw))" ) done drawgrid=( "${drawgrid[@]}" -draw "rectangle 0,0 $gridstartx,$h" -draw "rectangle 0,0 $w,$gridstarty" - -draw "rectangle $w,$h $((gridstartx+nhgrid*unit)),0" - -draw "rectangle $w,$h 0,$((gridstarty+nvgrid*unit))" + -draw "rectangle $w,$h $((gridstartx+nhgrid*unitx)),0" + -draw "rectangle $w,$h 0,$((gridstarty+nvgrid*unity))" -fill black ) for ((g=0;g<=$nhgrid;g=g+2)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle $((gridstartx+g*unit+gridlw+1)),0 $((gridstartx+(g+1)*unit)),$((gridstarty-1))" + "rectangle $((gridstartx+g*unitx+gridlw+1)),0 $((gridstartx+(g+1)*unitx)),$((gridstarty-1))" -draw - "rectangle $((gridstartx+g*unit+gridlw+1)),$((gridstarty+nvgrid*unit+gridlw+1)) $((gridstartx+(g+1)*unit)),$h" + "rectangle $((gridstartx+g*unitx+gridlw+1)),$((gridstarty+nvgrid*unity+gridlw+1)) $((gridstartx+(g+1)*unitx)),$h" ) done for ((g=0;g<=$nvgrid;g=g+2)) ; do drawgrid=( "${drawgrid[@]}" -draw - "rectangle 0,$((gridstarty+g*unit+gridlw+1)) $((gridstartx-1)),$((gridstarty+(g+1)*unit-1))" + "rectangle 0,$((gridstarty+g*unity+gridlw+1)) $((gridstartx-1)),$((gridstarty+(g+1)*unity-1))" -draw - "rectangle $((gridstartx+nhgrid*unit+gridlw+1)),$((gridstarty+g*unit+gridlw+1)) $w,$((gridstarty+(g+1)*unit-1))" + "rectangle $((gridstartx+nhgrid*unitx+gridlw+1)),$((gridstarty+g*unity+gridlw+1)) $w,$((gridstarty+(g+1)*unity-1))" ) done @@ -227,21 +253,21 @@ convert -size ${w}x${h} xc:grey50 \ "${diagonals[@]}" \ "${drawgrid[@]}" \ -fill "rgb(51,153,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2-6)*unit-1)),$((h/2))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((h/2))" \ -fill "rgb(204,102,102)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-7)*unit+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2-6)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2-6)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unit)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unit-1)),$((gridstarty+unit*3-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*3-1))" \ -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2-6)*unit)),$((gridstarty+10*unit+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2-6)*unitx)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2-5)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(128,128,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2+8)*unit-1)),$((h/2))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((h/2))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+7)*unit+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2+8)*unit-1)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+7)*unitx+gridlw+1)),$((h/2)) $((gridstartx+(nhgrid/2+8)*unitx-1)),$((gridstarty+unity*12-1))" \ -fill "rgb(102,102,255)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unit+gridlw+1)),$((gridstarty+unit+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unit+gridlw)),$((gridstarty+unit*3-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*3-1))" \ -fill "rgb(153,102,0)" \ - -draw "rectangle $((gridstartx+(nhgrid/2+6)*unit+gridlw+1)),$((gridstarty+10*unit+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unit+gridlw)),$((gridstarty+unit*12-1))" \ + -draw "rectangle $((gridstartx+(nhgrid/2+6)*unitx+gridlw+1)),$((gridstarty+10*unity+gridlw+1)) $((gridstartx+(nhgrid/2+7)*unitx+gridlw)),$((gridstarty+unity*12-1))" \ ${TEMPDIR}/grid.png convert -size ${w}x${h} ${TEMPDIR}/grid.png ${TEMPDIR}/centre.png ${TEMPDIR}/circle.png -composite ${TEMPDIR}/background.png @@ -262,10 +288,10 @@ for ((i=0; i < $frames; i++)) ; do -fill black \ -draw "rectangle $(((barstart+i)*barstep)),0 $(((barstart+i)*barstep+barw)),${h}" \ -font Arial-Black-Regular \ - -pointsize $unit \ + -pointsize $unity \ -fill white \ - -stroke black -strokewidth 5 -annotate +$((w-2*i))+$((gridstartx+11*unit)) 'Judder Test' \ - -stroke none -annotate +$((w-2*i))+$((gridstartx+11*unit)) 'Judder Test' \ + -stroke black -strokewidth 5 -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ + -stroke none -annotate +$((w-2*i))+$((gridstartx+11*unity)) 'Judder Test' \ -depth 8 \ ${image_name} @@ -280,12 +306,19 @@ for ((i=0; i < $frames; i++)) ; do fi done +bitrate_flags= +if [ -n "$bitrate" ] ; then + bitrate_flags="-b $bitrate" +fi + if [ -n "$interlaced" ] ; then ffmpeg -r ${rate} -i ${TEMPDIR}/interlaced%03d.png -r ${rate} \ - -vcodec mpeg2video -flags +ilme+ildct -y test.mpg + -vcodec mpeg2video -flags +ilme+ildct -aspect $aspect_ratio \ + ${bitrate_flags} -y test.mpg else ffmpeg -r ${rate} -i ${TEMPDIR}/test%03d.png -r ${rate} \ - -vcodec mpeg2video -y test.mpg + -vcodec mpeg2video -aspect $aspect_ratio \ + ${bitrate_flags} -y test.mpg fi if [ -n "$remove_tempdir" ] ; then |