My "standard" is as follows...
* 8-bit video left-channel. 0-255 range. 8-bit audio right-channel.
* 19200Hz (this gives 32 scanlines of 48 pixels)
* synch bits NOT present in the video data - they are inferred from the sample # in the file
The task, then, is to convert a typical NBTV WAV file into the above format, using Audacity. Install it!
Next, we need to install a plugin that's going to allow us to do 'DC-offsets' to the video track. Place the DC-Offset tool file in the Audacity plugins folder, and restart Audacity.
You will need to install a plugin to audacity to perform the DC-offset step in the instructions below. Grab it from http://forum.audacityteam.org/viewtopic.php?f=42&t=68463
Just dot-points for now...
- Load NBTV format WAV file. It's likely to be a CD-format file with 44100Hz frequency
- Set the project rate to 19200Hz in the bottom left area. Audacity has an insane remapping of some number keys to different things, so you can't type in numbers in there unless you either cut/paste '19200' from somewhere, or remove the idiotic key mapping. To do the latter, delete whatever is assigned to '1' in preferences/keyboard.
- We should see two waveforms on the screen - left track (video) on top, and right-track (audio) on bottom. First thing is to resample to 19200Hz - select Tracks/Resample and type in 19200.
- Next we want to split the tracks so we can process the video separately. There's a little black down-arrow/triangle in the top left of the track window area. Select that, and then 'Split Stero to Mono'
- Make sure the top (video) track is highlighted - should have a yellow border around the entire. It is probably displaying a smallish (in height) waveform about halfway up (i.e,. with its base somewhere near 0). We have to do some manipulation to get rid of the synch pulses, and then to 'stretch' it to use the full range. Although it's a signed waveform (having positive and negative values) in audacity, when we output to an 8-bit WAV file, the values become unsigned (with 0 at the bottom). So we'r going to have to do some manipulation to make that happen.
- Zoom in (use the magnifying + for horizontal, and drag the bottom of the yellow-bordered area for vertical) and determine the amount of DC offset (if any) you need to apply to have the synch pulses negative and the video data positive.
- Now the DC-offset tool applies to all the tracks, and we don't want our audio track to change. So, double-click the audio (bottom) track, and hit command-c or menu/copy or Ctrl-C whatever floats your boat to copy it to the clipboard. We're just copying it so we can put it back in a sec... but for now we need to DELETE the track. Mark it again and press the delete key. Or, we could have used "cut" (Ctrl-X or Command-X) in the earlier step. In any case, we want it blank but held in our clipboard.
- Select "effect/DC offset" and change the drop-boxes to "add offset" and "absolute" and then set the value to the amount you determined a couple of steps back. For example, to shift the whole track downwards by 0.1 you enter -0.1 into the offset box. Hit OK.
- OK, so we've just manipulated the video track so that the synch pulses are negative, and the rest of the 'video' is positive. We've also buggered the audio track, but it's safely in our clipboard, so all OK. Time to clip off the negative values. Click on the video (upper) track, and then select "Effect/Nyquist prompt". Tick the box "use legacy syntax" and then in the entry area put "(s-max s 0)" without the quotes. Click OK.
- Now we're going to "expand" the video so that it uses the full range of available values when it's represented as 8-bit unsigned. We need to do another offset first, so that half of the range of the video is positive, and half is negative. I eyeball this, and in the one I'm looking at now, the highest value is at about 0.5. So, for your example, find this, and subtract half of it using the "effect/DC offset". In my case I'm using -0.25.
- Now it's time to amplify the track so that the upper ranges of the values are at the extremes (-1 and +1) of the available range. Choose "effects/amplify" and the default amplifaction should be the maximum without clipping. Should be OK to choose that value, but if you want more you will need to set "enable clipping" on the dialog box. You can undo (Command-Z or Ctrl-Z) if you get this wrong and want to try a different value. Once you're done, the waveform should occupy the whole height of the window it's in. Now we're getting somewhere.
- So let's put back our saved audio track... double-click the audio track again, and paste (command-v or Ctrl-V or menu/paste) the clipboard. It should jump back to what it was before. Bango!
- We need to recombine the tracks - in fact we choose that little black triangle droplist again and choose "make stereo rack".
- Time to export. Select "file/export audio". We change the format droplist at the bottom to "other uncompressed files" and then click on the "options" button. Choose "WAV (Microsoft)" for the header, and "unsigned 8-bit PCM" for the encoding. Click OK. Now type your filename in the "save as" entry area, select the detination directory and then "save". I'm going to start using .nbtv8.wav as for my file naming, to make it clear what format they are. For example, "test.nbtv8.wav"
If all that worked, then you have just convered an existing NBTV WAV file into my "8-bit" format and it will pretty much look like the original when being played. However, it's now 19200Hz instead of 44100Hz - and 8-bit audio/video instead of 16-bit so will be roughly 20% of the size.