View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 5 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Feb 04, 2006 7:56 pm 
Offline
Joined: Sat Feb 04, 2006 2:53 pm
Posts: 32
Dissapointingly, after a bit of patching and poking, mythburn works fine for me, except all my 16:9 DVB files appear as 4:3 ratio video on the resultant DVD.
As far as i can tell, this happens in the dvdauthor stage of the process, the source files appear fine after demux/mplex(at 16:9, using projectX 0.9.2).

I'm using dvdauthor 0.6.11, dvdStyler uses this to produce a DVD that works fine , with correct aspect ratios.

my mythTV log file contains the lines :

STAT: Processing /bigdisk/mythtv/tmpiso/1005_20060203210000_20060203213000.nuv...
WARN: attempt to update resolution from 720xfull to 704xfull; skipping
WARN: attempt to update aspect ratio from 4:3 to 16:9; skipping

Which seems to indicate that dvdauthor knows the resolution and aspect ratio of the files, but nevertheless skips that and continues to write them at 4:3

Anyone have any ideas as to where I should look to fix this?

many thanks in advance, I've spent a good few hours reading the mythburn source and relevant docs with no result, so i guess i've just missed something fairly simple.
Jim.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 11:49 am 
Offline
Joined: Sat Feb 04, 2006 2:53 pm
Posts: 32
Obviously I was not using my brain hard enough yesterday, I have isolated the cause and it does now seem to be quite a simple one.

In brief, the intro[n].mpg file for the title is generated at 4:3 in createintro.sh

around here :

echo "Encode intro image to mpg movie"
#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 2 -v 0 -n p -f 8 \
-o ${tempdir}/intro$index.m2v
checkreturnvalue

changing the -a 2 to -a 3 creates the intro menu at 16:9, and everything then works. I suspect the resultant image may be a a bit squashed though, I may have to look further at that.

The intro mpg is combined with the recorded video in the dvdauthor config xml file like this :


<titles><pgc>
<vob file='/bigdisk/mythtv/tmpiso/intro1.mpg' />
<vob file='/bigdisk/mythtv/tmpiso/1035_20060204184100_20060204193000.nuv'
chapters='00:00:00.00,00:00:43.21,00:01:27.17,00:02:11.13,00:02:55.09,00:03:39.05,00:04:23.01,00:05:06.22,00:05:50.18' />
<post>call vmgm menu 2;</post>

Obviously they need to be at the same aspect ratio.

The relevant lines in mythtvburn.sh are :

if [ "$submenus" == "no" ]; then
${scripts}/createintro.sh $myfolder $videonumber $page $totalframes $file $myxml $framerate $pageresolution $backgroundimage
checkreturnvalue
fi

So I suspect this whole thing might not be an issue if I were to use the submenus option in the mythburn web frontend.
I'll try that and see how it goes.

Given that I can probably live without the intro mpegs, I may just comment that line, the point being that the UK DVB streams come in *both* 16:9 and 4:3 aspect ratios.

Otherwise, it would be a case of detecting the video format beforehand and passing that into createintro.sh such that it creates an intro in the correct aspect ratio. Since I've never attempted more than the most trivial of shell scripts I suspect that might take me a little while, but you never know.

Well, i hope that's useful to someone in the future,
Jim.

[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 3:20 pm 
Offline
Joined: Sat Feb 04, 2006 2:53 pm
Posts: 32
Update :
Using the submenus option exhibits the same problems(in another place, of course),
and commenting out the lines to create/insert intro1.mpg in fact breaks the menu, so I'd need to do a little more work on the dvdauthor xml file to fix that if I went that way.

When I have a little more time i'll attempt a more universal solution (unlikely to be for a good few days due to having a full diary just now).

my thoughts are :
just add a checkbox to the front end and pass the aspect to mythtvburn.sh that way, easy to do but not much good for mixed aspect ratio clips on the same dvd.

Detect the aspect ratio for each file before creating the menu clips.
the information is in the projectX _log files, so I could keep those after the de/remux, and grep them when making the menus. Then clean them up right at the end.

If any one knows of a simpler/better way, please post!

I've not looked at the latest scripts/plugin intended for myth0.19, it may be this has already been addressed, or that I'd be better off trying a fix on those.

I'll be upgrading to 0.19 when I have the time and patience to do so, which will probably mean it's actually made it to a release by then.

In the meantime, i'm just enjoying the fact that the current build is working ok, so I'm still a little reluctant to tear it down.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 1:48 pm 
Offline
Joined: Sat Feb 04, 2006 2:53 pm
Posts: 32
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 09, 2006 4:05 pm 
Offline
Joined: Wed Feb 01, 2006 4:18 pm
Posts: 17
The best would be to attach the patch as a separate file instead of posting it on the forums, and to send it to spit2k1, the main developer.
I have not yet tried to use your patch, but I'll look into it.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu