Opened 9 years ago

Closed 9 years ago

#10607 closed Bug Report - General (Works for me)

Format of starttime argument in mythcommflag --rebuild

Reported by: J.Pilk@… Owned by:
Priority: minor Milestone: unknown
Component: MythTV - General Version: 0.25-fixes
Severity: medium Keywords:
Cc: Ticket locked: no


My mythcutprojectx script uses mythtranscode --mpeg2 --buildindex --chanid foo --starttime bar, where foo and bar are obtained from the database. I don't think this will work with dvb-t2 HD recordings, so in tests I moved to mythcommflag --rebuild with the same values for foo and bar. This failed, apparently because the yyy-mm-dd hh:mm:ss format was unacceptable. I tried wrapping it in various combinations of quote marks without success, before working around the problem by using the --file argument instead.

I'm not clear where the format of the starttime returned from the database query is set. I suppose it could be related to my locale, but it does look as if a format acceptable to mythtranscode is not acceptable to mythcommflag in 0.25.

Also I'll add an example of the log output I see on doing the rebuild with an empty cutlist. It reports a decoding error, perhaps at EOF, and uses yet another date format :-)

Running: ionice -c3 mythcommflag --rebuild --file 1080_20120317032600.mpg
2012-04-15 22:11:32.275761 C mythcommflag version: [v0.25]
MythTV Commercial Flagger, building seek table for:


Rebuild started at Sun Apr 15 22:11:32 2012
2012-04-15 22:11:42.329009 E decoding error

eno: Broken pipe (32)

Rebuild completed at Sun Apr 15 22:11:42 2012

Change History (3)

comment:1 Changed 9 years ago by sphery

Status: newinfoneeded_new

Please give exact example command lines showing specific format that works in mythtranscode but not in mythcommflag.

comment:2 Changed 9 years ago by J.Pilk@…

I have to admit that I can't now reproduce this. I have scripts working that use mythcommflag with the $starttime argument like this:

starttime=`echo "select starttime from recorded where basename=\"$1\";" | mysql -N -u mythtv -p$PASSWD mythconverg `

followed by

echo "Running: ionice -c3 mythcommflag --rebuild --chanid "$chanid" --starttime "$starttime""
ionice -c3 mythcommflag --rebuild --chanid "$chanid" --starttime "$starttime"

which is the same form that I used with mythtranscode --mpeg2 --buildindex

I do see a problem if I copy the command line echoed above and try to run that:

mythcommflag --rebuild --chanid 1052 --starttime 2012-04-12 13:11:00

gives "Received '13:11:00' but unassociated arguments have not been enabled"
and that can be avoided by putting quote marks around the starttime string.

I'm also using this in (another) script: starttime=$(echo ${starttime} | tr -d ': -')

  • and I should probably try to understand the python bindings instead :-)

So: it seemed to be a real problem but may not be any more. Thanks, anyway, and apologies if I screwed up. See also

comment:3 Changed 9 years ago by sphery

Resolution: Works for me
Status: infoneeded_newclosed

The problem you're still seeing seems to be a problem with argument passing (specifically due to the space in the argument--which can be difficult to handle, especially in shell scripting). Thanks for the followup.

Note: See TracTickets for help on using tickets.