YPbPr Protocol for Senior DSP Project (University of Michigan)

Hello All,

This is my first time using Google Groups so bear with me! So, for my Electrical Engineering senior design class, I thought it would be cool to make a device that detects when commercials are on, mutes the television, and plays music until the show comes back on, in which case it un-mutes the tv. We were planning to do this by detecting black frames and audio dropoffs when the channel is transitioning from a tv program to commercials and vice versa. We wanted to use the YPbPr cables that come out of the cable box as our input because detecting black on the Y cable seems to be a pretty easy task. The only issue (so far) is that I am having a lot of trouble finding documentation on the protocol. I can't buy A/D converters until I know how fast I need to convert the incoming data, and I can't determine that until I see how the waveform is encoded. I really want to see where things like closed caption, tv ratings, and individual pixels are encoded.

I have seen a lot of information on the digital encoding of YPbPr such as

formatting link
formatting link

but it doesn't seem to describe anything that I am looking for.

Can anyone point me in the right direction? Time is of the essence!

Also, I thought that cable was now being broadcast in only digital to free up some bandwidth for other use. After looking at the Y signal coming out of a DVD player on an oscilloscope, it looked as though it was analog. Am I missing something again?

Thanks, and sorry for the long winded post!

-fjc

Reply to
fcon
Loading thread data ...

See if your library has a copy of "Video Demystified". If it's the one I'm thinking of, it should go into that in more than sufficient detail.

--
Tim Wescott
Wescott Design Services
 Click to see the full signature
Reply to
Tim Wescott

This paragraph bodes ill for your success. The characteristics of the signal coming down the wire from your cable provider have nothing (at an eyeball level) to do with the signal coming out of the cable converter box. And cable broadcasts have NOTHING whatsoever to do with what is coming out of a DVD player. Or to put it another way: What the hell are you talking about?

Reply to
larwe

I am going to build a Space Shuttle. I know it uses transistors. Would

2n3904 be a good transistor for a Space Shuttle?

fc> Hello All,

Reply to
Vladimir Vassilevsky

Yes!! All of my Space Shuttles use them!! ;)

Jon

Reply to
Jon Kirwan

Are you sure you are not going to get too many false positive and negative detections? TV programs transist from scene to scene all the time.

I see 13MHz on Y and 6MHz for Pb and Pr. What exactly are you looking for?

Yes.

Reply to
linnix

y
d

So we plan to use both audio and video based techniques to detect this. In transitions from show to commercial and commercial to show, we see a huge dropoff in the audio levels not present in scene transitions on most shows. We are really just doing a proof of concept project with a select few programs. Also the length of the period that black frames appear is much longer in between commercials and shows than in a scene transition. This is something we are definitely worried about.

Reply to
fcon

my

l
m
e
e
n

eed

e
h

..

g
!
l

I am really trying to be able to resolve individual pixels so I can process particular parts of the screen. I also am looking for other information like where the closed captioning is stored in the encoding so that I could potentially use that also. I really just want to see all the parts that make up the protocol so I know where to look when I start sampling.

Reply to
fcon

or my

ool

g

rom

the

g

sue

on

need

e

ike

uch

t...

ing

ce!

to

nal

it

Also, Tim, Thank you very much for pointing me in the direction of that text. It has a ton of good information in there that I think will prove very useful.

Reply to
fcon

I am sure the TV stations/netwroks who get their revenue from the adverts will love you, if you EVER made it work they would immediately change to avoid it.

Let's put it this way even for simplest Analog TV transmission, there is a lot of steps from the aerial to the screen.

I doubt proper analysis will show that all stations always transmit black frames between programme and advert, let alone just in your country.

Horror movies never have scenes with black or near black and silence for a few seconds...

Space Sci-fi never has nearly black backgrounds, that you might not distinguish the few stars as noise spikes or other DSP overflow problems.

You have no idea how much data you will be dealing with in a frame time

60 times a second, just to prove you actually have a completely black frame without noise or other issues. Let alone sudden high error rates in digital transmission artifacts appearing in the video.

You have done some very poor analysis using human eyeball on a TV to deduce a theory that is almost as well thought out as a politician's election promise.

Before even thinking of how to solve what YOU see as the 'problem' do some reading up using as mentioned by another Video Demystified Fourth Edition is

Publishers Newnes ISBN 0-7506-7822-4

Then build some way or use a frame grabber to actually analyse the video data (every line and frame) at transition points in detail.

Basically DEFINE your baseline of what you see the problem is THEN think how to solve it.

You are putting the cart before the horse, and not realising the horse is actually a herd of sheep.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul

I suggest you look at what a cable decoder/set top box consists of and realise that the Y Pb Pr signals are basically what almost directly drives the screen (like you computer screen).

What you are asking is akin to saying -

"On my PC, I want to extract the mouse input movement signals by decoding the screen output on a VGA connector."

It could be reverse engineered but is a lot more difficult than actually looking at the mouse directly.

--
Paul Carpenter          | paul@pcserviceselectronics.co.uk
    PC Services
 Click to see the full signature
Reply to
Paul

-------------------------^^^^^^^^^^^^^^^^^^^

I.e., you have a great deal of liberty in selecting what sort of project you undertake (?)

Silly rabbit... :> I think you will find this is considerably harder than that. Consider, if it was *that* easy, EVERY VCR, PVR, etc. would have that function built in since most *consumers* would pay dearly for that "automatic" ability.

Could I suggest, instead, you throw together a "closed captioning" decoder? Possibly with a different "spin" (e.g., something that timestamps each CC and/or logs to a file a "transcript" of the program).

Or, even something "simple" that detects the aspect ratio of the image and (is capable of) signaling a converter box how to change presentation modes, accordingly [I can't understand why the DTV decoders don't all do this automatically!]

[assuming, of course, you want to stick with "video" as a signal of interest... there are myriad other issues that might be even more deserving of your time...]
Reply to
D Yuniskis

I.e., the OP is looking for REAL TIME commercial detection. If he was looking to provide this functionality in a PVR environment, there would be no need to "play music until the show comes back on" -- he could just skip *past* it.

That influence doesn't extend to smaller firms who can make a device, sell it and *not* care if the "system changes" later and makes its use ineffective.

You will note that there have been several devices marketed purporting to achieve this goal. I.e., PVR manufacturers don't seem too bothered by all that "influence".

Most MythTV users are geeks. And, more accommodating of problems with technology. Everyone that I know who has built a MythTV setup *played* with it for a while and then silently stopped using it. I.e., if it was *that* good, one would expect it to be "all the rage".

Detecting commercials RELIABLY in real-time (i.e., a false positive deprives the viewer of the content of the broadcast) is a different problem than ex post facto.

Commercials (USA) *tend* to have durations that are integer multiples of 15 seconds -- with most falling in the 15, 30 and 60 second categories.

Commercials *tend* to come in groups of 2 - 6 (or 8).

Commercials *tend* to be delineated by a few black frames (defining "black" can be a problem as dark scenes can appear "black").

Commercials *tend* to occur at certain points *in* the program. Note that this has changed, historically, as more broadcasters try to slip an extra "commercial block" into each half-hour. Note, also, that materials presented "with limited/no commercial interruptions" still have built-in "commercial insertion points".

Commercials *tend* to inhibit closed captioning information (though detecting it as "missing" vs. "not present" is ambiguous).

Commercials *tend* to have louder audio than the programming that they interrupt (though there is no guarantee that the programming's audio won't have a similar dynamic range).

Commercials tend to be more "frenetic" (for want of a better word :< ) than most programming (i.e., the scene changes occur at much higher frequency as the camera flits back and forth between "shots").

Commercials tend to have more "flashing"/beating in the image (in addition to the scene changes) -- flashing text, etc.

No single/few of these criteria are enough to *reliably* (i.e., no false positives; false negatives are more tolerable) detect a commercial as it happens. If you have knowledge of the future (i.e., have *seen* the future and can now go back and "edit the past"), you can increase your accuracy -- as long as you have lots of processing power at your disposal (i.e., aren't also busy displaying stored video).

The MANUAL "commercial skipper" appears to be the 80/20 solution requiring a minimum of user interaction for maximum results. And, of course, the old faithful: getting up for a 2 minute trip to the bathroom! :>

As such, I think most PVR users are happiest with the "skip 30 seconds" means of "commercial avoidance" as they don't have to worry that the machine has elided some portion of the program without their knowledge.

Reply to
D Yuniskis

Definitely not! The weightless conditions would wreak havoc with electron/hole flow as they wouldn't know which way was "ground". Everyone KNOWS that the only way to switch signals in outer space is with RELAYS!

Reply to
D Yuniskis

There used to exist a product that did precisely what the OP describes, in precisely this way. The trick was that the transition point was a "blacker black" than simply a full screen of black; it was some kind of in-band signal mechanism I believe. TTBOMK this trick is an artifact of the age of steam and it is no longer possible to work this way.

Reply to
larwe

I'd think the best way to do this is with some kind of spam filter logic, and a time-delay so you're watching the stream delayed say 30 seconds. Of course, training the system would be required (e.g. if you see Billy Mays anywhere in the frame, assume it's commercial).

Reply to
larwe

TV stations and media proprietors have a lot of money and influence. Quite apart from which if any ad-skipping system became widespread there would be an instant change in system, leading to a pointless arms-race and consequent consumer frustration. VCR vendors have been smart enough to avoid that.

Apparently the automatic ad-skipping in MythTV works quite well. I haven't built a MythTV setup, but have friends who have. The cheapest HD PVR is a 2nd-hand Mac Mini or similar with a USB tuner.

Clifford Heath.

Reply to
Clifford Heath

Sure. Offer a subscription service which would send a special signal (via the Internet or some other way) when commercials are on for every channel. This signal could be generated by a computer or even by a human operator.

There is no need to process video to do that; it is enough to process sound. A common MCU is sufficient to do basic feature detection and pattern matching.

But I found the simpler solution: there is no TV in our house. None at all. Since 99.9% of TV is shit anyway, there is no point watching it.

formatting link

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

Definitely not. You should be using the 2N3906. The arrow on the

3904 is backwards. Has been for 40 years. You'd think they'd have fixed that by now...
--
Grant Edwards               grant.b.edwards        Yow! HUMAN REPLICAS are
                                  at               inserted into VATS of
 Click to see the full signature
Reply to
Grant Edwards

No, space if full of vacuum, so it's VACUUM tubes, obviously.

--
Grant Edwards               grant.b.edwards        Yow! I'm imagining a surfer
                                  at               van filled with soy sauce!
 Click to see the full signature
Reply to
Grant Edwards

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.