prpr
Well-Known Member
This could probably be achieved regardless. I haven't actually tried it all for real but:could it update the recording length in the hmt file when it generates a new nts file? Then if you edit out ads off-box, overwrite the ts file with the new shorter version and generate a new nts file, the timeline displayed when using the arrow keys on the remote will be accurate.
Rename the current .hmt file to something else
Generate a new .hmt file
Query the length using "duration=`hmt +read32=0x288 somefilename|cut -d' ' -f1`"
Delete the new .hmt file and restore the old one
Update the duration using "hmt +patch32=0x288:$duration somefilename"
Query the start time using "starttime=`hmt +read32=0x280 somefilename|cut -d' ' -f1`"
Calculate the new end time using "endtime=$(($starttime + $duration))"
Update the end time using "hmt +patch32=0x284:$endtime somefilename"
You would of course probably want to wrap this into a proper shell script if a) it works and b) you want to do this more than once!