Since I've got rotten flu today, and I'm unaccustomed to shell scripts and diffs /patches, this is pretty rough.
however, these modifications seem to work for me in regard of detecting the aspect ratio of the program and altering that of the menu/intro screens to suit. I've made no effort to look at the size/stretching of the menu screens though.
Any comments or improvements are welcome, as are confirmations that it does work for others.
Patch below (hope it works OK, if not let me know):
Quote:
diff -U 3 -H -d -r -N -- mythburn_orig/mythburn/mythtvburn.sh mythburn/mythtvburn.sh
--- mythburn_orig/mythburn/mythtvburn.sh 2006-02-09 16:54:54.298782189 +0000
+++ mythburn/mythtvburn.sh 2006-02-09 14:12:16.000000000 +0000
@@ -412,6 +412,46 @@
checkstopflag ${tempdir}
+#Jim Hayes - get the name of the project x log file
+logfile="${tempdir}/${file%.*}_log.txt"
+
+echo '*************** LOOKING FOR PROJECTX LOG FILE **************************'
+echo $logfile
+echo '************************************************************************'
+#check file exists, if so then get the aspect ratio for the file, otherwise set a default value
+if [ -e "$logfile" ];
+then
+ #we got us a log file
+ echo "Found projectX log file : $logfile"
+ # test it with grep for 16:9, set aspectRatio
+ # aspect ratio 2=4:3 3=16:9 4=2.21:1
+ test=`grep '^\-> video basics.*(16:9)' $logfile`
+ if [ -n "$test" ];
+ then
+ echo '16:9 video found'
+ aspectRatio=3
+ else
+ aspectRatio=2
+ fi
+ #now test for 4:3, if 4:3 is found at all, assume it is 4:3 we want throughout, 16:9 is probably adverts .....
+ test2=`grep '^\-> video basics.*(4:3)' $logfile`
+ if [ -n "$test2" ];
+ then
+ echo '4:3 video found'
+ aspectRatio=2
+ fi
+ #remove the logfile, we no longer need it
+ echo 'deleting projectX logfile'
+ rm $logfile
+else
+# aspect ratio 2=4:3 3=16:9 4=2.21:1
+echo 'LOGFILE NOT FOUND'
+aspectRatio=2
+fi
if [ $index = $((titlesperpage + 1)) ];
then
@@ -496,13 +536,13 @@
videonumber=$(((titlesperpage * (page-1)) + index))
-${scripts}/createscenemenu.sh $myfolder $videonumber $page $totalframes $file $myxml $framerate $pageresolution $highlightimage $submenus ${cutflags[$idx]}
+${scripts}/createscenemenu.sh $myfolder $videonumber $page $totalframes $file $myxml $framerate $pageresolution $highlightimage $submenus ${cutflags[$idx]} $aspectRatio
checkreturnvalue
checkstopflag ${tempdir}
if [ "$submenus" == "no" ]; then
-${scripts}/createintro.sh $myfolder $videonumber $page $totalframes $file $myxml $framerate $pageresolution $backgroundimage
+${scripts}/createintro.sh $myfolder $videonumber $page $totalframes $file $myxml $framerate $pageresolution $backgroundimage $aspectRatio
checkreturnvalue
fi
diff -U 3 -H -d -r -N -- mythburn_orig/mythburn/scripts/createintro.sh mythburn/scripts/createintro.sh
--- mythburn_orig/mythburn/scripts/createintro.sh 2006-02-09 16:29:11.895699333 +0000
+++ mythburn/scripts/createintro.sh 2006-02-08 21:29:55.988318497 +0000
@@ -18,6 +18,7 @@
framerate=$1; shift
pageresolution=$1; shift
backgroundimage=$1; shift
+aspectRatio=$1; shift
# read config file
cfg=${myfolder}/mythburn.conf
@@ -68,7 +69,7 @@
#Create 200 frames for the menu page: -a is aspect ratio 2=4:3 3=16:9 4=2.21:1
nice jpeg2yuv -v 0 -n 200 -I p -f $framerate -j \
${tempdir}/intro${index}.jpg | \
- nice mpeg2enc -q 5 -a 3 -v 0 -n p -f 8 \
+ nice mpeg2enc -q 5 -a $aspectRatio -v 0 -n p -f 8 \
-o ${tempdir}/intro$index.m2v
checkreturnvalue
diff -U 3 -H -d -r -N -- mythburn_orig/mythburn/scripts/createscenemenu.sh mythburn/scripts/createscenemenu.sh
--- mythburn_orig/mythburn/scripts/createscenemenu.sh 2006-02-09 16:29:11.863700517 +0000
+++ mythburn/scripts/createscenemenu.sh 2006-02-08 21:36:46.157071593 +0000
@@ -15,6 +15,7 @@
myxml=$1; shift
framerate=$1; shift
pageresolution=$1; shift
+aspectRatio=$1; shift
highlight=${myfolder}/images/highlight/$1; shift
submenus=$1; shift
@@ -360,7 +361,7 @@
#Create 30 frames for the menu page: -a is aspect ratio 2=4:3 3=16:9 4=2.21:1
nice jpeg2yuv -v 0 -n $framerate -I p -f $framerate -j \
${tempdir}/sceneselection${index}.jpg | \
- nice mpeg2enc -q 2 -a 2 -v 0 -n p -f 8 \
+ nice mpeg2enc -q 2 -a $aspectRatio -v 0 -n p -f 8 \
-o ${tempdir}/sceneselection$index.m2v
checkreturnvalue
diff -U 3 -H -d -r -N -- mythburn_orig/mythburn/scripts/remplex.sh mythburn/scripts/remplex.sh
--- mythburn_orig/mythburn/scripts/remplex.sh 2006-02-09 16:58:39.778492019 +0000
+++ mythburn/scripts/remplex.sh 2006-02-08 22:08:04.679264295 +0000
@@ -114,7 +114,7 @@
kill ${XVFB_PID} 2>/dev/null
fi
- rm ${base}_log.txt
+ #rm ${base}_log.txt
rm ${audio}
rm ${base}.m2v
popd > /dev/null