Fall Virtual Open House is a Wrap

Another success, hopefully next year we get to do this in person as well.

If you joined us for our Fall Virtual Open House thanks for joining us and we hope you had a good time. If you would like to inquire about a remote operations or in person membership please email membership@siliconvalleylines.com.

The day started off with some JMRI troubles but after a quick pivot we got trains running and were able to get our trains back on schedule pretty quickly. As the day progressed it became apparent that even with our new Raspberry Pi Zero 2 W powered CabCams we could use more wireless access points to alleviate some issues with the small antenna on the Zero 2.

Below is our live stream from the day.

And now for some photos.

One of our remote engineers rolls past Ebbetts Pass in Western Pacific 759.
The same engineer headed across the bridge over the village of Eagle. The residents recently got a major stretch of their main road repaved.

A different remote engineer pilots Northern Pacific 6504 past the orange groves of Fremont and Farmer Jensen’s produce.

Norfolk Southern 9-1-1 highballs past one of SVL’s LCC signals in Jacksonville.
A meeting of eras. NS 9-1-1 and NP 6504 have a meet in Jericho. Meetings like these can be pretty exciting as a remote engineer. Due to a limitation of the technology you get the prototypical cab experience from our CabCams.
A view from the aisle with some of the hardware we use to make these streams exciting. While I had stepped away the SVL helicopter’s battery died (gimbal battery that is).
The sun has set over Silicon Valley Lines. We have one of, if not the only NCE Layout Lighting setups in the wild. It is a bit blue but this allows both local and remote engineers to get a bit of nighttime running but not be completely in the dark.
You can see the NCE light boards in this shot from Fryton as a train waits on the siding for one of our hotshot remote trains to pass.
An overhead shot of Tracy. Tracy is modeled after mid century Illinois and is the work of member John Donovan. He has been working on Tracy for 20+ years.
Another shot of Tracy.
A billboard for our local model railroad shop, they are extending their market all the way to Illinois.
The round-end of an illustrious Daylight is poking out of the Bayshore passenger facility.
Peering through the windows into the Bayshore roundhouse, seeing the side of SP 4349.
Another shot through the windows, this time seeing the rear of SP 4349 and the side of Penny 6200.
A shot of the Bayshore engine facility and the greater town on the left.
A young remote engineer gets ready to take our subway train out for a run.
The Subway train scoots along while the truck awaits a clear signal to leave.
Cars for the SVL’s Pathfinder wait for their next group of passengers to eagerly board in Nowheres.
Gamers & Thrones is our newest industry on the layout and busy at work 24/7 (hence the bright lights).

Well that is all for now, keep an eye on our events page for the next virtual open house and hopefully our summer in person open house. If you subscribe to our YouTube you should get notified of all our live streams.

Thanks for joining us!

Fall 2021 Virtual Open House

UPDATE: Sign ups will be closed at midnight PST. Join us on our YouTube stream.

Nov 13th 2021 10am to 3pm PST

Still plenty of slots open!

Pick up a throttle(virtually) to take a virtual spin around the Silicon Valley Lines layout for our Fall 2021 open house event. This event is open to all ages, first time operators and professionals alike.

What: SVLs Virtual open house where you can take control of a train on our 23’x73′ layout and get a engineers POV of our layout and a light demonstration of our virtual operating sessions ran monthly.

When: Saturday November 13th from 10am to 3pm PST in half hour running blocks.

Where: Your home, office, RV on a camping trip with good camp ground WiFi, another club, etc. The virtual throttle and camera feed can be run from an Android/iOS phone or tablet or a Windows/Mac/Linux based computer running a modern browser like Chrome or Safari.

How: Use this link to sign up, information will follow before the Open House.

If you are unsure about participating we have some demonstration and examples below.

The SVL CabCam Project


Raspberry Pi OS Bullseye breaks the following instructions.

As Silicon Valley Lines adapts to the current global pandemic, it has become clear we will not be meeting as a full club in person for some time. This has spurred our search for a solution to allow us to run operating sessions and have fun with trains as SVL is foremost a operating layout. We tried a few approaches but it quickly became apparent that we need to give remote operators a way to get immersed with running a train on the layout. We wanted to provide a view from the locomotive cab that is fast and responsive. Thus the SVL CabCam Project was born. In addition we provide layout overview cameras and/or views from key locations on the railroad.

This write-up is the result of a lot of trial and error, getting products fully running then realizing the end-to-end latency was so severe it wouldn’t be workable. It is intended as a general overview for hobbyists wishing to get a track-level view of their own layout, and provides technical instructions for replicating our approach.

A cab view camera is useful for more than remote operations during COVID. Local ops sessions can benefit from this as well.


We describe how to set up a small computer to stream cab view video from an HO locomotive. This allows remote operation of trains at local or remote layouts, optionally connecting it to video conferencing software like Google Meet or Zoom.


  1. Easy to set up and maintain.
  2. Easy to access the cab view via a URL or via conference software eg. Zoom or Meet.
  3. Distribute the setup to others for the betterment of the hobby.
  4. Provide a low latency video stream to enable remote control via Engine Driver/WiThrottle
  5. Keep the hardware within HO NMRA clearances.
  6. Use commonly available components and open-source software where possible.


Hardware: We are using one Raspberry Pi Zero WH per CabCam car.

Camera: The Pi Zero Spy Camera works well for our purposes.

Software: The project uses Raspian Buster running MJPG Streamer on the CabCam car. This streams video from a URL on the local network. The video can be viewed locally or streamed to conference software via OBS and the OBS VirtualCam plugin.

Power: The Juiceb0x Zero is a “hat” for the Pi Zero. While the Pi Zero WH comes with the required header already installed, soldering is required to install header pins on the Juiceb0x Zero board.

Rolling Stock: The easiest approach is build a mounting sled out of styrene as shown below. With a little bit more work the setup can be installed inside a dummy engine, too.


How To

This section describes the setup in more detail. Some familiarity with Raspberry Pi and respective software management is helpful.

1. Gathering the hardware

You will need:

2. Setting up the hardware

Connect the camera to the Pi Zero WH. Solder the header pins to the Juiceb0x Zero per the instructions that come with it and attach it to the Pi Zero WH. Connect the battery to the Juiceb0x Zero. Connect the USB charger to the Juiceb0x Zero to charge the battery.

Never connect power to the USB ports of the Pi Zero WH while the Juiceb0x Zero is attached. 

3. Burning the image and setting up the software

Download and install the Raspberry Pi Imager, formerly called NOOBS. 

Run the software and select Choose OS, then Raspberry Pi OS (Other) and select Raspberry Pi OS Lite.
Next Select your SD Card via Choose SD Card and hit Write. Once it is done writing, eject and reinsert the SD card into your computer.

4. WiFi Setup

Now we will configure wifi for your home or club network. With a text editor create (or edit) a file named wpa_supplicant.conf in the boot folder on the SD card. Paste the following text to this file.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev

Change the country code to your two character country code per the  ISO 3166 alpha-2 country code. For many of us it will likely be US or GB. SSID refers to your wifi network name and PSK is your network’s password. Make the respective changes for your network and save the file.

To enable SSH access create an empty file called ssh in the boot folder on the SD card.

Eject and remove the SD card from your computer, insert it into the Pi, and power up the Pi by moving the small slider switch on the Juiceb0x Zero to On. The blue LED on the Juiceb0x Zero should light up, and you should see flashing green lights. Some cameras have LEDs on the connector strip, those should light up briefly as well. Give the Pi about two minutes to boot up. 

5. Logging in to the Pi

Find the IP address your Pi is using and log in using ssh as user pi.

The default password is raspberry.

On a Mac use Terminal. On Windows use PuTTY (you may have to download it)  and put in the IP of your Pi in the Hostname block. When you connect, the default username is pi and the password is raspberry.

On many networks the following also works:

ssh pi@raspberrypi.local

6. Configuring the Pi

Once on the Pi command line type

sudo raspi-config

to enter the configuration page for the Pi. First enter Change User Password and enter a new password if you want to secure the device. Next enter Network Options, select Hostname, and give your Pi a unique name like LayoutCabCam1 or similar. This is helpful to identify which Pi is which if your network supports hostnames. Next select Interfacing Options, select P1 Camera, and enable the camera interface. The last thing to do in the configurator is to expand the file system. Go to Advanced and select A1 Expand Filesystem. After that finishes, exit the configurator and allow the Pi to reboot. 

7. Configuring MJPG Streamer

Now we are going to configure the software to allow us to stream the cab POV. 

Log back into your Pi and run the following commands

sudo apt-get update
sudo apt-get upgrade

Follow this with

sudo apt-get install git 
sudo apt-get install cmake libjpeg8-dev -y
sudo apt-get install gcc g++ -y

This will take a while.

Run the following commands to clone and compile MJPG Streamer, this will also take some time. 

git config --system core.longpaths true

git clone https://github.com/jacksonliam/mjpg-streamer
cd mjpg-streamer/mjpg-streamer-experimental

make && sudo make install

Sit back for a bit and enjoy a drink.

Next run

mjpg_streamer -i "input_raspicam.so" -o "output_http.so"

to test the stream with the most basic settings. This should output some stuff on your terminal to let you know it is working. Point the browser on your computer  to http://IP:8080?action=stream (replace IP with the IP address for the Pi from earlier). If you see output from your camera you are ready to move on. In the terminal, hit Ctrl+C to close the stream.

The following command uses the parameters we set at SVL.

mjpg_streamer -i "input_raspicam.so -x 480 -y 360 -fps 10" \-o output_http.so

The Internet uplink bandwidth at SVL is quite limited. For cab control with remote operators we found that SD resolution is sufficient and limits bandwidth demand. We are using a frame rate of 10 images per second. The stream doesn’t get smoother turning this up. If your camera is upside down you may need to insert -rot 180 before -fps.

We want to turn on the stream at on startup. A small startup script will get us there.

Enter the following

sudo nano /home/pi/startcam.sh 

Enter the following in the text editor.


mjpg_streamer \

-i "input_raspicam.so -x 480 -y 360 -rot 180 -fps 10" \
-o output_http.so

Hit CTRL+X to leave the editor, hit Y and  Enter to write the file to the SD card. 

Make this file executable with

sudo chmod a+x /home/pi/startcam.sh

To cause the camera stream to start whenever the Pi boots, edit the /etc/rc.local file. To do this run

sudo nano /etc/rc.local

and add /home/pi/startcam.sh close to the bottom of the file right above the exit 0 command. Exit the editor with CTRL+X Y Enter.

Reboot the Pi with sudo shutdown -r now. After reboot you should be able to see the stream in your browser at the URL you used above. After placing the camera on a flatcar, it should look something like this.

Put your CabCam car on the front of a train, and run the train while watching the video stream in the browser.

Bernhard wrote down some thoughts on camera placement and car choice on his blog.

9. What’s Next?

To stream the video to remote operators we use OBS with the VirtualCam plugin, configured with CabCam feeds. This is connected to Google Meet and can even stream to Youtube Live. Other video conferencing software like Zoom, Duo, Skype, etc. can be used, too. Remote operators join the video conference and use Engine Driver or WiThrottle to control trains via JMRI. We’ll cover that in a separate post.


Hardware: While we are using a Raspberry Pi Zero WH, any Pi with built-in Wifi will work.

Camera: Any compatible Raspberry Pi camera can be made to work. Possible options are the official Pi camera, the spy cameras, or other compatible cameras available from e.g. Adafruit.

Power: The Zero2Go board is an alternative to the Juiceb0xZero. However, the Zero2Go can’t charge the battery. In either case, do not power the Pi from the onboard USB while the power solution board is attached.

Some people had success with using a small form-factor USB power bank connected to a Pi Zero without additional hardware.


Over time we have made corrections to these instructions, or fine tuned settings. Below is a list of important revisions.

  • Fixed a bug with double quotes in the startcam.sh example above.
  • Reduced video resolution from 640×480@15fps to 480×360@10fps to help with bandwidth usage in certain Wifi environments.
  • Various spelling and grammar corrections.