Parallel Processing

Here you can ask your questions on how to use Comskip for the detection of commercials. Also questions on how to remove commercials are welcome
Post Reply
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Parallel Processing

Post by ReplayHarry »

Forgive me if this comes across as stupid as I am new here and have searched everywhere for a potential answer.

Basically I can't get parallel processing of comskip to work. I am using comskip (donators version 81_059) with nextpvr 3.1.1.

I have placed the comskip.* files in the same directory as Nextpvr (program files (x86)). I have the bat file in the \users\public\npvr\scrips directory. It never starts up. Strangely enough, I can get the postprocessing.bat file to work perfectly. That .bat file is also in the scripts directory.

I receive no errors (that I can see), but the parallel processing just never starts. If you need more info, let me know which log file I need to look at. I have looked at several, but see no errors regarding comskip parallel processing. When running postprocessing, I see a postprocessing log and all looks ok. I have seen no similar parallel processing log.

Help

This is kinda the last significant step of completing my HTPC build.
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

Thanks for the info, but I am doing just what I am suppose to. Tried some stuff last night and found the reason.

I am running Windows 8.1, and apparently Win 8.1 does not like the "Hiderun" program. Found this out by opening a command prompt window and executing the commands in the parallelprocessing bat file manually. When I type Hiderun "comskip %1" (actually the file name) I get the Blue Windows screen that tells me the Hiderun program is a bad guy. Won't let me run it unless I click on more options. Of course I don't see any of that when the bat file is running so the bat file just aborts and parallelprocessing never starts.

So I just removed "Hiderun" and the parallelprocessing runs just as it is suppose to. Once the show on TV starts (and therefore parallelprocessing starts), I use Windows Explorer to look at the directory and see if the files are being created as they are suppose to. Sure enough, everything is working. When the whole thing is done, I look at the filename.txt file and I see numerous commercial blocks listed. So it did it's job right (apparently).
But... I still have an issue. I wanted to use parallelprocessing as I record long sports events (PGA Golf) and I like to skip thru the commercials. Well, when watching the show, no commercials are skipped and I don't start watching till the show is on for an hour. Using XBMC 12.3. If I process a show manually with comskip, the commercials are skipped perfectly. What next?
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

NPVR does not Hiderun as it will hide by default

Do check if comskip can find its ini file.
Set
verbose=10
in you ini file and see if the correct log file is generated.
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

Thanks. I will try that this afternoon and let you know what happens. Everything I read tells me this should work fine, so I hope I can get it to.

About the only things I watch that I really would like parallelprocessing for is sports. Sure would be nice if it skipped on its own. Almost everything else I record, I watch the next day or even later.

Film at 11.
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

This one I ran last night manually from command prompt and it skipped the commercials without issue. It is the correct show.

################################################################
Generated using public Comskip 0.81.059
Time at start of run:
Sat Feb 15 20:43:11 2014
################################################################
Mpeg: D:\Recorded TV\The Beatles The Night That Changed America - A Grammy Salute\The Beatles The Night That Changed America - A Grammy Salute_20140209_19002130.ts
Exe comskip.exe
Logo: D:\Recorded TV\The Beatles The Night That Changed America - A Grammy Salute\The Beatles The Night That Changed America - A Grammy Salute_20140209_19002130.logo.txt
Ini: comskip.ini

Detection Methods to be used:
1) Black Frame
2) Logo - Give up after 2000 seconds
3) Resolution Change
4) Aspect Ratio


ComSkip throttles back from -0001 to -0001.
The time is now 2043 so it's full speed ahead!

Settings
--------
[Main Settings]
;the sum of the values for which kind of frames comskip will consider as possible cutpoints: 1=uniform (black or any other color) frame, 2=logo, 4=scene change, 8=resolution change, 16=closed captions, 32=aspect ration, 64=silence, 255=all.
detect_method=43
;Set to 10 to show a lot of extra info, level 5 is also OK, set to 0 to disable
verbose=10
;Frame not black if any of the pixels of the frame has a brightness greater than this (scale 0 to 255)
max_brightness=60
maxbright=1
;Frame not pure black if a small number of the pixels of the frame has a brightness greater than this. To decide if the frame is truly black, comskip will also check average brightness (scale 0 to 255)
test_brightness=40
;
max_avg_brightness=25
;
max_commercialbreak=600
;
min_commercialbreak=25
;
max_commercial_size=125
;
min_commercial_size=4
;
min_show_segment_length=250
;
max_volume=500
;
max_silence=100
;
non_uniformity=500
[Detailed Settings]
min_silence=12
noise_level=5
brightness_jump=200
fps=25
validate_silence=1
validate_uniform=1
validate_scenechange=1
global_threshold=1.05
disable_heuristics=4
[CPU Load Reduction]
thread_count=2
play_nice_start=-1
play_nice_end=-1
play_nice_sleep=2
[Input Correction]
max_repair_size=200
ms_audio_delay=5
volume_slip=40
variable_bitrate=1
lowres=0
[Aspect Ratio]
ar_delta=0.08
cut_on_ar_change=1
[Global Removes]
padding=0
remove_before=0
remove_after=0
added_recording=14
delete_show_after_last_commercial=0
delete_show_before_first_commercial=0
delete_show_before_or_after_current=0
delete_block_after_commercial=0
min_commercial_break_at_start_or_end=39
always_keep_first_seconds=0
always_keep_last_seconds=0
[USA Specific]
intelligent_brightness=0
black_percentile=0.0076
uniform_percentile=0.003
score_percentile=0.71
[Main Scoring]
length_strict_modifier=3
length_nonstrict_modifier=1.5
combined_length_strict_modifier=2
combined_length_nonstrict_modifier=1.25
ar_wrong_modifier=2
excessive_length_modifier=0.01
dark_block_modifier=0.3
min_schange_modifier=0.5
max_schange_modifier=2
logo_present_modifier=0.01
punish_no_logo=1
[Detailed Scoring]
punish=0
reward=0
punish_threshold=1.3
punish_modifier=2
reward_modifier=0.5
[Logo Finding]
border=10
give_up_logo_search=2000
delay_logo_search=0
logo_max_percentage_of_screen=0.12
ticker_tape=0
ticker_tape_percentage=0
ignore_side=0
subtitles=0
logo_at_bottom=0
logo_threshold=0.75
logo_filter=0
aggressive_logo_rejection=0
edge_level_threshold=5
edge_radius=2
edge_weight=10
edge_step=1
num_logo_buffers=50
use_existing_logo_file=1
two_pass_logo=1
[Logo Interpretation]
connect_blocks_with_logo=1
logo_percentile=0.92
logo_fraction=0.4
shrink_logo=5
shrink_logo_tail=0
before_logo=0
after_logo=0
where_logo=0
min_black_frames_for_break=1
[Closed Captioning]
ccCheck=0
cc_commercial_type_modifier=4
cc_wrong_type_modifier=2
cc_correct_type_modifier=0.75
[Live TV]
live_tv=1
live_tv_retries=4
require_div5=0
div5_tolerance=-1
incommercial_frames=1000
[Output Control]
output_default=1
output_chapters=0
output_plist_cutlist=0
output_zoomplayer_cutlist=0
output_zoomplayer_chapter=0
output_vcf=0
output_vdr=1
output_projectx=0
output_avisynth=0
output_videoredo=0
output_videoredo3=0
videoredo_offset=2
output_btv=0
output_edl=1
edl_offset=0
edl_skip_field=3
output_edlp=0
output_bsplayer=0
output_edlx=0
output_cuttermaran=0
output_mpeg2schnitt=0
output_womble=0
output_mls=0
output_mpgtx=0
output_dvrmstb=0
output_dvrcut=0
output_ipodchap=0
output_framearray=0
output_debugwindow=0
output_tuning=0
output_training=0
output_false=0
output_aspect=0
output_demux=0
output_data=0
output_srt=0
output_smi=0
output_timing=0
output_incommercial=0
delete_logo_file=1
cutscene_frame=0
cutscene_dumpfile=""
cutscene_threshold=10
cutscenefile1=""
cutscenefile2=""
cutscenefile3=""
cutscenefile4=""
cutscenefile5=""
cutscenefile6=""
cutscenefile7=""
cutscenefile8=""
windowtitle="Comskip - %s"
cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\""
mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
[Sage Workarounds]
sage_framenumber_bug=0
sage_minute_bug=0
enable_mencoder_pts=0

This one ran this morning with postprocessing (also correct show) and none of the commercials skipped. Kinda given up on parallelprocessing for the moment. Also, I am using the "donator" version, this says "public" version. What's going on there?

################################################################
Generated using public Comskip 0.81.059
Time at start of run:
Sun Feb 16 08:01:01 2014
################################################################
Mpeg: D:\Recorded TV\CBS News Sunday Morning\CBS News Sunday Morning_20140216_06300800.ts
Exe comskip.exe
Logo: D:\Recorded TV\CBS News Sunday Morning\CBS News Sunday Morning_20140216_06300800.logo.txt
Ini: comskip.ini

Detection Methods to be used:
1) Black Frame
2) Logo - Give up after 2000 seconds
3) Resolution Change
4) Aspect Ratio


ComSkip throttles back from -0001 to -0001.
The time is now 0801 so it's full speed ahead!

Settings
--------
[Main Settings]
;the sum of the values for which kind of frames comskip will consider as possible cutpoints: 1=uniform (black or any other color) frame, 2=logo, 4=scene change, 8=resolution change, 16=closed captions, 32=aspect ration, 64=silence, 255=all.
detect_method=43
;Set to 10 to show a lot of extra info, level 5 is also OK, set to 0 to disable
verbose=10
;Frame not black if any of the pixels of the frame has a brightness greater than this (scale 0 to 255)
max_brightness=60
maxbright=1
;Frame not pure black if a small number of the pixels of the frame has a brightness greater than this. To decide if the frame is truly black, comskip will also check average brightness (scale 0 to 255)
test_brightness=40
;
max_avg_brightness=25
;
max_commercialbreak=600
;
min_commercialbreak=25
;
max_commercial_size=125
;
min_commercial_size=4
;
min_show_segment_length=250
;
max_volume=500
;
max_silence=100
;
non_uniformity=500
[Detailed Settings]
min_silence=12
noise_level=5
brightness_jump=200
fps=25
validate_silence=1
validate_uniform=1
validate_scenechange=1
global_threshold=1.05
disable_heuristics=4
[CPU Load Reduction]
thread_count=2
play_nice_start=-1
play_nice_end=-1
play_nice_sleep=2
[Input Correction]
max_repair_size=200
ms_audio_delay=5
volume_slip=40
variable_bitrate=1
lowres=0
[Aspect Ratio]
ar_delta=0.08
cut_on_ar_change=1
[Global Removes]
padding=0
remove_before=0
remove_after=0
added_recording=14
delete_show_after_last_commercial=0
delete_show_before_first_commercial=0
delete_show_before_or_after_current=0
delete_block_after_commercial=0
min_commercial_break_at_start_or_end=39
always_keep_first_seconds=0
always_keep_last_seconds=0
[USA Specific]
intelligent_brightness=0
black_percentile=0.0076
uniform_percentile=0.003
score_percentile=0.71
[Main Scoring]
length_strict_modifier=3
length_nonstrict_modifier=1.5
combined_length_strict_modifier=2
combined_length_nonstrict_modifier=1.25
ar_wrong_modifier=2
excessive_length_modifier=0.01
dark_block_modifier=0.3
min_schange_modifier=0.5
max_schange_modifier=2
logo_present_modifier=0.01
punish_no_logo=1
[Detailed Scoring]
punish=0
reward=0
punish_threshold=1.3
punish_modifier=2
reward_modifier=0.5
[Logo Finding]
border=10
give_up_logo_search=2000
delay_logo_search=0
logo_max_percentage_of_screen=0.12
ticker_tape=0
ticker_tape_percentage=0
ignore_side=0
subtitles=0
logo_at_bottom=0
logo_threshold=0.75
logo_filter=0
aggressive_logo_rejection=0
edge_level_threshold=5
edge_radius=2
edge_weight=10
edge_step=1
num_logo_buffers=50
use_existing_logo_file=1
two_pass_logo=1
[Logo Interpretation]
connect_blocks_with_logo=1
logo_percentile=0.92
logo_fraction=0.4
shrink_logo=5
shrink_logo_tail=0
before_logo=0
after_logo=0
where_logo=0
min_black_frames_for_break=1
[Closed Captioning]
ccCheck=0
cc_commercial_type_modifier=4
cc_wrong_type_modifier=2
cc_correct_type_modifier=0.75
[Live TV]
live_tv=0
live_tv_retries=4
require_div5=0
div5_tolerance=-1
incommercial_frames=1000
[Output Control]
output_default=1
output_chapters=0
output_plist_cutlist=0
output_zoomplayer_cutlist=0
output_zoomplayer_chapter=0
output_vcf=0
output_vdr=1
output_projectx=0
output_avisynth=0
output_videoredo=0
output_videoredo3=0
videoredo_offset=2
output_btv=0
output_edl=1
edl_offset=0
edl_skip_field=3
output_edlp=0
output_bsplayer=0
output_edlx=0
output_cuttermaran=0
output_mpeg2schnitt=0
output_womble=0
output_mls=0
output_mpgtx=0
output_dvrmstb=0
output_dvrcut=0
output_ipodchap=0
output_framearray=0
output_debugwindow=0
output_tuning=0
output_training=0
output_false=0
output_aspect=0
output_demux=0
output_data=0
output_srt=0
output_smi=0
output_timing=0
output_incommercial=0
delete_logo_file=1
cutscene_frame=0
cutscene_dumpfile=""
cutscene_threshold=10
cutscenefile1=""
cutscenefile2=""
cutscenefile3=""
cutscenefile4=""
cutscenefile5=""
cutscenefile6=""
cutscenefile7=""
cutscenefile8=""
windowtitle="Comskip - %s"
cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\""
mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
[Sage Workarounds]
sage_framenumber_bug=0
sage_minute_bug=0
enable_mencoder_pts=0
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

Thanks for noticing.
Due to a typo in a source file the donator version say public.
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

Mystery solved! The problem is not with Comskip (and thanks much for such a good and useful product), but with XBMC. I did a lot of Sherlock Holmes investigation on the net along with some experimentation to figure this out. It may very well be that I am not doing something right in XBMC. If so then I am surprised I did not have someone tell me already.

Anyway... I found it strange that Comskip worked with "The Beatles Grammy Special" yet it does not work with stuff I recorded just this morning. That was once I got the issue of the parallelprocessing to work. The only thing really different about "The Beatles" vs "CBS Sunday Morning" was that I had moved "The Beatles" files over to my movie directory (out of my Recorded TV directory) as I planned to keep it. Well, apparently when XBMC plays something that it believes to be from "Live TV" (even if the recording was finished hours or days before), it thinks it is streaming, therefore it does not even look for the "edl" file which is where it gets the info for commercial breaks. Once the files are placed in what it believes to be a "Movie" or "Video" directory, it now knows it is not streaming so when you go to play it, it looks for the "edl" file. When found, it starts skipping commercial just as it is suppose to.

So I just added my "Recorded TV" directory as a source for "Videos" and wa la! I watch the show (video) and it skips the commercials just like you would expect. So now I have setup the parallelprocessing again so the next time I record something (tomorrow morning at 4:30am) I will see if I can skip commercials with a currently recording TV Shows in the same manner. I will only post again if that fails. Otherwise this one can be closed out until someone tells me that XBMC should and can skip commercials on "Live TV" shows.

Thanks again erik for your support and patience. At least we know it is not an issue with your Comskip product. And by the way I have changed the "ini" parameter of "output_vdr=1" to "output_vdr=0" so as not to produce the vdr file. Apparently XBMC does not need it and when you erase a show that file stays there.

Good night.
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

The output_vdr is for videoredo so indeed not needed for xbmc
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

Just one last update. While parallelprocessing is working fine, I am not able to skip commercials automatically for any shows that are still in the process of being recorded. Once the recording process is finished, the commercials skip fine. I guess that is just the way it is suppose to work.
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

When you set
live_tv=1
comskip should start to produce output, although less accurate, while processing during recording
ReplayHarry
Posts: 7
Joined: Sat Feb 15, 2014 1:53 pm

Re: Parallel Processing

Post by ReplayHarry »

I have it set to live_tv=1. I verified thru the log. Still won't skip while recording is active using XBMC. As I said earlier, I am thinking this is a "feature" of XBMC.
erik
Site Admin
Posts: 3368
Joined: Sun Aug 21, 2005 3:49 pm

Re: Parallel Processing

Post by erik »

Guess so, I can't help any more
Post Reply