UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Television Standards Converters, Modulators etc

Notices

Television Standards Converters, Modulators etc Standards converters, modulators anything else for providing signals to vintage televisions.

Closed Thread
 
Thread Tools
Old 25th Apr 2009, 10:04 pm   #1
MutantApe
Retired Dormant Member
 
Join Date: Mar 2008
Location: Le Mans France
Posts: 2
Default Effortless 819 lines (PC simulation)

( long post but practical details are mostly at the beginning)

If, just like me, you are curious to see 819 lines (again) , but:
- your are disapointed by the fact that Aurora converters just show blown up 625,
- you consider your chances to lay your hands on a workable 819 TV set to be slim at best,
- you have grave doubts regarding your ability to put it back in working order,
- you don't look forward to putting your fingers in 15 kv circuitry or witnessing a
CRT implosion close and personal,

i can suggest another path...

What you will see:
==================
Interlace emulation on a progressive PC monitor, with full 819 theroretical definition
video, produced from 1080p/25 material (well, sped-up 24p, in fact), in black & white,
almost full screen (20 pixels wide black borders at most), together with monaural
sound. I will also try to upload a 1080p/50 based video soon.

This represents the highest possible quality with this standard, not taking into account the impairments produced by modulation/demodulation, propagation conditions, and the limitations of 819 lines cameras, or of the mass-produced 819 lines TV sets. In principle, of course, these could also be simulated.

For that you will need :
========================
A 4/3 monitor able to operate at exactly 1024x768 resolution. This is mandatory.
It would normally be a CRT monitor operated at XGA setting, or perhaps an LCD with a native 1024x768 matrix (but i have not tried that and it is further from the historical truth anyway). Ideally the monitor should be set to 50 Hz refresh rate, but surprisingly it does not create awful artifacts if you use some other rate.

A PC with a CPU and hard disk able to cope with lossless (HuffYuv) encoded "819p/50", monaural AAC sound, all in an mp4 container.

Some software player compliant with these codecs and datarates. I managed quite well with :
VLC (videolan)
Media Player Classic- Home Cinema + ffdshow + reclock
Mplayer/ MPUI
Or even Windows Media Player (not sure if it uses ffdshow or not)

The easiest way:
================
- download the short video i have put at:
http://dl.free.fr/jkwwx9Kyt
(careful, it weights 500 MB, and that is only for a 20s duration)
- set your graphic card/monitor to 1024x768@50 Hz
- open the video in your player and display it full screen (mandatory)

Be sure to deactivate deinterlacing, too, as it produces flashing video in MPC-HC , for example.

As for me, i had trouble with my stupid ATI driver, which allows me to use 50 Hz, or 1024x768, but not both at the same time. I had to resort to a trial version of Powerstrip to get the setting i needed.

It is better to use some cache to smooth the video playback , as these are high datarates. In VLC, you have to open the file in advanced mode, show all options to see the cache setting, and use 1000 ms. In MPUI, you can go to preferences and add -cache 50000 in the parameters box.

It is also better to use the repeat mode, since it is such a small clip.

One additional refinement would be to watch from a distance that will allow for the same apparent picture size as the one experienced by the viewers at the time of the real broadcasts. Picture diagonal is reduced by a 0.96 factor, due to the black borders. So if you have a 17" (43.18 cm) monitor and want to see the same picture size as the owner of a 55 cm TV set watched from a distance of 3 meters, the distance between you and your monitor should be :
d = 3 x (0.96 x 43.18) / 55 = 2.26 meters.

This video is called "film mode", as the source document is 24p. This does not stress the interlaced format, so i will add another one extracted from 50p later (however, since i can't easily find true 1080p/50 on the web, it will probably be created from the same source using motion-compensated framerate upconversion).

The other way
==============
if you want other, longer videos :
create them by yourself using the Avisynth scripts i provide further down in this post. you will need to have the related tools on your PC for this.

The principle :
===============
Interlaced wrapped in progressive (i know, usually it is the other way around).
After i have cropped and resized the full HD to a 4/3 819 lines picture, i divide it into even and odd fields. Then i replace the missing lines in each of them by black ones. Starting from 25p, i therefore obtain 50p progressive frames that have alternatively odd and even lines blackened. If i play this at 50 Hz on a progressive monitor, i recreate the visual impression of the alternating odd and even fields on an interlaced display.

That picture structure can absolutely not be scaled up or down (at least in the vertical direction) and must be displayed at the exact resolution it has been created with (as is always the case for interlaced material). So if your player starts out in windowed mode, you will observe severe picture impairments, but it becomes fine once you switch to full screen mode.

Why lossless compression ?
===========================
The black line structure is defined at the pixel level and would probably not tolerate the artifacts and approximations created by lossy compression. Furthermore, the motion compensation algorithms will probably be puzzled by the black and not-black pixels alternance. And last, the frames are not truly usual interlaced ones, so the interlace mode of the codecs cannot be used. I did not even try, and went for lossless.

Besides the problem of internet transmission, i also needed compression because my PC could not execute the Avisynth script in real time. I had to save it in a file and play it afterwards. But the raw data rate was too high and created other problems. With lossless compression and cache settings i finally have smooth video playback.

One other thing :
=================
the theoretical resolution of 819 lines is in fact 816x737 on screen visible pixels (see Wikipedia, for example). I had to settle for 816x736 since my tools insult me if i do not provide a 4-multiple dimension. Not a big deal since probably more than one line were lost to overscan in the real world. A real TV set would strech this to a 4/3 aspect ratio, thus displaying non-square pixels. Now an XGA PC screen is based on square pixels. So to emulate TV sets , i resize horizontally to get a 984x736 frame. Mind you, the resize is done from the 816x736 source, not from the original full HD. That way, the final video does not contain more information than the 819 standard allows for.

To sum up
=========
my script performs the following actions, starting from 1920x1080p/24 :
- force framerate to 25p
- crop sides to get a 4/3 centered video (1440x1080)
- turn to black & white
- resize to 816x736
- separate fields
- add black lines
- horizontal resize to 984x736
- add black borders (20 on sides, 16 for top and bottom) to get a full 1024x768 video and prevent any scaling at playback.


Two possible use of the scripts:
================================
1) use the script in one piece and compress the output to HuffYuv (for example with VirtualDub + ffdshow). The advantage is that it can be played without Avisynth. But i eats up a lot of disk space, and hence playtime is limited.

2) The other way is to put in one script all the resizing operation, and compress the output using standard lossy codecs.
Then make a second script that contains only the interlace emulation, and uses the previous lossy-compressed video as an input. this emulation is simple enough to be performed in real time. You can get a video that is as long as usual, but if you transmit it over the net, you need to provide the interlacing script with it, and the user will need avisynth.

Before i give the script, i will go into some considerations related to
819/720p comparison :
=====================
At first sight, the 737 lines of the 819 standard are better than 720.

But a picture is a two-dimensional object, and resolution is better described by the pixel count :
819 : 816x737 = 601 392
720p : 1280x720 = 921 600

Now 720p is a 16/9 format, while the ambition of 819 was to do 4/3 only. One could therefore compare the on-screen pixel density, by cutting out a 4/3 picture out of a 720p display. This subpicture would contain 960x720 = 691200 pixels, still 15% better than 819. But keep in mind that european SD at 576i is 20% higher resolution than the US 480i and both are considered to be roughly in the same SD ballpark. So 720p and 819 in those conditions could be called close.

Could we conceive of a situation where a 16/9, coloured progressive and a 4/3 black & white interlaced standard would look the same? I think so, in the specific case where an old 4/3 black & white movie is broadcast (this was once a popular cinema format, before the advent of television). Film source would cancel the progressive advantage, black & white would cancel the colour advantage, and if the 4/3 aspect ratio si preserved in the 720p broadcast, its 16/9 advantage would not show up either. So on two screens set side by side, the videos would probably look close enough.

Now it is good to remeberthat first official 819 broadcasts date back to 1949 (!), while 720p broadcasts must have began in 1998 or so. So that is about half a century... And 819 brodcasts had a small advantage : they were not compressed at all.

Ok so now i am done, no more talk, here is the avisynth script (to be split in two if you want, as explained before) :

#Source is a 1920x1080p/24 (16/9) video
DirectShowSource("C:\path\VideoFullHD.mp4")

AssumeFPS(25000,1000)

#Crop sides to get a 4/3 picture (1440 x 1080)
crop( 240, 0, -240, 0)

#Turn to black & white
greyscale()

#Scale to target 819 resolution (non-square pixels)
#normally 737 but some tools want a 4-multiple
LanczosResize(816,736)

#Resize to square pixels for PC display
# (have to use height though it is counter-intuitive)
A=LAST
A=A.bilinearresize(984,A.height)
A

# Megui/x.264 claims it needs this
ConvertToYV12()

#================================================= =====
# Split here in two scripts if you want to
# do real time interlace emulation from a
# normally compressed video.
#================================================= =====

#If this part is used in real time standalone mode, open the compressed video here
#DirectShowSource("C:\path\CompressedScaledVideo.m p4")

AssumeTFF

Original=SeparateFields

EvenFields=SelectEven(Original)
EvenFields=AssumeFrameBased(EvenFields)

OddFields=SelectOdd(Original)
OddFields=AssumeFrameBased(OddFields)

BlackFields=Blankclip(EvenFields,color=$000000)

Even=Interleave(EvenFields,BlackFields)
Even=AssumeFieldBased(Even)
Even=AssumeTFF(Even)
Evenprog=Weave(Even)

Odd=Interleave(OddFields,BlackFields)
Odd=AssumeFieldBased(Odd)
Odd=AssumeBFF(Odd)
OddProg=Weave(Odd)

Interleave(EvenProg,OddProg)

#Add black borders to prevent scaling
AddBorders(20,16,20,16)
MutantApe is offline  
Old 25th Apr 2009, 10:35 pm   #2
Boom
Retired Dormant Member
 
Join Date: Jan 2007
Location: Westbury, Wiltshire, UK.
Posts: 2,451
Default Re: Effortless 819 lines (PC simulation)

Thanks for that post. The video is downloading. I have wondered if it would be possible to convert 625 to 405 rf using a pc. I am pretty sure that it could given a suitable modulator.

Dave
Boom is offline  
Old 26th Apr 2009, 8:24 am   #3
Sean Williams
Dekatron
 
Sean Williams's Avatar
 
Join Date: Feb 2005
Location: St.Ippolyts, Hitchin, Hertfordshire QRA IO91UW
Posts: 3,517
Default Re: Effortless 819 lines (PC simulation)

Would suggest you look at the work done by Kat Manton........ FOTH TV might work as a search string.....
__________________
Engineers make things work and have spare bits when finished
Sean Williams is offline  
Old 26th Apr 2009, 8:28 am   #4
evingar
Octode
 
evingar's Avatar
 
Join Date: Oct 2003
Location: Newbury, Berkshire, UK.
Posts: 1,770
Default Re: Effortless 819 lines (PC simulation)

Jim's site :-

http://www.g1jbg.co.uk/fothtv.htm
__________________
Chris
evingar is offline  
Old 26th Apr 2009, 10:35 am   #5
MutantApe
Retired Dormant Member
 
Join Date: Mar 2008
Location: Le Mans France
Posts: 2
Thumbs up Re: Effortless 819 lines (PC simulation)

Thanks for the links. The first one seems to be more oriented towards producing suitable signal for an external vintage monitor. My proposal has much less ambition, is a standalone computer operation, and is therefore easier for the lazy bones like me...
Still have to look at the second link.

But in the meantime, i had promised a 50p-sourced video, so here it is.

http://dl.free.fr/jfJsWPcIg

I used mvflowfps to do motion compensated frame rate upconversion from 25p to 50p, then i extracted the odd field from odd frames, and the even field from even frames (well, perhaps the other way around, since Avisynth counts starting from 0, so first frame is even). Anf of course, i still add black lines as before, so it is the same video structure, just from a different source.

I intended to show interlace artifacts with that, but i am afraid the only visible artifacts are from motion compensation, which tends to blur things or distort edges when motion is too high. Nevertheless, it is really visible only when you watch frame by frame. At normal speed it goes largely unnoticed.
MutantApe is offline  
Old 26th May 2009, 7:19 pm   #6
murphyv310
Dekatron
 
murphyv310's Avatar
 
Join Date: Sep 2006
Location: Kilmarnock, Ayrshire, UK.
Posts: 5,422
Default Re: Effortless 819 lines (PC simulation)

Hi
I have access to at least half a dozen 819 line sets. For me though not being that computer orientated post 1 is far too complex, so I will stick to my Aurora multistandard converter & the RT Russell Test card generator, and a home made modulator
Cheers
Trevor
__________________
Cheers,
Trevor.
MM0KJJ. RSGB, GQRP, WACRAL, K&LARC. Member
murphyv310 is offline  
Closed Thread




All times are GMT +1. The time now is 8:31 pm.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.