UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio 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 20th Jul 2011, 12:03 pm   #61
ppppenguin
Banned
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Simple memory card player idea

Quote:
Originally Posted by Karen O View Post
You know, I think the time is not very far away when compression (JPEG, MPEG) will be unnecessary and considered quaint throwbacks (i'm thinking here of when a petobyte memory stick is commonplace).
I somehow doubt it. The more memory we have, the more we want to store on it. Also while memory may be getting a lot bigger and cheaper, communications channels are not. Well not at the same rate. RF spectrum is definitely a scarce resource.
ppppenguin is offline  
Old 20th Jul 2011, 1:51 pm   #62
neon indicator
No Longer a Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

RF Spectrum is indeed essentially a fixed resource with the Information throughout now within a few percent of the Shannon Boundary.

An HD Film in MPEG4 H.264 might be 10 Gbyte. Uncompressed that's about 1/2 a terabyte, excluding sound.

Today's "3D" is fake. It's Stereoscopic, so only needs twice the bandwidth for same resolution. Holographic based 3D is far too much information. We don't need that much 3D information. Likely for HD a "Z" resolution of about 800 is fine. That's simply 800 times the bandwidth or storage. But a Compression algorithm for such "true" non-stereoscopic 3D with MPEG like structure will achieve even more compression ratio than 2D as there is much more redundant detail.

With MPEG4 compressed regular TV a PVR with many Terabytes opens the idea of recording ALL the channels in a two week loop, and when you browse the EPG you "mark" what you want to keep. No need for expensive "catch up" IPTV / VOD /Web TV which can cost the broadcaster up to 10,000x more than live broadcast. Such a PVR is possible today.

Compression is not going away.
neon indicator is offline  
Old 20th Jul 2011, 1:55 pm   #63
Karen O
Hexode
 
Karen O's Avatar
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 414
Default Re: Simple memory card player idea

Can you point me in the direction of a modulator design, Neon Indicator?

Prefereably a simple one and definitely not one with chips with tiny little legs
Karen O is offline  
Old 20th Jul 2011, 1:56 pm   #64
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

You could try asking on uk.tech.broadcast - that's how I acquired my Pye 405/525/625 monitor (mostly solid-state, slowly getting more reliable; I should overhaul it properly rather than just fix it when it breaks!)

I'd second the suggestion of the little Sony TV9-90UB; I have approximately 1.8 of them (I'll probably re-case the incomplete one without the tuner/IF bits at some point.) Poor sync ('cogging' on test cards) is a common fault; replacing electrolytics in the sync-sep. cures that. A neat trick with them is they'll do 405-line on UHF if you push both buttons in at the same time; that let me test my Linux/MythTV system with a UHF modulator (easily pinched from a VCR.)

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Old 20th Jul 2011, 2:13 pm   #65
neon indicator
No Longer a Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

To adapt a CB AM one transistor Modulator for 405:

(e.g. http://www.vk2zay.net/article/159 )

1) Use 1/2 the capacitor AND 1/2 tuning coil, or 1/4 of either to get 54MHz instead of 27MHz

2) Invert the video with a one transistor amplifier or in software, if modulation is wrong polarity.

3) Up to 3MHz video is feeding in, instead of the "CB" audio, so any decoupling capacitor to ground at modulator input needs to be about 200x smaller.

4) Sound can be added by a separate 3.5MHz? AM RF modulator (same design but bigger coils & capacitor) with it's o/p added to the video signal (intercarrier princple). Whatever the sound carrier offset is.

5) I've been a bit unwell, but I can knock up a design on veroboard using almost any NPN silicon transistor and 6V to 12V supply with no special parts if you get stuck.


I also think it's feasible to modify some cheaper type transistor portables that have a "line hold" to be 405 monitors simply by adding parallel capacitors. It's 10.125kHz vs 15.625KHz, so on an RC circuit you need about 50% more capacitance and on LC a bit more than twice capacitance.

The Line oscillator is likely RC on a 625 6" portable and the LOPT stage is likely LC tuned. So with a schematic I could spot where to add 2 or 3 capacitors. I've never tried it though! I'd not like to try it on a later model set (they derive Frame by dividing line rate, needs to be one with Frame & Line hold knobs) or on a large set (LOPT more likely overloaded).

There are 49MHz "toy walkie talkies" in the shops. One of those can be easily modified as AM for 405 Video, though at a fixed 49.something MHZ due to the crystal.
neon indicator is offline  
Old 20th Jul 2011, 2:21 pm   #66
ppppenguin
Banned
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Simple memory card player idea

The 3 main published 405 modulator designs are David Looser's, Darius's and mine. David's and mine are based around the commonplace 1496 balanced modulator chip. Darius's has no chips at all. Mine uses the HF modulator cans from old Rediffusion converter boxes. Hence not really feasible now unless you have a couple around that haven't been raided. David's design, which predates mine, is essentially the same but built from scratch.

I think that both Darius's and David's designs can be found somewhere in the forum. Mine can be found on my website.

I would strongly recommend a video monitor rather than modulator and TV if you are trying to evaluate 405 video sources.
ppppenguin is offline  
Old 20th Jul 2011, 2:32 pm   #67
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

Modulator - ETF Modulator kit ($30 inc. P&P, can order/pay by PayPal, scroll to the bottom of this page.)

Probably the simplest solution; I've got one (though I still haven't built it as none of my 405-line only sets work.) As an added bonus, it helps support the museum; IMO well worth supporting.

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Old 20th Jul 2011, 2:44 pm   #68
neon indicator
No Longer a Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

Yep, go for the Museum kit http://www.earlytelevision.org/405_modulator.html unless you like messing with RF. Looks like a decent enough design, though the IC is really for 525 TV with FM sound. I'd have just used a transistor. I've used the 1496, but it's overkill as you don't need a suppressed carrier.

But Jeffrey's right. You really need a monitor. Virtually all 405 TVs are "live" chassis, so to adapt a TV to a monitor you'd need an isolation transformer as well as change over switch and buffer at the video and audio detector diodes. I've converted plenty of 625 sets to be TV/Monitors. Straight forward if you have schematic and the isolation transformer.
neon indicator is offline  
Old 20th Jul 2011, 2:56 pm   #69
ppppenguin
Banned
 
ppppenguin's Avatar
 
Join Date: Dec 2003
Location: North London, UK.
Posts: 6,168
Default Re: Simple memory card player idea

Also worth noting that if you have an Aurora it can be used as a modulator for an external 405 line video signal.
ppppenguin is offline  
Old 20th Jul 2011, 3:32 pm   #70
Karen O
Hexode
 
Karen O's Avatar
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 414
Default Re: Simple memory card player idea

Thanks for all the tips and pointers - plenty to think about. I probably will go for the museum modulator.

It's probably not obvious from the picture of my hardware but the board size is chosen to fit an extruded instrument case. I was hoping to include a modulator on a second board but that is probably not practical now...

I'm going to need help on the software side. I need to write a program that produces the multi-gigabyte file for writing to the card. I have written PC programs in C, C++ and C# but I have no idea how to decompress movies. And if I want a general purpose utility that can accept as input a wide variety of movie formats and resolutions, then there are image scaling issues to worry about. All sounds a bit heavy to me
Karen O is offline  
Old 20th Jul 2011, 4:17 pm   #71
neon indicator
No Longer a Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

Use FFmpeg, Dscaler or many other tools
neon indicator is offline  
Old 20th Jul 2011, 4:46 pm   #72
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

I'd definitely recommend doing the PC side on Linux, if only because there's so much free stuff available. You don't need to know how to decompress movies when there's a library which already does it.

I've already mentioned ffmpeg; you may find this handles all the decompression and scaling you need; I'm fairly sure it can write to stdout so all you'd need then is a program which reads the already decompressed and scaled raw video from stdin then writes it to the card device.

Alternatively, take a look at the libraries used by ffmpeg; it may turn out to be better to write your software to use the same libraries as ffmpeg to perform decoding/scaling. This might be a better option as I imagine you'd want to decode the audio, resample it, and interleave it with your raw video data on the card (and there are audio decoding and sample-rate conversion libraries too.)

On my main system, ffmpeg tells me it's using the following libraries (and I might not have it compiled with everything):

Code:
  libavutil     50.33. 0 / 50.33. 0
  libavcore      0.13. 0 /  0.13. 0
  libavcodec    52.96. 0 / 52.96. 0
  libavformat   52.84. 0 / 52.84. 0
  libavdevice   52. 2. 2 / 52. 2. 2
  libavfilter    1.62. 0 /  1.62. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Alternatively, if you've got the hard drive space, ffmpeg could probably be used to decode/scale the video and decode/resample the audio, producing two files in the format you need. Your software then just needs to read them, massage the data into the interleaved format required by your player, then write it to the card.

(I'm all for not reinventing wheels; if there are tools, libraries and pre-existing software which work, I use them - which is how the 405/819/etc. Linux/MythTV system came to pass; I didn't write one single line of code for that!)

Question: What format does the video data need to be in? I'd guess at 8-bit greyscale, 512-bytes per line (the block size of the CF card), interlaced; do you want 405 lines 'padded' with black (if you keep reading data out during the VBI) or just the active lines (if you stop reading during the VBI)? I've played around with ffmpeg quite a lot and could probably work out the 'magic incantation' to get data out of it in whatever format you require. It has many knobs and levers..!

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Old 20th Jul 2011, 5:20 pm   #73
Karen O
Hexode
 
Karen O's Avatar
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 414
Default Re: Simple memory card player idea

Hi Kat,

It doesn't sound so bad but I've not done any Unix programming for a very long time. I like the idea of a standard program outputting a raw 377i file and an audio file, and then writing a small utility to handle the data repackaging and writing to the card. I think I could handle the latter.

My player format will use a sector to store one scan line. These will be in blocks of 188 or thereabouts, alternating odd and even fields. There's no need to store the blank lines as the PIC uses this time to issue the Read Sector(s) command to the card.

Audio is likely to be messy. My plan is that the last four bytes of each sector are reserved for audio, leaving 508 bytes for picture information, which is enough.

I plan to use an audio sample rate of 30.375kHz - three times line frequency. I'm a little concerned here - if the program responsible for decompression produces an audio file even slightly off this rate, there will be lip syncing problems after half an hour or so.

My pixel clock is 6.25MHz which, I think is very close to square pixels for 405 lines. Here's my maths I used to work this out:

Active lines = 377 = vertical pixels

At an aspect ration of 4:3, that means there are bout 503 horizontal pixels

These pixels are spread over an active line time of 80.3usec

So square pixel clock = 6.26MHz

Even if this is wrong, I'm still using a pixel clock of 6.25MHz!
Karen O is offline  
Old 20th Jul 2011, 5:45 pm   #74
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

Square pixel or otherwise; either is easy enough. I'll take a look later and see if I can get a few seconds of raw video out of ffmpeg (and knock up some code to display it so I can verify it's producing what's required.)

I have a feeling I could get ffmpeg to produce 503 or 508 pixels/line padded to 512 bytes with 'black' (and upload a file somewhere if it helps you with testing.)

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Old 20th Jul 2011, 6:23 pm   #75
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

Just as an illustration of the sort of things ffmpeg can do (this doesn't do what you want); from one of many scripts I have lying around:
Code:
#!/bin/sh

nice -n 10 ionice -c3 ffmpeg \
-i "$1".mpg -flags ildct+ilme -top -1 \
-vf "crop=0.75*in_w,format=gray,scale=504:376" -aspect 235:189 \
-vcodec libx264 -vpre baseline -vpre fast -crf 28 \
-acodec copy \
-alang eng -vlang eng \
-threads 0 -y \
-f matroska "$1"BW.mkv
That crops the middle 4:3 chunk from a 16:9 .mpg movie (of any resolution), converts it to greyscale, scales it to 504 x 376, re-encodes it with H.264 then muxes the audio (copied unchanged) and video into a matroska container (without hogging my CPU or disk I/O; 'nice'/'ionice' before the command.) I put these lengthy commands in simple scripts to save typing the whole mess out every time. It's simple, honest...

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Old 21st Jul 2011, 9:48 am   #76
Karen O
Hexode
 
Karen O's Avatar
 
Join Date: Jul 2011
Location: Bridgnorth, Shropshire, UK.
Posts: 414
Default Re: Simple memory card player idea

I've got my partner Kevin building a Linux computer for me and he's promised he'll install ffmpeg so I should be set up for doing file conversions very soon.

The options for ffmpeg are vast but doubtless comprehensive. Were you thinking in terms of two runs of ffmpeg Kat: one to extract video and a second to extract audio. Ah no - you can list multiple conversions in one call can't you?

My, how things have moved on...
Karen O is offline  
Old 21st Jul 2011, 12:41 pm   #77
davegsm82
Heptode
 
davegsm82's Avatar
 
Join Date: Jan 2004
Location: Blyth, Northumberland, UK.
Posts: 854
Default Re: Simple memory card player idea

What is the modulation frequency band for VHF? I've got plenty of those kids walkie-talkies kicking around (and they can be bought for about 4 a pair anyway).

I've also got 1 or 2 54mhz crystals somewhere too.

Dave.

Last edited by Kat Manton; 21st Jul 2011 at 1:50 pm. Reason: OT stuff moved
davegsm82 is offline  
Old 21st Jul 2011, 1:17 pm   #78
neon indicator
No Longer a Member
 
Join Date: Jun 2010
Location: Co. Limerick, Ireland.
Posts: 1,183
Default Re: Simple memory card player idea

I don't remember what the 405 Band I is. But all the early Band I/III/UHF 625 tellies here can do about 42MHz to 70MHz, 170Mhz to 300MHz and 465 to 880MHz. Later models did 42MHz to 890MHz with no gaps (so as to suit cable TV). It's only a few years ago that our "local" Band I 625 Colour TX closed.

It depends on the 405 line TV. later ones have a wider tuning range. Some you have to retune the biscuit cores for an "off channel" signal.

In theory 49MHz and 54MHz are in Band I. But for a home modulator a one transistor osc with regulator between it and and battery or PSU is stable enough at that frequency even without a crystal.

Last edited by Kat Manton; 21st Jul 2011 at 1:51 pm. Reason: OT stuff moved
neon indicator is offline  
Old 21st Jul 2011, 1:56 pm   #79
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

<moderator> This thread concerns Karen O's memory card player. I've just moved OT parts of two posts to a more appropriate thread. Next time I or another mod. may just delete anything off-topic. </moderator>
__________________
Voider of Warranties.
Kat Manton is offline  
Old 22nd Jul 2011, 2:19 am   #80
Kat Manton
Octode
 
Kat Manton's Avatar
 
Join Date: Jul 2005
Location: West Yorkshire, UK.
Posts: 1,701
Default Re: Simple memory card player idea

Hi,

It doesn't seem possible to get interlaced raw video out of ffmpeg.

However, the following does produce interlaced raw video, with 503 pixels per line, 377 lines, and each line padded to 512 bytes.

Script to drive ffmpeg (save as 'video2raw.sh'):
Code:
#!/bin/sh

# video2raw.sh

CUT=""
VFOPTS=""

# Comment out to convert whole file, or edit as required.
CUT="-ss 00:04:00 -t 00:00:04"

# Comment out if source is 4:3
VFOPTS="crop=0.75*in_w,"

# Edit as required
VFOPTS="${VFOPTS}format=gray,scale=503:377"

nice -n 10 ionice -c3 ffmpeg \
-i "$1" $CUT \
-vf $VFOPTS \
-vcodec rawvideo \
-pix_fmt gray \
-threads 0 -y \
-f rawvideo - | ./reinterlace > "$2"
Note the last line; the output of ffmpeg is stdout; this is piped into stdin of 'reinterlace'; stdout of that, in turn, is directed to whatever's specified as the second argument when calling the script.

What is 'reinterlace'? This is 'reinterlace' (save as 'reinterlace.c' and compile it.)
Code:
#include <stdio.h>
#include <string.h>

/*
 * reinterlace.c
 *
 * compile with:
 *  gcc -Wall -o reinterlace reinterlace.c
 *
 * Read progressive video from stdin
 * Write interlaced video to stdout
 * Adjust #defines as required
 */
    
#define HRES    503
#define VRES    377
#define BLOCK   512

int main()
{
    char line[BLOCK];
    char efield[VRES/2][BLOCK];
    int odd, lcnt, elcnt, fcnt;
    lcnt = 0;
    elcnt = 0;
    fcnt = 0;
    odd = 1;

    while ((fread(line, 1, HRES, stdin)) != 0 )
    {
        if (odd)
        {
            fwrite(line, 1, BLOCK, stdout);
        }
        else
        {
            memcpy(efield[elcnt], line, HRES);
            elcnt++;
        }
        odd ^= 1;
        lcnt++;
        if (lcnt >= VRES)
        {
            lcnt = 0;
            elcnt = 0;
            odd = 1;
            fcnt++;
            fwrite(efield, 1, BLOCK * (VRES/2), stdout);
        }
    }
    fflush(stdout);

    fprintf(stderr, "\n\nreinterlaced %d frames\n", fcnt);
    
    return 0;
}
Yes, I'll freely admit that it's extremely nasty, has no error checking, pads lines to 512 bytes with uninitialised data and needs editing to alter the resolution it handles. But it's a quick and dirty hack which produces data in the right format. Feel free to expand on it, it's a start

Usage: Run 'video2raw.sh' with two arguments; the first is the video file to convert and the second is the file to write.

It's highly probable that you could pass the CF card device as the second argument thus writing converted data directly to it, but I haven't tried that.

I've verified the output of the above mess is correct with an even nastier hacked-together mess of Python which reads the data, displays it, and allows one to step frame-by-frame. It's utterly dreadful so I'm not posting it. The C program is bad enough; I have some standards...

Kat
__________________
Voider of Warranties.
Kat Manton is offline  
Closed Thread

Thread Tools



All times are GMT +1. The time now is 9:03 am.


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 - 2018, vBulletin Solutions, Inc.
Copyright ©2002 - 2018, Paul Stenning.