<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 11, 2016 at 1:22 PM, HP-mini <span dir="ltr"><<a href="mailto:blm-ubunet@slingshot.co.nz" target="_blank">blm-ubunet@slingshot.co.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Fri, 2016-03-11 at 12:43 -0500, Daryl McDonald wrote:<br>
><br>
><br>
> On Fri, Mar 11, 2016 at 11:40 AM, Michael Wisniewski<br>
> <<a href="mailto:mikewiz38@gmail.com">mikewiz38@gmail.com</a>> wrote:<br>
<br>
<br>
> On Thu, Mar 10, 2016 at 7:34 PM, Mark<br>
> <<a href="mailto:perkins1724@hotmail.com">perkins1724@hotmail.com</a>> wrote:<br>
><br>
> > -----Original Message-----<br>
> > From: mythtv-users<br>
> [mailto:<a href="mailto:mythtv-users-bounces@mythtv.org">mythtv-users-bounces@mythtv.org</a>] On Behalf<br>
> > Of Michael Wisniewski<br>
> > Sent: Friday, 11 March 2016 9:51 AM<br>
> > To: Discussion about MythTV<br>
> > Subject: [mythtv-users] Commercial Flagging after<br>
> Transcode<br>
> ><br>
> > Hi!<br>
> ><br>
> > I'm having a problem trying to do commercial<br>
> flagging on a transcode. After a<br>
> > recording job runs, I have it run the commercial<br>
> flagging and then a custom<br>
> > script that transcodes the mpeg2 to a h.264 mpeg4<br>
> file. You can see the full<br>
> > script here....<br>
> ><br>
> > <a href="http://pastebin.com/GveHsDft" rel="noreferrer" target="_blank">http://pastebin.com/GveHsDft</a><br>
> ><br>
> > In particular, I have a question about these two<br>
> lines:<br>
> ><br>
> > mythcommflag --chanid $CHANLID --starttime $STRTTIM<br>
> --gencutlist<br>
><br>
> MythTV can maintain in its database (amongst other<br>
> things obviously) two sets of flags (relevant to your<br>
> post). The first is commercial boundaries (set of<br>
> start and end flags) commonly called the commskiplist.<br>
> It is usually created by mythcommflag but there are<br>
> other ways. The second is cut boundaries (set of start<br>
> and end flags) commonly called the cutlist. It is<br>
> usually created by copying the commercial boundaries<br>
> (commskiplist) to the cutlist using --gencutlist<br>
> switch or can be created / edited using the editor<br>
> while viewing a recording in mythfrontend, but again<br>
> there are other ways.<br>
><br>
> Although I thought the --gencutlist switch applied to<br>
> mythutil not to mythcommflag? Maybe it is undocumented<br>
> feature of mythcommflag? I don’t specifically recall.<br>
> What version MythTV are you running?<br>
><br>
> Importantly, if your commskiplist is empty or wrong<br>
> then using this switch will result in a cutlist that<br>
> is empty or wrong. Also note that editing the cutlist<br>
> does not update the commskiplist.<br>
><br>
> > mythtranscode --chanid $CHANLID --starttime $STRTTIM<br>
> --mpeg2 --<br>
> > honorcutlist --outfile $MYTHDIR/$MPGFILE.tmp<br>
> ><br>
><br>
> When using mythtranscode to transcode, it can<br>
> optionally remove the cutlist from the transcode<br>
> output. The --honorcutlist is the switch to achieve<br>
> this. Depending on your setup once you transcode your<br>
> original file might be irretrievably destroyed and /<br>
> or overwritten.<br>
><br>
> > When it runs these commands, does it export the<br>
> mpeg2 file with the<br>
> > commercials already removed?<br>
><br>
> Assuming that running mythcommflag with the<br>
> --gencutlist switch is valid (which I can't confirm),<br>
> then essentially yes assuming that the original<br>
> commskiplist was generated and accurately marked the<br>
> commercials intended for removal.<br>
><br>
> > Or, does it export the mpeg2 file as the<br>
> > original and puts the cutlist in a file alongside<br>
> the mpeg2 file?<br>
><br>
> mythtranscode will create a new file. It may or may<br>
> not overwrite your original file depending on your<br>
> specific setup and script. Full disclosure: I didn’t<br>
> read your linked script. There is no text file<br>
> containing the cutlist generated by default, it is all<br>
> stored in the mythtv database.<br>
><br>
> ><br>
> > Going through mythweb, I see the commercial flag for<br>
> the recorded<br>
> > programs, but when watching it through a Kodi<br>
> frontend, I see no dialog<br>
> > recognizing commercials.<br>
><br>
> Kodi doesn't understand anything to do with mythtv<br>
> commskiplist or cutlist, it just plays the file as it<br>
> currently is.<br>
><br>
> My two guesses would be:<br>
> a) using mythcommflag with --gencutlist is invalid<br>
> therefore your cutlist is empty therefore your<br>
> transcode output is the full file.<br>
> b) your commskiplist is empty or incorrect to begin<br>
> with therefore your cutlist is empty / incorrect<br>
> therefore your transcode output is the full file.<br>
><br>
> Easiest way to check the commskip list is to play a<br>
> recording in mythfrontend, press 'e' to bring up the<br>
> editor then press 'z' to import the commskiplist into<br>
> the cutlist editor and check it there. When you exit<br>
> it will give you the option to save the cutlist or<br>
> discard changes.<br>
><br>
> ><br>
> > Thanks in advanced!<br>
><br>
><br>
><br>
> Thanks for the response. You did a great job explaining how<br>
> it all works and it was extremely helpful.<br>
><br>
><br>
> I ended up pulling up the editor and the commskiplist thing in<br>
> the mythfrontend. (I figured I'll worry about Kodi later).<br>
> The "E" doesn't do anything (says no seektable) and the "Z"<br>
> just skips forward. I also checked out that mythcommflag, and<br>
> there is no gencutlist option in it either. Since the<br>
> transcoded file isn't shorter and includes the commercials,<br>
> and the 'z' doesn't do anything except skip around, I'm<br>
> guessing that commercial detection isn't working for me with<br>
> the transcode.<br>
><br>
><br>
> Ideally, I'd like myth to flag the commercials after the<br>
> transcode in the database so that it doesn't cut up the<br>
> original file....just in case commercial detection doesn't<br>
> work, I can always view the show without loosing parts of it.<br>
> After running the transcode through handbrake, is it possible<br>
> to execute something like...<br>
><br>
><br>
> mythcommflag -f <file.mp4><br>
><br>
><br>
> Will this keep the original file in tact (with the<br>
> commercials), but make mythtv flag the commercials properly?<br>
><br>
><br>
> Thanks for your help and responses again.<br>
<br>
<br>
</div></div><span class="">> because commflag is not 100% accurate I would never auto transcode a<br>
> recording. Before transcoding is when E and Z act as previously<br>
> described and once a cut list is edited the recording can be<br>
> transcoded without losing anything you want kept. For recordings that<br>
> have been transcoded they may still be available if in the BE set-up<br>
> you haven't toggled off the switch to keep old recordings after<br>
> transcoding, which would make it possible to rebuild the seek table,<br>
> edit and save and transcode.<br>
><br>
><br>
</span>If you transcode to AVCC format H264 mpeg PS (mpeg4 container) you then<br>
can not generate seektable (& then cutlist) & probably can't<br>
meaningfully use mythcommflag.<br>
<br>
MythTV only generates seektables for H264 video in TS container.<br>
You need to modify the H264 transcode script to use annexB H264 mpeg<br>
transport stream container.<br>
The other issues is that typical x264 settings has very sparse keyframes<br>
(potential cut points).<br>
<br>
The TS container file is a bit larger but is more robust.<br>
<div class="HOEnZb"><div class="h5"><br></div></div></blockquote><div><br></div><div>Thanks for the response. So, it sounds like my problem is that I'm creating files that aren't fully compatible with myth. I suppose I have some more research to do on this... </div><div><br></div><div>If I understand you correctly, the videos have to be in an "MPEG transport stream" and not in the mpeg4 container that I'm using. </div><div><br></div><div>Is there a reason myth doesn't move over to mpeg4, or something else?</div><div><br></div><div>Thanks!</div></div></div></div>