Log in

View Full Version : Widescreen signaling data in MPEG-2


Dave1024
23rd January 2012, 18:19
Hi,

I just read about an introduction about wide screen signalling. [http://en.wikipedia.org/wiki/Widescreen_signaling] .

Even read this I had some doubts about about this.

-Is it possible to encode the WSS data along with MPEG-2 ?

-Where I can detect the WSS information in an mpeg-2 file.?

-Will I can expect this in user data of the compressed stream.?

-Which standard will give decoding of an NTSC video encoded using MPEG-2

encoder.

Thanks
Dave

Ghitulescu
23rd January 2012, 18:38
You got the answer to this question once. http://forum.doom9.org/showthread.php?p=1522797#post1522797

And a simple search for WSS -> http://forum.doom9.org/showthread.php?t=114955&highlight=wss

TheSkiller
24th January 2012, 17:10
-Is it possible to encode the WSS data along with MPEG-2 ?
-Where I can detect the WSS information in an mpeg-2 file.?
Yes that's possible. It's in the first half of the first line (top most line) of the 576 lines used to carry the (digital) picture in 50Hz television systems.

Here's how it looks:
http://img821.imageshack.us/img821/6613/wssline.th.png (http://imageshack.us/photo/my-images/821/wssline.png/)
The white dashes at the very top left is the WSS signaling.

However...
Since the actual (analog) picture in 50Hz systems consists of 574 whole and 2 half lines the WSS signal happens to be in the top "half scanline" which does not carry picture – and that means that many if not most devices that play back such MPEG2 video will blank this area or insert their own WSS there, so the chances of getting such a hard coded WSS to the TV is rather low. I've seen it getting passed only once with a super cheap DVB-S receiver.

-Will I can expect this in user data of the compressed stream.?Yeah, as it's part of the picture in digital storage it's always there if it was put there and wasn't erased (blanked) at some point.

-Which standard will give decoding of an NTSC video encoded using MPEG-2Not sure what you mean but afaik there is no WSS in 60Hz systems, and if there is it is most likely not within the 480 lines held in digital storage.

Ghitulescu
24th January 2012, 17:30
That's the teletext (videotext).
The WSS signal is missing, as the image you posted is a pure 4:3 one (technically 43LB).
The WSS is embedded in line 23 AFAIK and this is not recorded in normal MPEG-2 systems, as they drop the first 24-25 lines (halflines). That's why the MPEG system developed the DAR flag.

TheSkiller
24th January 2012, 18:02
No it is definitely a valid WSS signaling. WSS can be present in 4:3 as well because it holds much more flags that just the DAR.
If you don't believe me you can check out what the WSS in that picture says using "ProjectX", it reads the bits of the WSS line.
It will tell you:

WSS status @ line 0 (23):
Run-In-Code found @ 7
Start-Code found @ 36
Group 1 (Picture Format) start @ 60:
* 4:3 full format, 576 lines, full screen
Group 2 (Picture Enhancements) start @ 84:
* camera mode
* standard PAL
* no helper
* reserved (0)
Group 3 (Subtitles) start @ 108:
* no subtitles in teletext
* no 'open subtitles'
Group 4 (others) start @ 126:
* no surround sound
* no copyright/unknown
* copying not restricted

And all that just from those dashes up there.


Furthermore, if you watch a channel that broadcasts WSS like that you can see that one of the dashes (bits actually) changes from a short one into a long one exactly whenever there is a transition from 4:3 to anamorphic 16:9 and vice versa.

The WSS is embedded in line 23 AFAIK and this is not recorded in normal MPEG-2 systems, as they drop the first 24-25 lines (halflines)
The half lines can't be "dropped" for MPEG because then you would be left with 574 whole lines and 2 half ones - how would you encode that to a 576 lines picture?
Because of that the other 2 half lines needed to make up 576 whole lines are present in MPEG2 as well although they are not supposed to hold picture and don't need to carry any signaling but there is nothing that stops an MPEG2 stream from carrying WSS anyway even if it's not needed due to digital flags.

Ghitulescu
24th January 2012, 18:53
The half lines can't be "dropped" for MPEG because then you would be left with 574 whole lines 2 half ones - how would you encode that to a 576 lines picture?
Because of that the other 2 half lines needed to make up 576 whole lines are present in MPEG2 as well although they are not supposed to hold picture and don't need to carry any signaling but there is nothing that stops an MPEG2 stream from carrying WSS anyway even if it's not needed due to digital flags.

I know that, maybe I expressed myself somehow unclear.

It's strange however that the signal contains this info digitally stored, when it can be easily reconstructed from a "clean" TS stream. This includes not only the WSS, but also macrovision and teletext.

kieranrk
24th January 2012, 23:03
It is not that uncommon to see WSS data encoded in a compressed stream. It just means that the encoder didn't do any line blanking at the top.

The MPEG DAR is not a replacement for WSS because it can only be changed per GOP. WSS in DVB-VBI or conversion to AFD is an appropriate, frame-accurate alternative.

pandy
27th January 2012, 18:36
It is not that uncommon to see WSS data encoded in a compressed stream. It just means that the encoder didn't do any line blanking at the top.

True, for example MTV in Europe is retransmitted by many broadcasters (cable or terrestrial) with original (analog) WSS present in first half of line 23 - when decoder is setup-ed for display 4:3 in letterbox mode and currently received video is 16:9, WSS signal can be visible over video - decoder produce correct WSS on line 23 but line 23 from MPEG video is now visible around real video lines 108 - 113.

Dave1024
2nd February 2012, 18:55
Hi,

still I had some doubts, as wiki page says there is 14 bits of information is present @ line 23/283 ,
a) what is the offset from the start position to first informative bit position. ?
b) how many pixels be part of a bit ?

:thanks:
Dave

2Bdecided
2nd February 2012, 19:26
Download EN 300 294 from http://pda.etsi.org/pda/queryform.asp - it has everything you could want to know. It's free. It's not a simple pixel:bit relationship.

Cheers,
David.

pandy
3rd February 2012, 16:16
still I had some doubts

and read http://forum.doom9.org/showthread.php?t=114955

dil
9th February 2012, 10:43
refer to ETSI EN 300 472 and ETSI EN 301 775 standards

Dave1024
22nd February 2012, 18:47
Thanks for the docs info.

How can I test the WSS data presence in a stream ?

Is it possible to encode WSS using MPEG-2 encoder ? which are they ?

I really need some test vectors which had WSS on top of the frame ?

Thanks
Dave

pandy
23rd February 2012, 11:36
Thanks for the docs info.

How can I test the WSS data presence in a stream ?

What type of stream - please be very precise on this.



Is it possible to encode WSS using MPEG-2 encoder ? which are they ?


Yes - however way how to encode the WSS depend from type of the stream.


I really need some test vectors which had WSS on top of the frame ?

Thanks
Dave

? are You asking or what? :confused: :o

TheSkiller
24th February 2012, 15:55
How can I test the WSS data presence in a stream ?
Just look at the raw encoded MPEG2 video using something that doesn't filter it in any way. For example VirtualDub (with MPEG2 plugin or the old MPEG2 version of VirtualDub). Look at the first line and see if there are dashes looking like the ones that you can see in my picture in post #3 of this thread.

You can also just load the video in ProjectX and it'll tell you if there is any WSS present and it will even decode the WSS line telling you what it actually signals.


Is it possible to encode WSS using MPEG-2 encoder ? which are they ?Any MPEG2 encoder will do it since they don't care about the content of the picture they encode. The problem is rather where can you get a valid WSS from to overlay it on your video or how to generate it yourself.


Edit: And then again, even if you manage to put a valid WSS line into an MPEG2 video (like for a DVD) it is questionable of what use it is since, as I described in post #3, this area where the WSS is encoded gets most likely blanked, shifted or overridden by the devices own WSS during playback. The WSS line is only read out by the TV (if it is capable of that), the DVD-Player does not care or know whether there already is a WSS present or not.