I am not running .28 nor am I ready to do so since I am running MythTV on FreeBSD and don't feel like compiling my own (.27.5 is available in freshports). Oddly I do transcode with constant framerate using --cfr option in my HandBrake command line.
Since I need to transcode my recordings to conserve space, I came up with an alternate way to handle commercials. Basically in my user job to transcode my recording, right after I do the transcoding process, I call mythcommflag on the new .mp4 to work its magic and mark the commercials. I then select out the ending commercial flags (type 5 in the recordedmarkup table) and build a temporary chapter file (I called chapfile) that is compatible with mp4box utility ( https://gpac.wp.mines-telecom.fr/mp4box/ ) that can merge in the chapter flags with the video & audio streams to create a new mp4 container file. I then move this new file back into my recordings directory and update the database with the new file size, filename and transcoded flag set. I also delete out the recordedmarkup table entries since the chapter markers are now permanent within the mp4 container. Here's the section showing the chapter creation with an explanation of the variables used (this is bourne shell, btw):
$DBUSER = your mysql user name
$DBPASSWD = your mysql user password
$CHAN = channel ID as a passed in argument
$START = start time of recording as a passed in argument
$OUTFILE = basename of new mp4 file (basically basename from recorded table with updated mp4 extension instead of mpg)
$VIDEODIR = directory to your recordings
$CHAPCNT = just an incremental chapter count to be used in the chapter name
Code: Select all
# Mark commercials and set chapter markers in actual MP4 container file # mythcommflag returns number of commercials as its exit code. Only numbers 128+ are an error code. mythcommflag --file $OUTFILE --quiet ERROR=$? if [ $ERROR -gt 127 ]; then echo "Error creating commercial markers for $OUTFILE with error $ERROR" >> errors.log exit $ERROR fi MARKLIST=`mysql -B --skip-column-names -u$DBUSER -p$DBPASSWD mythconverg -e "select mark from recordedmarkup where chanid='$CHAN' and starttime='$START' and type='5' order by mark;"` for FRAME in $MARKLIST do echo "AddChapter($FRAME,Commercial $CHAPCNT)" >> chapfile CHAPCNT=`expr $CHAPCNT + 1` done mp4box -noprog -quiet -add $OUTFILE -chap chapfile $VIDEODIR/$OUTFILE ERROR=$? if [ $ERROR -ne 0 ]; then echo "Error in mp4box adding chapters. Check chapfile for accuracy. Error code: $ERROR" >> errors.log exit $ERROR fi # Clean up recordedmarkup table since we do not need the markers after chapter creation mysql -u$DBUSER -p$DBPASSWD mythconverg -e "delete from recordedmarkup where chanid='$CHAN' and starttime='$START';"