BETA: Smart Commercial Detection for TVE & Pluto

I get this when i try the timestamps

2021/12/22 17:58:03 [Recovery] 2021/12/22 - 17:58:03 panic recovered:
runtime error: index out of range [0] with length 0
runtime/panic.go:90 (0x433a74)
github.com/fancybits/channels-server/mpegts/stream_description.go:512 (0x7f06c8)
github.com/fancybits/channels-server/mpegts/rewriter.go:449 (0x7e8b75)
github.com/fancybits/channels-server/mpegts/rewriter.go:225 (0x7e7a64)
github.com/fancybits/channels-server/mpegts/rewriter.go:204 (0x122a164)
github.com/fancybits/channels-server/dvr/file.go:604 (0x122a152)
github.com/fancybits/channels-server/dvr/file.go:639 (0x122a909)
github.com/fancybits/channels-server/http_dvr_file.go:265 (0x1335bb1)
github.com/gin-gonic/[email protected]/context.go:165 (0x130d543)
github.com/fancybits/channels-server/http_dvr_file.go:34 (0x130d477)
github.com/gin-gonic/[email protected]/context.go:165 (0x130634b)
github.com/fancybits/channels-server/http.go:235 (0x13060b7)
github.com/gin-gonic/[email protected]/context.go:165 (0x130602a)
github.com/fancybits/channels-server/http.go:215 (0x130600f)
github.com/gin-gonic/[email protected]/context.go:165 (0x1305e91)
github.com/fancybits/channels-server/http.go:207 (0x13056bd)
github.com/gin-gonic/[email protected]/context.go:165 (0x9b7a41)
github.com/gin-gonic/[email protected]/recovery.go:106 (0x9b7a2c)
github.com/gin-gonic/[email protected]/context.go:165 (0x9b6ca6)
github.com/gin-gonic/[email protected]/logger.go:241 (0x9b6c89)
github.com/gin-gonic/[email protected]/context.go:165 (0x12b83ac)
github.com/gin-contrib/[email protected]/sessions.go:65 (0x12b8398)
github.com/gin-gonic/[email protected]/context.go:165 (0x12b25a9)
github.com/gin-contrib/[email protected]/gzip.go:47 (0x12b257f)
github.com/gin-gonic/[email protected]/context.go:165 (0x131ed61)
github.com/fancybits/channels-server/http.go:277 (0x131ed4b)
github.com/gin-gonic/[email protected]/context.go:165 (0x9b61dd)
github.com/gin-gonic/[email protected]/gin.go:420 (0x9b5e65)
github.com/gin-gonic/[email protected]/gin.go:376 (0x9b59c4)
net/http/server.go:2879 (0x6cf8da)
net/http/server.go:1930 (0x6caf87)
runtime/asm_amd64.s:1581 (0x46a4c0)

Hmm, are you using v2021.12.22.2144

If I remember correctly my logs looked similar to those before smart ad. Or may be not. Log here:

@tmm1 I'm an idiot... I thought I was on the latest version. All good with the latest

3 Likes

Great, that's what I figured.

I'm looking into the still placeholders on discovery and Viacom channels now.

Don't know if this is by design, but Smart Commercial Detection is happening even when the option
[ ] Enable Commercial Detection is unchecked. Not like it's taking any resources, but just saying.

Any chance of doing the same with Pluto?
Markers were within a few frames for the real ads on a Pluto recording I tried.
Only missed this stuff :arrow_down:
plutotv

I did add some pluto filler detection already, but there are probably more types. What channel is that on?

If you send me the timestamp of that frame and the recording's debug log I can fix it.

New build is up which should catch the placeholders on many TVE channels, including all the Discovery and Viacom ones.

I also found another technique that might work on all the nbc.com/live channels, and perhaps others as well. Will experiment more with that tomorrow.

4 Likes

I don't think it matters which Pluto channel.
The screenshot is what it looks like between the ending of one show and the beginning of the next.
It's only shown for about 10 seconds in the two test recordings I made.
I just picked two 30 minute shows starting at the same time.
Beverly Hillbillies channel was one and Classic Toons TV the other.

What I showed in the screenshot is from 29:46.43 (1786.43 secs) to 29:56.39 (1796.39 secs) in the Beverly Hillbillies recording. And is from 29:49.33 (1789.33 secs) to 29:59.29 (1799.29 secs) in the Classic Toons TV recording.

I would think it's very easy to duplicate, but if you need them, I can send the debug recording files for those 2 recordings.

Emailed compressed log files to support with Subject: Files requested in Forum Topic 30389

Thank you. Fix in next build.

2 Likes

Recording of Dr. Pol on Nat Geo Wild tonight, commercial detect sucked.
only did 2 tiny segments of like 1 min comercial. left everything else.

"2021/12/22 20:05:00.045363 [ADS] Detected 4 commercial markers in file-886: TV/The Incredible Dr. Pol/The Incredible Dr. Pol Three Sled Dogs Gliding 2021-12-22-1859.mpg"

2021.12.22.2144

Running comskip manually now.

2021/12/22 22:35:49.727879 [DVR] Running commercial detection on file 886 (TV/The Incredible Dr. Pol/The Incredible Dr. Pol Three Sled Dogs Gliding 2021-12-22-1859.mpg)
2021/12/22 22:52:26.421893 [DVR] Commercial detection for The Incredible Dr. Pol Three Sled Dogs Gliding 2021-12-22-1859.mpg finished with 10 markers in 16m36.710263595s.

Until this feature is fully hammered out, can u add options in passes for a show so that u can choose to use the new scanner or comskip?

The new scanner worked great on Wheeler Dealers on MotorTrend though.

For the recordings where it doesn't detect all the ads, what does your [MTS] Statistics line look like for the recording?

2021/12/21 21:03:00.095308 [MTS] Statistics for "TV/Airplane Repo/Airplane Repo S02E07 2014-10-03 Flying Blind 2021-12-21-1940.mpg": skipped=0 unhandled_packets=0 discontinuity_detected=93 transport_errors=0 invalid_pts=0 invalid_dts=0 saw_pcr=true saw_pmt=true highest_pts=4970.802867
2021/12/21 21:03:00.095361 [ADS] Detected 11 commercials in file-3058 TV/Airplane Repo/Airplane Repo S02E07 2014-10-03 Flying Blind 2021-12-21-1940.mpg

I had issues on FX also. Seems like some bug is not catching all the ads on those channels.

2021/12/22 21:01:00.042399 [MTS] Statistics for "TV/Wheeler Dealers/Wheeler Dealers S17E09 Mitsubishi Evo 7 2021-12-22-1959.mpg": skipped=0 unhandled_packets=0 discontinuity_detected=64 transport_errors=0 invalid_pts=0 invalid_dts=0 saw_pcr=true saw_pmt=true highest_pts=3731.397811

I meant for the one it didn't detect all the ads in, like The Incredible Dr. Pol

This is quite amazing. I used a curl command to turn off commercial detection on CNN. Now that this is available, how do I turn commercial detection back on now that this will skip the banner ads?

oops.

2021/12/22 20:05:00.034805 [MTS] Statistics for "TV/The Incredible Dr. Pol/The Incredible Dr. Pol Three Sled Dogs Gliding 2021-12-22-1859.mpg": skipped=0 unhandled_packets=0 discontinuity_detected=11 transport_errors=0 invalid_pts=0 invalid_dts=0 saw_pcr=true saw_pmt=true highest_pts=3967.267689

1 Like

Not necessary. It will work automatically