I am looking to install a portable generator for supplying some things when there is a power outage. I have my main panel outside and a sub panel inside. The breaker at the main panel suppling the sub is a 50amp but at the sub the largest breaker is a 30 amp that controls the Dryer which I will turn off since we won't be using it, therefor making the next biggest we would use is a 20amp. My question is could I just get a 30amp manual transfer switch and wire it to the 50amp breaker to supply the sub panel and the few 20 & 15amp breakers at the sub?
So these panels are Eaton CH, which is the finest panel currently offered in the consumer space.
And note the way your main breaker is a seemingly normal breaker - that's true, it "back-feeds" the bus. That makes your panel suitable for a simple, inexpensive generator interlock - the Eaton CHML.
The interlock is required by law to avoid you killing linemen - a mis-connected generator can energize the utility's power lines, and transformers work both ways, so it would step up to 9600V and kill the linemen who have been working for 2 days straight trying to get everyone's power back on.
The interlock requires the generator breaker be immediately below the main. So the 2 spaces there - currently used by "Bath lights" and "bath GFCI" - need to be freed. On YOUR panel, they can go anywhere they fit - no placement restrictions. So either move just those two, or move a breaker from the left column to the right, then move all the left side breakers down to open up the spaces. It's OK to use wire-nuts to extend wires inside a panel*.
Now you install a 2-pole (30A?) breaker to be the generator breaker in that opened up space. Because this breaker will also be back-fed, it needs a "hold-down kit" so it can't pop off in your hand and zap you with its exposed terminals. Check with an electrical supply house who is an Eaton dealer (they'll need your panel model number) but wild guess here it'll be a CH125RB kit.
Now you install the Eaton CHML interlock per its instructions.
"That was easy" (well maybe not the procurement).
Anyway, now you come off that new generator breaker with appropriate wire to a proper generator inlet. If you're going a long distance, then pay close attention to the generator inlet for "75C" and "Aluminum" markings. (breakers have both these markings). This will allow you to use smaller size wire (provided it is not NM or UF types, which are 60C only). Or aluminum wire, which is much cheaper.
I'm noticing the outdoor panel is surface-mount. If it seems inconvenient to get a generator cable into that outdoor panel, and you had a thought to feeding the indoor panel, that is fine if you aim to only power things in the indoor panel. You cannot install the generator back-feed breaker in the indoor panel and power things in the outdoor panel, because the interlock is absolutely required. If you really want to power things in the indoor panel only, then retrofit a main breaker into the subpanel. (this is pretty much what it looks like; sticking a big breaker in the top left and feeding power into that instead of the main lugs). Then, add the generator interlock and breaker as discussed above. Depending on panel design it may be possible to install it in any 4 adjacent spaces, but I would try to use "top left" for aesthetic reasons.
* offer void in Canada. Seriously this is OK in Canada because it's a repair/workaround.