How do I get portrait mode videos to play correctly?

I have a lot of videos shot on my Android phone in portrait mode. (This, apparently is controversial; suffice it to say that for what I’m shooting videos of, portrait mode makes much more sense than landscape.) I just bought a smart TV (Vizio D39f-E1, if that makes a difference) explicitly to watch these videos, and I am distressed by what I am seeing. Either the video plays sideways (people are standing with their feet to the right and their heads to the left) or else the heads are up and the feet down, like they should be, but the video is stretched across the entire screen, making people look short and fat. I’m not talking about one video playing one way and a different video playing the other way; the same video will play either sideways for stretched! There appears to be no rhyme or reason why it plays one way or the other. (As an aside, I had the same experience trying to play these videos on my phone; I was able to get around that by using VLC, rather than the build-in Plex player, for viewing the videos.)

How can I get my videos to play properly on the TV? I expect them to have the proper orientation and aspect ratio; I expect to have the black band on either side of the video. I don’t understand why Plex can’t do this, but I’m hoping that somebody can suggest a s/w solution to edit my videos in such a way as to fool Plex into playing them properly. I tried using VidCoder to rotate a video, but the rotated video still played with feet to the right and heads to the left. I was even thinking that I might have to rotate the TV, but that won’t work if Plex inconsistently goes back and forth between stretching the video and playing it sideways.

I have the same issues with videos take from my phone and cameras. The best consistent solution I found was to re-encode the videos using Handbrake with the appropriate rotation setting. If all your videos are consistently require the same rotation correction, then you can use handbrake to bulk process all the videos at once.

I guess Plex doesn’t have any tech support – nobody to give official answers, huh? I did try rotating my videos, but Plex continued to play them rotated.

It’s not controversial - it’s simply wrong.
Like a Root-Beer float made with Dr. Pepper - that’s just wrong, Man.

lol

Use Handbrake and crop 'em down to 4:3. If you’re going to shoot vertical videos with a camera designed for horizontal, pillar boxing shouldn’t bother you.