View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 12 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Sat Aug 28, 2010 6:26 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
Hi all,

Trying to remove commercials from my TV recordings. The commercial flagging job runs as evidenced by this msg in mythweb

Quote:
Flag Commercials (Finished: Fri Aug 27, 2010, 07:13 PM)
3 commercial break(s)


and the fact that the frontend skips over the commercials during playback. Good start! However when I run the default "remove commercials" job (I haven't changed it in any way) from mythweb nothing is removed and I see this in the backend log:


Quote:
2010-08-28 17:06:37.791 JobQueue: Started Remove Commercials for "Phineas and Ferb" recorded from channel 3055 at Fri Aug 27 18:30:00 2010
QSqlDatabasePrivate::removeDatabase: connection 'DBManager0' is still in use, all queries will cease to work.
QSqlDatabasePrivate::removeDatabase: connection 'DBManager1' is still in use, all queries will cease to work.
No cutlist found.
2010-08-28 17:06:37.961 JobQueue: Finished Remove Commercials for "Phineas and Ferb" recorded from channel 3055 at Fri Aug 27 18:30:00 2010.


Any thots on why the cutlist can't be found? Or is this a false lead & the DB error is the real problem?

EDIT: I should point out that my ultimate goal is to produce an AVI of the recording w/o the commercials. My "transcode to AVI" job works great but right now it is ignoring the cutlist.

_________________
Paul O'Flynn


Last edited by poflynn on Thu Sep 16, 2010 9:15 pm, edited 1 time in total.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 28, 2010 7:45 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
The Remove Commercials User Job, by default, works only if you have loaded the commercials into the cutlist. This is to ensure that commercials were flagged correctly and don't cut out part of the program. Maybe it should be renamed to Remove Cutlist. Here is how to load the commercials into the cutlist. Basically the script mimics doing a lossless transcode.

Or if you find that the commercial flagger is accurate enough and you are willing to risk possibly cutting out part of your program you can change the option USE_MYTHCOMMFLAG_CUTLIST=NO in /usr/LH/bin/removecommercials.sh to USE_MYTHCOMMFLAG_CUTLIST=YES


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 29, 2010 1:39 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
Cool! Indeed your manual suggestion worked. However when I checked the script file to have it trust mythcommflag I found things to be a little different than you describe.

First off, the file was here /usr/bin/removecommercials (note the lack of file ext also). Version comment says it is version 0.1.

Also, I couldn't find the constant you referenced (USE_MYTHCOMMFLAG_CUTLIST).

I think I am up to date on the version.
Quote:
[mythtv@mbe ~]$ pacman -Qs removecommercials
local/removecommercials 0.1-1
[mythtv@mbe ~]$ pacman -Ss removecommercials
extra/removecommercials 0.1-1


Here is a clip from the script where it appears to check for the existence of a cutlist. For this one series I have recorded, I am happy to let myth mark & remove commercials w/o manual intervention. Any thoughts?

Thanks for all the help so far.

Paul


Quote:
# check for cutlist
MYTHCOMMFRAMES=`mythcommflag --getcutlist -f $VIDEODIR/$FILENAME | grep 'Cutlist:' | cut -d \ -f 2`
if [ -n "$MYTHCOMMFRAMES" ]; then
echo "Extracting cutlist..."
update_comment "Removing Commercials..."
.....snip..........
echo "Commercials Removed"
update_status 272
update_comment "Sucessfully Completed."
else
echo "No cutlist found."
fi

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 1:28 am 
Offline
Joined: Mon Apr 23, 2007 1:45 pm
Posts: 405
Location: Fargo, ND, USA
Just some observations
Commercial Skip / Commercial Editing

http://www.knoppmythwiki.org/index.php? ... te_Control
Go down to "Commercial Skip / Commercial Editing"

Over the last 5 years I have recorded about ten shows a day and commercial clipped (create a cut list and lossless transcode) most of them. Out of 10,000 shows (crude math here) I can count on one hand the shows that required no alterations to the cut list after the mythcommflag list was applied.

Even if this is a 1/2 hour show on OTA TV I can guaranty the commercial cut list is off with only three breaks.
Quote:
Flag Commercials (Finished: Fri Aug 27, 2010, 07:13 PM)
3 commercial break(s)


On about 50% of my shows the default commercial cut list will remove about 5 minutes of the actual TV show unless you manually correct the cut list. All the major networks go out of there way (on there Hit shows) to include at least one spot where the commercial detection will remove parts of the show. There way of getting even with us.

I am pretty good at correcting a cut list now. I am guessing at average about 1 minute a show. 10,000 shows @ 1 minute a show is 166 hours. No wonder I get nothing done.

TVBox

_________________
TVBox
LinHES R8.6.1


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 30, 2010 8:52 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
poflynn wrote:
First off, the file was here /usr/bin/removecommercials (note the lack of file ext also). Version comment says it is version 0.1.
That is the old version and was removed from testing. Not sure why it is still in extra after the sync. The current version is .2 and is at /usr/LH/bin/removecommercials.sh and is part of the linhes-scripts package.

I would suggest removing the removecommercials package:
Code:
sudo pacman -R removecommercials
You will also have to change the path for the User Job in Setup to /usr/LH/bin/removecommercials.sh.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 4:13 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
TVBox: I share your concern however this is kiddies shows (for now) and there's no way I am manually tweaking each one, tough to them!

brfransen/all: Removed the old ver, installed the new ver, changed the job defn and this worked, yaay! One quibble tho: when I watch the show now it still skips at the old markers, i.e. the cutlist is still present, it seems it should be removed along with the commercials surely. Did I miss something?

Thanks all.

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 4:32 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
poflynn wrote:
brfransen/all: Removed the old ver, installed the new ver, changed the job defn and this worked, yaay! One quibble tho: when I watch the show now it still skips at the old markers, i.e. the cutlist is still present, it seems it should be removed along with the commercials surely. Did I miss something?
So the commercials are removed but it still skips? One of the last thing the script does is remove the cutlist. If you would on one of the recordings where the cutlist remains try:
Code:
mythcommflag -f /path/to/file -clearcutlist
and post the output.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 31, 2010 11:26 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
Apologies for the overkill screenshot but from it you can see the scissors symbol showing a cutlist (which I presume answers your q). I ran removecommercials just now on all of these Phineas & Ferb episodes and you can see most had the cutlist removed, but not all. Weird. Is there a log file somewhere I could check? According to mythweb, all of the jobs completed successfully.



https://dl.dropbox.com/u/10818913/Scree ... Chrome.png

EDIT: Ok so I played one just now that did not have a scissors icon & it also skipped. Ran the cmd as you requested:
Quote:
[mythtv@mbe ~]$ mythcommflag -f '/myth/tv/3055_20100827093000.mpg' --clearcutlist
2010-08-31 22:39:30.061 Using runtime prefix = /usr
2010-08-31 22:39:30.061 Using configuration directory = /home/mythtv/.mythtv
2010-08-31 22:39:30.061 Empty LocalHostName.
2010-08-31 22:39:30.064 New DB connection, total: 1
2010-08-31 22:39:30.082 Closing DB connection named 'DBManager0'
2010-08-31 22:39:30.088 New DB connection, total: 2
2010-08-31 22:39:30.093 Cutlist set to:
QSqlDatabasePrivate::removeDatabase: connection 'DBManager0' is still in use, all queries will cease to work.
QSqlDatabasePrivate::removeDatabase: connection 'DBManager1' is still in use, all queries will cease to work.
[mythtv@mbe ~]$

Played it again and it still skips! I assumed this cmd would delete the cutlist?

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2010 12:43 am 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Is it skipping because there is a loaded cutlist or is it skipping because you have commercial skipping turn on? Start a program and press e to pull up the cutlist and see if there are any cuts. My guess is it is auto skipping commercials.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2010 10:45 am 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
yes there is a loaded cut list but the question is why? Isn't removecommercials.sh supposed to remove the cut list?

Yes I do have a skip commercials turn on.

_________________
Paul O'Flynn


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 01, 2010 2:21 pm 
Offline
Joined: Fri Jul 21, 2006 11:12 pm
Posts: 1194
Location: SC
Yes removecommercials.sh is suppose to remove the cutlist. Not sure why it is hit or miss for you as I can't reproduce it here.

Here is a version with a few changes:
- Moves USE_MYTHCOMMFLAG_CUTLIST option to a config file so that the user's selection won't get overwritten when the package is updated. The cfg file will get written on first run of the script.
- Enable logging to /var/log/mythtv/removecommercials.log
- Slight change to sql for clearing the cutlist
- Add sql to clear autoskip marks.

Please try out this version and let me know how it works.

Thanks,
Britney


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 16, 2010 9:15 pm 
Offline
Joined: Sat Apr 21, 2007 6:55 pm
Posts: 306
Location: CA,USA
Hi Britney,

Ran this new ver on a few recordings & it seems good, thx a lot!

_________________
Paul O'Flynn


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu