Mythtv:Skipping Commercials

From LinuxMCE
Jump to: navigation, search

LinuxMCE's default MythTV integration does not automatically edit out commercials after recording, though MythTV does have this ability. In its default state, MythTV will record a show, and then after it is recorded run it though a process which attempts to Identify commercials. It saves this information, but nothing is done with it. After this step is complete, a job runs which adds the new recoding to LinuxMCE's media database so it will show up in the datagrid on the orbiters.

There are, however, ways to Automate commercial removal, as well as manually remove them from old recordings that you didn't have it set to do automatically for. I recommend learning both, as there is no replacement for Human Intelligence when it comes to marking commercials, though in my experience MythTV does a pretty good job of it most of the time.

Automatic Commercial Removal(AKA Automatic Transcoding) Most of this information I found here, and it worked for me just fine. Below is a recap:

In MythTV terms, this process is called Automatic Transcoding, and there are a couple of settings that must be enabled for automatic transcoding (commercial removal) to work. Also, if you are recording something very important, I would recommend flagging thos recordings not to use automatic transcoding, and manually flag and transcode them yourself, as the algorithms used to flag commercials aren't always 100% accurate. Here are the steps to take to enable automatic transcoding:

  • Go into MythTV setup, and go to Utilities/Setup->Setup->TV Settings->Recording Profiles
  • Select your capture card from the list (you can have different automatic transcoding settings for each card!)
  • Check the option "Enable auto-transcode after recording"
  • Go back to Utilities/Setup->Setup->TV Settings->Recording Profiles
  • Select the Transcoding option, then the "Autodetect From MPEG2" profile
  • Check the Lossless Transcoding checkbox. (This will only remove flagged commercials, with no loss of quality)

Thats it! Now just be sure to set the Automatic Transcoding option for each recording you want this to happen for. For example, using mythweb, when setting up a show to record, there is a simple checkbox to enable Automatic Transcoding for that recording. I just check it, and MythTV does the rest!

Manual Commercial Removal and Transcoding There is a very good detailed writeup on this here

Ok, so you have Automatic Transcoding working now, and you wish there was a way for all of your older recordings to be commercial-free... Just follow those instructions to learn how to manually edit the cutlist(areas tagged for deletion) for any recording. It will also show you how to trigger a manual transcode when you are finished. Also note that since this is lossless, you can go back an manually transcode a recording that was previously automatically transcoded with no loss of quality. You may want to do this if MythTV missed removing some commercials, or to remove the lead-in, etc.

Other Tips and Hints

LinuxMCE's default implementation of MythTV is configured so that any MythTV front end (including the front ends in each media director) will help with tasks in the job queue. For some low-end media directors, this can cause a lot of skips and stuttering during video playback. You can disable this feature by going into the mythtv backend setup and enabling a checkbox "Use only the front end which recorded for job queue" (I forgot the real option name, I will look it up later and update this). After this, assuming that your capture card is on your core, then only your core will process jobs (such as flagging commercials and transcoding) for each recording.

You can change the recording directory for each of the front ends (which default to home/public/data/tv_shows_x). It is important that if you change these, that part of the final path is "tv_shows", as this is used by a LMCE script to look for new recordings. Without this, new recordings will not be added to the LMCE database, and will not be available from the Videos menu.