How to rotate camera using mjpg-streamer-experimental?
Edit: Having now installed Octopi myself, I have found that they made it easy to rotate the image right from the interface. If you open the "Settings" and look under "Webcam &amp; Timelapse", there are settings for flipping the image horizontally or vertically and for rotating 90 degrees.

There are a few ways to rotate the image of which I am aware. You can do it via the input plugin, the client, or post-processing.

The "input_uvc" and "input_raspicam" plugins both have options to rotate the image. If you are using one of these plugins see the documentation at input_uvc or input_raspicam (it is worth noting that the input options may not be supported by all cameras). You should be able to run the command like the following to get a stream that is rotated 180 degrees:


  mjpg_streamer -i 'input_uvc.so -rot 180'


I'm not sure how you are handling the stream, but it is possible that your client can perform the rotation. For example, if you are using VLC you can set the angle of rotation by doing something like this: 


Open the “Tools” menu and select “Effects and Filters”
In the “Adjustments and Effects” window, on the “Video Effects” tab, select the “Transform” check box
Select a rotation from the dropdown menu and then click “Close”.


Finally, if you are saving the stream and are only concerned with rotating it afterwards, you can post-process it with a utility like ffmpeg. See this post as an example and look for "Rotate" in the accepted answer.

If your stream is being rendered via a browser you may be able to add some CSS3 formatting to the video element. For example, you could add an ID of "videoElement" to the stream and then add the following to your CSS:


  #videoElement {

transform: rotateZ(180deg);
-webkit-transform:rotateZ(180deg); /* Safari and Chrome */
-moz-transform:rotateZ(180deg); /* Firefox */ 

  
  }