browser rotates video
Although noautorotate stops FFmpeg from rotating the video, it does not remove the rotation tag from the output. So, you have to set the tag manually.

ffmpeg -noautorotate -i $vid .....  -metadata:s:v rotate=0 output.mp4