I don't if this helps.
I ride outdoor and I also do spinning.
I find that the classes are motivating and force me to do them for the full 60 minutes that they last. You may want to go some spinning classes and get the feel for a workout and do it yourself at home. Or, invest in the classes. My studio allows me "unlimited" spinning for $50/month. I can take a spinning class every day (twice a day!) if I wanted, except for Sundays, when they are closed.
I ride outside, as well, and motivation/program for me, was training for a ride. You pick a charity ride or a distance that you want to complete -- like a century (100 miles) and you plan a work out around it. If you can ride today 20 miles with no problems, then you ride three times a week 20 miles. The next week, you increase it to 25 miles. Then the following week you increase it to 30 miles if you are feeling good about the distances. You can then try to do it faster -- if it takes you 2 hours to do 30 miles (15 mph), you try to do an average of 16 mph the next week.
Eventually, you'll train up to the 100 miles and at a pace that you like -- 11, 15, 16, 20 mph, whatever you can do, depending on your physical state.
With outdoor cycling, the idea is to either get faster (more mph) or further (20, 30, 100 miles) or both (ride average of 15 mph and ride 100 miles).
For your knees specifically -- both in spinning and outdoor cycling -- remember to "spin" a lot, rather than just jam your legs down on the bike.