Enhanced UK advert detection

Please excuse how vague I am on the technical explanation but I'm of the understanding that DVB streams on most channels in the UK have an indicator which the broadcasters can use (some do, some don't) to signal the start of a programme and also the start and end of ad breaks. I have a dedicated YouView box and the recordings for most channels start almost perfectly on time. I've seen this in action with TVHeadEnd which I used to run but wondered if it was something which could be used to enhance the advert detection (or indeed whether that was already in use).

I've found a thread on the TVHeadEnd forums which discusses this (didn't want to link in case it breaks your terms) but apparently the data is embedded in the EIT data.

I don't believe that Channels uses EIT data; all of their guide info comes from Gracenote, rather than using any data embedded in the stream.

(SiliconDust does not support EIT in any of their software. Tvheadend does, and does quite well. As far as other packages, I'm unsure of their status.)

Some discussion regarding this in the past here: Feature request: "Accurate Recording" support in UK

Unfortunately we don't have anything like this in the USA which makes it very hard for us to develop this feature.

Do you know if the HDHR sends the unmodified transport stream to the end points or if it's doing some re-packaging of the data? I've just streamed a channel to VLC directly from my HDHR and the stream and it does appear to be the raw transport stream (judging by the bitrate, resolution and presence of DVB subtitles) - I could do with grabbing a sample and putting it through something which could identify the transport stream.

Again looking back at the TVH forums, some people are using HDHR's as source devices and TVH is recognising the EIT headers in the transport stream so I would suggest (notwithstanding I've not proven it myself).

The HDHR http api sends a raw transport stream, however the EIT PID (0x12) is not included. To get that you have to use the UDP api manually.

Apologies for the dupe - I had a look but couldn't find anything related.

That may well be a problem in terms of testing. Do you guys have the ability to inject a transport stream from another source for the purposes of testing or can/do you only use real HDHR streams?

It'd be easy enough to capture chunks of data for testing purposes but no good if you can't consume them.

Ah bummer.

Oh well, the current advert detection works fairly good and I would assume it will be subject to continual improvement over time so fingers crossed there. I just thought if there is something in the data (even if it only works in the UK/wider Europe) that it would make the ad detection more accurate without having to manually detect the switching.

You can manually get the full unfiltered stream yourself using hdhomerun_config which is essentially just a wrapper around SiliconDust's UDP library.

$ hdhomerun_config FFFFFFFF set /tunerN/channel auto:456000000
$ hdhomerun_config FFFFFFFF save /tunerN stream.ts

In the above example, FFFFFFFF is the DeviceID of your tuner, tunerN is the tuner you wish to use (starting with tuner0), 456000000 is the frequency of the channel that you wish to tune in Hertz, and stream.ts is the local name of the file that you wish to save the stream as. When you have enough of a stream to play with, simply cancel the process with ^C.

While you can tune the channel using the UDP library using virtual channel numbers (ie, 14.2), when you set the tuner in that manner it automatically does some filtering, which probably includes the EIT streams you are looking to capture.

(If you want to ensure that you free the tuner you are using when you are finished you can set the channel to none:

$ hdhomerun_config FFFFFFFF set /tunerN/channel none

In general this shouldn't be necessary, though, as the tuner will release a tuner after a brief period of inactivity if it hasn't been locked.)

Sadly no UK channel that I'm aware of uses EIT data to mark ad breaks. As far as I know only one of the Swedish broadcasters does this, maybe TV4?

Most UK channels DO use EIT data to mark the start and end of programmes. I wish Channels could find a way to implement it so we could have more accurate recordings since UK broadcasters seem to deviate from their schedule more frequently than US broadcasters. I'm willing to be a tester, but I recognise it's difficult for the developers to work on this without direct access to DVB broadcasts.