Author |
Message |
jimhayes
|
Posted: Wed Apr 12, 2006 7:52 pm |
|
Joined: Sat Feb 04, 2006 2:53 pm
Posts: 32
|
OK, that looks good, but is your mythburn actually using that wrapper?
have a look in [your mythburn directory]/mythburn.conf
and look for the line that starts with projectx=
that will tell you what it's actually calling, you can enter the direct path and options there, if you like.
|
|
Top |
|
 |
DrewCS
|
Posted: Wed Apr 12, 2006 8:22 pm |
|
Joined: Sun Jun 12, 2005 11:24 am
Posts: 32
Location:
East Lansing, MI
|
I did upgrade Java and projectX, but I got it working now.....I just rebooted and now everything works. Wven thought I did reboot after upgrading both Java and projectX....oh well. Thanks everyone for all your help
|
|
Top |
|
 |
Awful
|
Posted: Sat Apr 15, 2006 9:13 pm |
|
Joined: Sat Apr 01, 2006 7:10 pm
Posts: 3
|
I have R5B7 and had the same problem.
I edited the /usr/bin/projectx file to add "-Djava.awt.headless=true" as described earlier.
Then I rebooted (for good measure) and Bob's your Uncle - it worked.
(I did not upgrade anything else, just to make that clear in case anyone else is trying things out.)
_________________ I want to move to theory. Everything works in theory.
|
|
Top |
|
 |
simonf
|
Posted: Sun Apr 16, 2006 10:00 am |
|
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location:
Manchester UK
|
Hi all
I have fixed the problems I had with mythburn IE it burning the wrong audio track as follows
Its not pretty and its not clever but it works for me !!
basicaly i get it to check the size of the xxx.mp2 file against the xxx[1].mp2 file and use the bigest one there is probably a much more eligant solution but as long as it works for me I dont care.
Heres my working /mythburn/scripts/mpeg2cut-px.sh
Code: #!/bin/sh # # vim:ts=4:sw=4:ai:et:si:sts=4 # # Cut MPEG2 files to remove cutlists... # # Prerequisites: # projectx 0.90.x or later # mplex # Xvfb # # warning: won't make frame accurate cuts - cutpoints get rounded to the nearest GOP boundry # # Usage: mpeg2cut_px basedir inputfile outputfile # basedir/temp/cutlist.txt is a cutlist as returned by getmyth.sh function cutlist_x { #generate project x cutlist #cutlist is just a sequence of cutpoints #first entry is cut-in, i.e start recording line=0 rm ${tempdir}/cutlist_x.txt 2>/dev/null cat ${tempdir}/cutlist.txt | while read do first=$(echo $REPLY|cut -f1 -d-) second=$(echo $REPLY|cut -f2 -d-)
if [ "$line" -eq "0" ]; then echo "CollectionPanel.CutMode=2" > ${tempdir}/cutlist_x.txt if [ "$first" -ne "0" -a "$first" != "" ]; then echo "0" >> ${tempdir}/cutlist_x.txt fi fi line=$((line+1)) if [ "$first" != "" -a "${first}0" -ne "0" ]; then echo $first >> ${tempdir}/cutlist_x.txt fi if [ "$second" != "" ]; then echo $second >> ${tempdir}/cutlist_x.txt fi done }
XVFB=`which Xvfb` if [ -n "$XVFB" ]; then mode=XVFB export DISPLAY=:33.0 ${XVFB} :33 -screen 0 640x480x8 2> /dev/null > /dev/null & XVFB_PID=$! else if [ -n "$DISPLAY" ]; then mode=X else echo "Neither Xvfb nor DISPLAY varibale found, can't run projectx" exit 1 fi fi pushd . > /dev/null
myfolder=$1 shift videoformat=$1 shift recode_ntsc=$1 shift file=$1 shift outfile=$1 shift factor=$1 shift
base=`basename ${file} .nuv` base=`basename $base .mpg`
# read config file cfg=${myfolder}/mythburn.conf if ! [ -r "$cfg" ]; then echo "Error: can't read config file $cfg; program stopped" exit 1 fi . $cfg
if [ -z "$projectx" ]; then echo "projectx not defined, can't cut commercials" exit 1 fi
cd ${tempdir}
echo Filename \"${file}\" echo OutFile \"${outfile}\"
echo Cutting out commercials + demultiplexing with projectx cutlist_x nice -n 19 ${projectx} -out . -cut cutlist_x.txt $file
if ! [ -f "${base}_log.txt" ]; then echo "Error running projectx, no log file created. giving up" exit 1 fi
#As suggested by Les Gondor if [ "$factor" != "0" ] then mv ${base}.m2v ${base}.m2v.big echo "Requantizing with factor $factor to fit onto DVD"; echo "${tcrequant} -i ${base}.m2v.big -o ${base}.m2v -d 2 -f $factor" nice -n 19 ${tcrequant} -i ${base}.m2v.big -o ${base}.m2v -d 2 -f $factor rm ${base}.m2v.big fi
# sort audiofiles, optionaly reencode first track to ac3 for NTSC #audio=`${myfolder}/scripts/prepare_audio.sh ${myfolder} ${base}_log.txt ${videoformat} ${recode_ntsc}` # added by S Flanagan to find the correct audio track size=`ls -s --size --block-size=M "${base}.mp2" | cut --delimiter=M --fields=1` size1=`ls -s --size --block-size=M "${base}[1].mp2" | cut --delimiter=M --fields=1`
echo "${base}.mp2 is $size" echo "${base}[1].mp2 is $size1" filesize=$(( size1 - size )) if [[ $filesize -gt 0 ]]; then echo "***************************************************************" echo "****** WARNING - Second Audio Track > First Deleteing ******" echo "****** First and Remameing Second ******" echo "***************************************************************" rm ${base}.mp2 mv ${base}[1].mp2 ${base}.mp2 fi
echo Remultiplexing video echo mplex -o ${outfile} -f 8 ${base}.m2v ${base}.mp2 nice -n 19 mplex -o ${outfile} -f 8 ${base}.m2v ${base}.mp2 > /dev/null
echo Cleaning up rm ${base}.m2v ${base}*.mp2 cutlist_x.txt if [ "$mode" == "XVFB" ]; then # Shut down Xvfb if we used it kill ${XVFB_PID} 2>/dev/null fi popd > /dev/null exit 0
The Bits i have changed are here Code: #audio=`${myfolder}/scripts/prepare_audio.sh ${myfolder} ${base}_log.txt ${videoformat} ${recode_ntsc}` # added by S Flanagan to find the correct audio track size=`ls -s --size --block-size=M "${base}.mp2" | cut --delimiter=M --fields=1` size1=`ls -s --size --block-size=M "${base}[1].mp2" | cut --delimiter=M --fields=1`
echo "${base}.mp2 is $size" echo "${base}[1].mp2 is $size1" filesize=$(( size1 - size )) if [[ $filesize -gt 0 ]]; then echo "***************************************************************" echo "****** WARNING - Second Audio Track > First Deleteing ******" echo "****** First and Remameing Second ******" echo "***************************************************************" rm ${base}.mp2 mv ${base}[1].mp2 ${base}.mp2 fi
echo Remultiplexing video echo mplex -o ${outfile} -f 8 ${base}.m2v ${base}.mp2 nice -n 19 mplex -o ${outfile} -f 8 ${base}.m2v ${base}.mp2 > /dev/null
And Code: rm ${base}.m2v ${base}*.mp2 cutlist_x.txt
Hope this is some use to others out there
I have no experience with sh scripts so there is probably a better way as I said
Rgds
Simon
_________________ Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330
|
|
Top |
|
 |
ALW
|
Posted: Wed Apr 19, 2006 6:37 am |
|
Joined: Wed Mar 29, 2006 3:36 pm
Posts: 3
|
Quote: Hope this is some use to others out there I have no experience with sh scripts so there is probably a better way as I said
Simon,
I tried this yesterday and it seems to work pretty well.
I burnt a DVD with 3 shows on, the first two were perfect and had audio, the final one didn't, I need to check the files it outputted to see if for some reason the script got fooled, or if there was something else going on.
Anyway, thanks for taking the time and effort to post it here.
Andy.
|
|
Top |
|
 |
simonf
|
Posted: Wed Apr 19, 2006 1:35 pm |
|
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location:
Manchester UK
|
This Script only works on the edited files. You also need to update the remplex.sh file too to work with all files, I didnt keep the origonal file so I can't just post the changes  . I have just discovered lossless mpeg2 transcoding as normaly all my files would have edits. The remux_projectx function is the one that needs updateing as bellow. I also figured out a much beter way of estimating the final size of a dvd project but now with lossless transcoding i dont need to  . I have used it on twenty plus files and the audio has been fine for me
Code: function remux_projectx() { local src=$1 dst=$2 base=`basename $src .nuv` base=`basename $base .mpg` if [ -z "$projectx" ]; then echo "projectx not defined, can't use remux_projectx remux method" exit 1 fi touch ${base}[1].mp2 XVFB=`which Xvfb` if [ -n "$XVFB" ]; then mode=XVFB export DISPLAY=:33.0 ${XVFB} :33 -screen 0 640x480x8 2> /dev/null > /dev/null & XVFB_PID=$! else if [ -n "$DISPLAY" ]; then mode=X else echo "Neither Xvfb nor DISPLAY variable found, can't run projectx" exit 1 fi fi pushd . > /dev/null cd ${tempdir} ${projectx} -out . ${src} checkreturnvalue
if ! [ -f "${base}_log.txt" ]; then echo "Error Running project X, no log file created. giving up." exit 1 fi # sort audiofiles, optionaly reencode first track to ac3 for NTSC # audio=`${myfolder}/scripts/prepare_audio.sh ${myfolder} ${base}_log.txt ${videoformat} ${recode_ntsc}`
#As suggested by Les Gondor if [ "$factor" != "0" ] then mv ${base}.m2v ${base}.m2v.big echo "Requantizing with factor $factor to fit onto DVD"; echo "${tcrequant} -i ${base}.m2v.big -o ${base}.m2v -d 2 -f $factor" nice -n 19 ${tcrequant} -i ${base}.m2v.big -o ${base}.m2v -d 2 -f $factor rm ${base}.m2v.big fi # added by S Flanagan to find the correct audio track size=`ls -s --size --block-size=M "${base}.mp2" | cut --delimiter=M --fields=1` size1=`ls -s --size --block-size=M "${base}[1].mp2" | cut --delimiter=M --fields=1` echo "first audio file size $size" echo "second audio file size $size1"
filesize=$(( size1 - size )) if [[ $filesize -gt 0 ]]; then echo "***************************************************************" echo "****** WARNING - Second Audio Track > First Deleteing ******" echo "****** First and Remameing Second ******" echo "***************************************************************" rm ${base}.mp2 mv ${base}[1].mp2 ${base}.mp2 echo "rm ${base}.mp2" echo "mv ${base}[1].mp2 ${base}.mp2" fi
echo mplex -o $dst -f 8 ${base}.m2v ${base}.mp2 2> /dev/null mplex -o $dst -f 8 ${base}.m2v ${base}.mp2 2> /dev/null checkreturnvalue if [ "$mode" == "XVFB" ]; then kill ${XVFB_PID} 2>/dev/null fi
rm ${base}_log.txt rm ${base}*.mp2 rm ${base}.m2v popd > /dev/null
}
Thanks all hope this fixes this problem for us UK dvb users.
_________________ Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330
|
|
Top |
|
 |
ALW
|
Posted: Fri Apr 21, 2006 4:59 am |
|
Joined: Wed Mar 29, 2006 3:36 pm
Posts: 3
|
Thanks Simon, I will try the editied remplex.sh and report back, for others, these appear to be the differences between the files: -
Code: touch ${base}[1].mp2 Code: # added by S Flanagan to find the correct audio track size=`ls -s --size --block-size=M "${base}.mp2" | cut --delimiter=M --fields=1` size1=`ls -s --size --block-size=M "${base}[1].mp2" | cut --delimiter=M --fields=1` echo "first audio file size $size" echo "second audio file size $size1"
filesize=$(( size1 - size )) if [[ $filesize -gt 0 ]]; then echo "***************************************************************" echo "****** WARNING - Second Audio Track > First Deleteing ******" echo "****** First and Remameing Second ******" echo "***************************************************************" rm ${base}.mp2 mv ${base}[1].mp2 ${base}.mp2 echo "rm ${base}.mp2" echo "mv ${base}[1].mp2 ${base}.mp2" fi Code: rm ${base}*.mp2 [/quote]
Andy.
|
|
Top |
|
 |
Lem
|
Posted: Mon May 08, 2006 2:33 pm |
|
Joined: Tue Mar 07, 2006 7:04 am
Posts: 54
|
Tried your script, but got the following;
/myth/mythburn/mythtvburn.sh: /myth/mythburn/scripts/remplex.sh: /bin/sh
: bad interpreter: No such file or directory
|
|
Top |
|
 |
simonf
|
Posted: Mon May 08, 2006 3:24 pm |
|
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location:
Manchester UK
|
Quote: Tried your script, but got the following;
/myth/mythburn/mythtvburn.sh: /myth/mythburn/scripts/remplex.sh: /bin/sh : bad interpreter: No such file or directory
What did you use to edit it
If you used windows wordpad you will get this error try using
editor remplex.sh form the command prompt remove the first line
the #/bin/sh and then re-adding it that normaly fixes the problem for me
Rgds
Simon
_________________ Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330
|
|
Top |
|
 |
simonf
|
Posted: Mon May 08, 2006 3:56 pm |
|
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location:
Manchester UK
|
Hi All
I have posted the modified files ready for download @
http://www.flanagan-family.com/knoppmyth/
depending on how you download them you may need to change permissions on them to get them to run maybe someone who knows more about file permissions could post how to do this
Rgds simon
PS these fixes work for me on uk dvb-t there is no cetainty it will work for all i recomend you mv the old files to something like remplex.sh.old first
_________________ Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330
|
|
Top |
|
 |
Lem
|
Posted: Tue May 09, 2006 1:07 am |
|
Joined: Tue Mar 07, 2006 7:04 am
Posts: 54
|
Lem wrote: Tried your script, but got the following;
/myth/mythburn/mythtvburn.sh: /myth/mythburn/scripts/remplex.sh: /bin/sh : bad interpreter: No such file or directory
Oops.. I'm sure I deleted this post.
chmod sorted it!
|
|
Top |
|
 |
bruce_s01
|
Posted: Tue Dec 12, 2006 2:38 pm |
|
Joined: Tue Aug 08, 2006 7:08 pm
Posts: 561
Location:
UK
|
Simonf, downloaded and installed your scripts, everything worked OK.
I already had recorded stuff from ITV4 and BBC3 to DVD without requiring this, it appears Ch4 and BBC1 recordings require this mod.
Bruce S.
_________________ Updated 2019/10/26: AthlonII X2 265 Gigabyte GA-970A-DS3P 16Gb PC 1866 DDR3, 500GB+2TB+4TB SATA HDD, SATA DVD-RW Asus DRW-24D5MT , NVIDIA GeForce GT1080 Hauppauage Nova-T 500, Nova-T LinHes R8.6.1
|
|
Top |
|
 |
simonf
|
Posted: Sun Dec 30, 2007 4:50 pm |
|
Joined: Wed Nov 09, 2005 1:21 pm
Posts: 161
Location:
Manchester UK
|
Has anyone got a similar fix for myth archive
As that is now unusable on bbc1 recordings you get the wrong sound track 
_________________ Running:-
Intel 930 3GHz dual Core
Thermaltake Fanless CPU Cooler
Asus P5GS
Samsung 750G Sata HDD
8400 512m Video Card
2 * jetway DVB-t
1 * Haupage DVB-S2 Card
Samsung Sata 16x DVDRW
2048M Ram
1 * Netop Ion 330
|
|
Top |
|
 |