I was helping out a Windows 10 user who's machine was becoming unusably slow. First step was obvious, replace spinning rust hard drive with an SSD.
Unfortunately the machine is a HP All-in-One and the upgrade process was extremely convoluted and the risk of damage high. Did watch a long and painful YouTube video describing the process.
In the end I helped them buy a new better spec'd machine with an SSD. But the story does not end there.
They considered the unit e-waste, even though it had a nice big 23" screen. I had seen some YouTubers talking about cheap HDMI - USB devices and I wondered if I could use one to convert this PC in to a monitor.
Long story short, I can!
I installed OBS Studio in Windows 10, plugged in the USB device and connected a
Raspberry Pi to the HDMI. Selecting the correct source meant that OBS displayed the Pi screen as if it was a webcam. FYI: right click the grey area around the image in OBS to select true, border-less, full-screen.
Now the long story. I did not want to run Windows just to get this setup to work as a monitor, so I looked around for a well respected
Linux distro that was lightweight and up to the job.
Linux Mint XFCE edition seemed to fit the bill, so I
wrote the
Linux Mint ISO to a USB stick
dd if=linuxmint-20.1-xfce-64bit.iso of=/dev/sdd oflag=direct bs=1048576
(where
/dev/sdd is the location of MY usb stick, double check yours or risk overwriting import stuff with
no way of recovering it!)
Went into the partition manager in Windows 10 and right clicked the main drive (1TB) and choose
shrink. This took a couple hours to complete because the previous owner had a lot of files. I had already backed them up, but there was no need to wipe them out.
Then booted from the Mint USB stick(*) and ran the install process, selecting dual boot with Windows.
(*) Not easy to get into the HP BIOS and change the boot order. Had to press ESC repeatedly to get the "BIOS Information" then press F10 to get into the actual BIOS settings. At no point was there any kind of prompt for either action. You had to already know the secrets.
Once Mint was installed and the machine rebooted I could install OBS Studio and re connect the
Raspberry Pi OBS worked in exactly the same way as in Windows and it worked perfectly.
Now, I wanted the machine to boot to Mint, run OBS and switch to the correct source and display full screen all unattended. But OBS does not really support anything useful command line-wise.
Was there another way?
Yes! It's
Linux there is always another way.
mplayer works just fine
mplayer -fs tv:// -tv driver=v4l2:device=/dev/video2:width=1920:height=1080
I got the video number from
v4l2-ctl --list-devices
HP High Definition 1MP Webcam: (usb-0000:00:10.0-2):
/dev/video0
/dev/video1
USB Video: USB Video (usb-0000:00:12.0-1.1):
/dev/video2
/dev/video3
video0 and video1 are the single built in webcam. No idea what video3 is, it didn't work.
Not specifying the width and height resulted in a full-screen image that appears to be up-scaled 640x480, Ouch!
This is going on a bit, but the base stuff all worked!