[mythtv-commits] Ticket #13335: mythcommflag: add 3 settings to enhance logo detection

MythTV noreply at mythtv.org
Thu Nov 8 12:58:41 UTC 2018


#13335: mythcommflag: add 3 settings to enhance logo detection
-----------------------------------+------------------------------
 Reporter:  hamelg                 |          Owner:  cpinkham
     Type:  Patch - Feature        |         Status:  new
 Priority:  minor                  |      Milestone:  needs_triage
Component:  MythTV - Mythcommflag  |        Version:  Master Head
 Severity:  medium                 |     Resolution:
 Keywords:                         |  Ticket locked:  0
-----------------------------------+------------------------------

Comment (by warpme):

 I tried Your branch ( gha-debug [v30-Pre-3d30b916cfe]) on my sample
 (http://warped.inet2.org/sample8.ts) with settings like this:

 {{{
 cat mythcommflag-override2
 CommDetectLogoSamplesNeeded=30
 CommDetectLogoSampleSpacing=2
 CommDetectLogoLocation=NE
 CommDetectLogoWidthRatio=6
 CommDetectLogoHeightRatio=8
 CommDetectLogoBorder=64
 CommDetectLogoGoodEdgeThreshold=0.80
 CommercialSkipMethod=4
 }}}
  with commandline:

 {{{
 mythcommflag --noprogress -v commflag:debug --override-settings-file /etc
 /mythcommflag-override2 --method 4  --skipdb --outputmethod full
 --outputfile /var/log/output.txt -f /var/http/sample8.ts
 }}}
 and result is:

 {{{
 mythcommflag --noprogress -v commflag:debug --override-settings-file /etc
 /mythcommflag-override2 --method 4  --skipdb --outputmethod full
 --outputfile /var/log/output.txt -f /var/http/sample8.ts
 MythTV Commercial Flagger, flagging commercials for:
     /var/http/sample8.ts
 2018-11-08 13:47:40.623983 C  mythcommflag version: gha-debug [v30-Pre-
 3d30b916cfe] www.mythtv.org
 2018-11-08 13:47:40.624017 C  Qt version: compile: 5.5.1, runtime: 5.5.1
 2018-11-08 13:47:40.624021 N  Enabled verbose msgs:  general commflag
 2018-11-08 13:47:40.624039 N  Setting Log Level to LOG_INFO
 2018-11-08 13:47:40.646498 I  Setup Interrupt handler
 2018-11-08 13:47:40.646512 I  Setup Terminated handler
 2018-11-08 13:47:40.646520 I  Setup Segmentation fault handler
 2018-11-08 13:47:40.646529 I  Setup Aborted handler
 2018-11-08 13:47:40.646536 I  Setup Bus error handler
 2018-11-08 13:47:40.646545 I  Setup Floating point exception handler
 2018-11-08 13:47:40.646553 I  Setup Illegal instruction handler
 2018-11-08 13:47:40.646562 I  Setup Real-time signal 0 handler
 2018-11-08 13:47:40.646573 I  Setup Hangup handler
 2018-11-08 13:47:40.646710 N  Using runtime prefix = /usr
 2018-11-08 13:47:40.646715 N  Using configuration directory =
 /root/.mythtv
 2018-11-08 13:47:40.646804 I  Assumed character encoding: en_US.UTF8
 2018-11-08 13:47:40.646811 W  This application expects to be running a
 locale that specifies a UTF-8 codeset, and many features may behave
 improperly with your current language settings. Please set the LC_ALL or
 LC_CTYPE, and LANG variable(s) in the environment in which this program is
 executed to include a UTF-8 codeset (such as 'en_US.UTF-8').
 2018-11-08 13:47:40.647192 N  Setting QT default locale to en_US
 2018-11-08 13:47:40.647204 I  Current locale en_US
 2018-11-08 13:47:40.647246 N  Reading locale defaults from
 /usr/share/mythtv//locales/en_us.xml
 2018-11-08 13:47:40.647817 N  Setting 'CommDetectLogoBorder' being forced
 to '64'
 2018-11-08 13:47:40.647827 N  Setting 'CommDetectLogoGoodEdgeThreshold'
 being forced to '0.80'
 2018-11-08 13:47:40.647838 N  Setting 'CommDetectLogoHeightRatio' being
 forced to '8'
 2018-11-08 13:47:40.647844 N  Setting 'CommDetectLogoLocation' being
 forced to 'NE'
 2018-11-08 13:47:40.647853 N  Setting 'CommDetectLogoSampleSpacing' being
 forced to '2'
 2018-11-08 13:47:40.647860 N  Setting 'CommDetectLogoSamplesNeeded' being
 forced to '30'
 2018-11-08 13:47:40.647866 N  Setting 'CommDetectLogoWidthRatio' being
 forced to '6'
 2018-11-08 13:47:40.647872 N  Setting 'CommercialSkipMethod' being forced
 to '4'
 2018-11-08 13:47:40.647951 I  Loading en_us translation for module
 mythfrontend
 2018-11-08 13:47:40.657868 I  Added logging to the console
 Finding Logo2018-11-08 13:47:40.875083 I  AFD: codec MP2 has 2 channels
 2018-11-08 13:47:40.876730 I  AFD: Opened codec 0x880340, id(MP2)
 type(Audio)
 2018-11-08 13:47:40.876999 I  AFD: codec AC3 has 2 channels
 2018-11-08 13:47:40.877266 I  AFD: Opened codec 0x881cc0, id(AC3)
 type(Audio)
 2018-11-08 13:47:40.877365 I  AFD: Opened codec 0x884340, id(DVB_SUBTITLE)
 type(Subtitle)
 2018-11-08 13:47:40.878599 I  AFD: Using ffmpeg for video decoding
 2018-11-08 13:47:40.878706 I  AFD: Opened codec 0x884e00, id(H264)
 type(Video)
 2018-11-08 13:47:40.879037 I  Commercial Detection initialized: width =
 1920, height = 1080, fps = 50, method = 4
 2018-11-08 13:47:40.879044 I  Using Sample Spacing of 10 horizontal & 10
 vertical pixels.
 2018-11-08 13:47:40.879067 I  CommDetect::ClearAllMaps()
 2018-11-08 13:47:40.976579 I  Finding Logo
 2018-11-08 13:47:40.976585 I  Searching for Station Logo
 2018-11-08 13:47:40.976612 I  Trying with edgeDiff == 5,
 minPixelsInMask=1800
 2018-11-08 13:47:41.259787 I  MythCodecContext: Disabled hardware decoder
 based deinterlacer.
 2018-11-08 13:47:54.681998 I  Analyzing edge data
 2018-11-08 13:47:54.694775 I  SetLogoMaskArea()
 2018-11-08 13:47:54.728568 I  SetLogoMaskArea()
 2018-11-08 13:47:54.737965 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:47:54.737982 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (4). Not within specified limits.
 2018-11-08 13:47:54.737988 I  Trying with edgeDiff == 7,
 minPixelsInMask=1800
 2018-11-08 13:48:05.264158 I  Analyzing edge data
 2018-11-08 13:48:05.290038 I  SetLogoMaskArea()
 2018-11-08 13:48:05.312691 I  SetLogoMaskArea()
 2018-11-08 13:48:05.321524 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:05.321541 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:05.321548 I  Trying with edgeDiff == 10,
 minPixelsInMask=1800
 2018-11-08 13:48:14.487058 I  Analyzing edge data
 2018-11-08 13:48:14.515259 I  SetLogoMaskArea()
 2018-11-08 13:48:14.524076 I  SetLogoMaskArea()
 2018-11-08 13:48:14.550862 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:14.550879 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:14.550886 I  Trying with edgeDiff == 15,
 minPixelsInMask=1800
 2018-11-08 13:48:23.959667 I  Analyzing edge data
 2018-11-08 13:48:23.988556 I  SetLogoMaskArea()
 2018-11-08 13:48:24.010918 I  SetLogoMaskArea()
 2018-11-08 13:48:24.020115 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:24.020133 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:24.020140 I  Trying with edgeDiff == 20,
 minPixelsInMask=1800
 2018-11-08 13:48:32.777320 I  Analyzing edge data
 2018-11-08 13:48:32.805642 I  SetLogoMaskArea()
 2018-11-08 13:48:32.814579 I  SetLogoMaskArea()
 2018-11-08 13:48:32.834186 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:32.834205 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:32.834211 I  Trying with edgeDiff == 30,
 minPixelsInMask=1800
 2018-11-08 13:48:42.406622 I  Analyzing edge data
 2018-11-08 13:48:42.419626 I  SetLogoMaskArea()
 2018-11-08 13:48:42.444387 I  SetLogoMaskArea()
 2018-11-08 13:48:42.468224 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:42.468241 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:42.468247 I  Trying with edgeDiff == 40,
 minPixelsInMask=1800
 2018-11-08 13:48:51.872341 I  Analyzing edge data
 2018-11-08 13:48:51.894459 I  SetLogoMaskArea()
 2018-11-08 13:48:51.916726 I  SetLogoMaskArea()
 2018-11-08 13:48:51.939054 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:48:51.939072 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:48:51.939078 I  Trying with edgeDiff == 50,
 minPixelsInMask=1800
 2018-11-08 13:49:01.268888 I  Analyzing edge data
 2018-11-08 13:49:01.289209 I  SetLogoMaskArea()
 2018-11-08 13:49:01.298792 I  SetLogoMaskArea()
 2018-11-08 13:49:01.328893 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:49:01.328910 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:49:01.328916 I  Trying with edgeDiff == 60,
 minPixelsInMask=1800
 2018-11-08 13:49:10.388408 I  Analyzing edge data
 2018-11-08 13:49:10.411963 I  SetLogoMaskArea()
 2018-11-08 13:49:10.433037 I  SetLogoMaskArea()
 2018-11-08 13:49:10.455002 I  Testing Logo area: topleft (1914,1074),
 bottomright (5,5)
 2018-11-08 13:49:10.455021 I  Rejecting Logo area: topleft (1914,1074),
 bottomright (5,5), pixelsInMask (0). Not within specified limits.
 2018-11-08 13:49:10.459036 N  No suitable logo area found.
 2018-11-08 13:49:10.570011 I  CommDetect::SetVideoParams called with
 aspect = 1.77778
 2018-11-08 13:49:47.367649 I  40% Completed @ 67.9385 fps.
 2018-11-08 13:49:57.530206 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.536302 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.547061 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.556717 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.567489 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.577185 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.586850 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.597597 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.607279 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.616963 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.627729 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.637412 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.647100 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.657858 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.667554 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.677217 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.687963 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.697696 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.708413 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.718096 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.727777 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.738522 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.748239 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.757914 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.768689 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.778404 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.788105 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.798846 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.808512 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.818186 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.828928 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.838612 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.849337 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.858979 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.868661 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.879422 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.889120 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.898819 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.909587 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.919300 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.928982 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.939746 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.949453 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.959119 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.969875 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.979556 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.989207 E  decoding error End of file (-541478725)
 2018-11-08 13:49:57.999951 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.009629 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.020370 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.030058 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.039763 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.050525 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.060183 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.069861 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.080613 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.090300 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.099984 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.110711 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.120408 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.131160 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.140838 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.150520 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.161249 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.170958 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.180655 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.191408 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.201103 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.210794 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.221537 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.231209 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.240901 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.251680 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.261410 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.271102 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.281858 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.291570 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.301237 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.311976 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.321656 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.332399 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.342097 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.351814 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.362627 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.372326 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.382033 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.392795 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.402456 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.412146 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.423063 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.432764 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.442470 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.453272 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.462951 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.472645 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.483395 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.493098 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.502807 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.513567 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.523246 E  decoding error End of file (-541478725)
 2018-11-08 13:49:58.533106 I  CommDetect::GetCommBreakMap()
 2018-11-08 13:49:58.533115 I  CommDetect::CleanupFrameInfo()
 2018-11-08 13:49:58.533126 I  ClassicCommDetect: Only found 0 blank frames
 but wanted at least 1, rechecking data using higher threshold.
 2018-11-08 13:49:58.533846 I  Minimum Average Brightness on a frame was
 -1, will use 2 as new threshold
 2018-11-08 13:49:58.537960 I  Found 3051 blank frames using new value
 2018-11-08 13:49:58.550410 I  CommDetect::GetLogoCommBreakMap()
 2018-11-08 13:49:58.552208 I  Logo Commercial Break Map
 2018-11-08 13:49:58.552219 I  Final Commercial Break Map
 0
 2018-11-08 13:49:59.595719 N  Finished, 0 break(s) found.
 }}}
 may You pls provide here Your log+settings from Your successful run on my
 sample?
 how it is possible that the same code+sample+settings gives different
 results...

-- 
Ticket URL: <https://code.mythtv.org/trac/ticket/13335#comment:9>
MythTV <http://www.mythtv.org>
MythTV Media Center


More information about the mythtv-commits mailing list