This is very stupid. Like, really, really stupid.
You know how composite video uses those simple red and white “RCA” cables for left and right sound, and yellow for the picture? The only thing special about component or composite cables is the colour on the ends of them, so if you run an audio channel down a yellow “video” cable it will still work, and vice versa. I know it’s possible bc of those cheap cables that have a headphone jack on one end, leading to composite video and mono sound on the other (because you have to sacrifice one audio channel for the video if you’re doing it that way).

I want to send a shitty composite video signal out of my shitty laptop’s headphone jack to plug into a shitty old CRT so I can use it as a secondary monitor without buying a video converter that would likely do a worse job then my laptop anyway. Also, since I have a spare audio interface, I can shoot the video signal out of a different hole so I don’t even have to sacrifice a sound channel.
I wonder, has anyone tried to write a program like this before? If it exists, I have no clue what to search for to find it, and it’s such an absurd thing to spend your time doing, but I want to try this idea so bad.

  • OwOarchist@pawb.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    9 days ago

    I’m not sure that your audio interface would even be capable of producing a usable video signal, at a hardware level. It could be that the expected voltages or frequencies just aren’t within a normal sound card’s capabilities to produce.

    To test whether this is a viable idea or not, I’d suggest a test setup like this:

    1: Plug your adapter cord into the audio output and a CRT TV’s video input.

    2: Play simple sine waves of various frequencies through the audio output. (480 lines x 30 fps seems to suggest a frequency of 14400hz – or multiples/fractions of that – might do interesting things?) Start with very low power (low volume settings) and gradually work your way up until you see results … or smoke.

    3: Observe and see whether any frequency you try produces any sort of picture or pattern on the screen.

    If that simple test is successful at producing repeatable patterns on the screen, then it might be worth looking into finding/making a software solution to take advantage of it, to allow you to draw arbitrary patterns on the screen and actually use it to display things.

    Edit: looking into it a little more, 14400hz (or thereabouts) would be one oscillation per line on the TV screen. If you wanted to, say, paint that line in 10 different intensities as you scanned across the screen, you’d need to change the audio output level at 10x that rate: ~144khz. And from what I can find online, consumer sound cards top out at ~48khz (which is far above the range of human hearing anyway, and even farther above the range of most speakers/headphones, so it makes sense for sound cards). Assuming you can get 48khz out of yours, you’d be able to paint each line on the screen in … about 3 intensity levels as it scans across, which means your ‘pixels’ are 1/480 of the screen vertically and 1/3 of the screen horizontally. So you’d be able to draw interesting patterns on the screen, but you’d never be able to get sufficient horizontal resolution to be a proper video display output.

    Edit 2: Maybe you could do better by lowering the resolution and/or refresh rate of the TV? If you could get a TV to scan with a 240-line vertical resolution, that would give you twice as much time in each horizontal line, allowing you to draw 6 different intensities in each horizontal line. Or, likewise, if you could get the TV to run at a 10fps frame rate, that would give you 3x as much time, allowing 9 different intensities in each line. If you combined both of those together, you could get an impressive 54 horizontal ‘pixels’ per line, giving you a 240p, 10hz display that’s almost kind of sort of usable for displaying an intelligible video? That would probably require significant modification to your TV’s hardware, though. Depending on how phosphorescent your TV’s screen is, it might also appear to flicker at frequencies below 30hz. Maybe if you also increased the beam intensity? … But at this point, it’s starting to sound easier to make a purpose-built display screen for this from scratch.

    Edit 3: If you can get an old oscilloscope with a CRT display (they’re pretty affordable on ebay), you could connect the audio output to that and perhaps manage to use it as a display. Those old oscilloscopes have user-configurable scan rates and beam intensities, which will do a lot of the work for you. You’d need both channels of the audio signal for that. Signal 1 would just be a 30hz (or whatever refresh rate you’re going for) ramp, to scan the beam across the screen in lines from top to bottom. Signal 2 would have to be wired into the guts of the oscilloscope and control the beam intensity (which is usually controlled by a single knob). With that, you could potentially use a PC’s audio output to draw a usable display on an oscilloscope.

    • cloudskater@piefed.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      9 days ago

      Ohhh as soon as you started talking about frequencies I realized the issue. I never even thought about how high video frequencies are. That should have been my first thought. Now, that said, I’ll still give this a go. My interface does have a stupid high sample rate it can use, and if i use a DAW like Ardour and set it to ALSA mode, it should talk directly to the interface with no PulseAudio or PipeWire in the middle to limit that rate. I’ll try it tomorrow!

      Edit: re-read your comment and remembered that my interface goes up to 196khz or something! This MIGHT work!

      • Kris\Slyka@pawb.fun
        link
        fedilink
        arrow-up
        2
        ·
        8 days ago

        @cloudskater @OwOarchist a standard definition video signal has a bandwidth of around 5MHz and is usually digitized at a sample rate of 13MHz. Even with a sound card that goes up to 196khz you only have about one fiftieth of the bandwidth required for a video signal.

        You *can* still generate sound that will result in visible patterns, but don’t expect any actual images

        • cloudskater@piefed.blahaj.zoneOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 days ago

          Ahhh thank you for the clarification. I tried to play the recording back and yeah, it was a mess. No colour and blurry as hell. It was a fascinating experiment if nothing else.

      • OwOarchist@pawb.social
        link
        fedilink
        English
        arrow-up
        2
        ·
        8 days ago

        was it something that it was specifically designed for?

        Definitely. It’s not the kind of thing you could do by accident.

    • l_b_i@pawb.social
      link
      fedilink
      arrow-up
      1
      ·
      8 days ago

      consumer sound cards top out at ~48khz (which is far above the range of human hearing anyway

      When talking about digital and analog, the specifics of what the frequency that’s being talked about is. The Nyquist rate is the digital sample rate you need to reproduce an analog signal. It is double the maximum analog frequency you are looking to reproduce. So a sample rate 44.1khz (CD sample rate) is the sample rate need to reproduce < 22kHZ signals. So if you wanted to reproduce an analog signal at 144kHZ you would actually need to sample at greater than 288kHZ.