diff --git a/src/apps/qcam/main.cpp b/src/apps/qcam/main.cpp
index 9846fba5..9100c69d 100644
--- a/src/apps/qcam/main.cpp
+++ b/src/apps/qcam/main.cpp
@@ -37,6 +37,9 @@ OptionsParser::Options parseOptions(int argc, char *argv[])
 			 ArgumentRequired, "camera");
 	parser.addOption(OptHelp, OptionNone, "Display this help message",
 			 "help");
+	parser.addOption(OptOrientation, OptionString,
+			 "Desired image orientation (rot0, rot90, rot180, rot270)",
+			 "orientation", ArgumentRequired, "orientation");
 	parser.addOption(OptRenderer, OptionString,
 			 "Choose the renderer type {qt,gles} (default: qt)",
 			 "renderer", ArgumentRequired, "renderer");
diff --git a/src/apps/qcam/main_window.cpp b/src/apps/qcam/main_window.cpp
index 18c94cf3..aa4a0fa0 100644
--- a/src/apps/qcam/main_window.cpp
+++ b/src/apps/qcam/main_window.cpp
@@ -399,6 +399,25 @@ int MainWindow::startCapture()
 	if (rotation)
 		orientation = orientationFromRotation(*rotation);
 
+	/* Override if user specifies orientation in command line argument */
+	if (options_.isSet(OptOrientation)) {
+		std::string orientOpt = options_[OptOrientation].toString();
+		static const std::map<std::string, Orientation> possible_orientations{
+			{ "rot0", Orientation::Rotate0 },
+			{ "rot90", Orientation::Rotate90 },
+			{ "rot180", Orientation::Rotate180 },
+			{ "rot270", Orientation::Rotate270 },
+		};
+
+		auto requested_orientation = possible_orientations.find(orientOpt);
+		if (requested_orientation == possible_orientations.end()) {
+			std::cerr << "Unsupported orientation " << orientOpt << std::endl;
+			return -EINVAL;
+		}
+
+		orientation = requested_orientation->second;
+	}
+
 	StreamConfiguration &vfConfig = config_->at(0);
 
 	/* Use a format supported by the viewfinder if available. */
diff --git a/src/apps/qcam/main_window.h b/src/apps/qcam/main_window.h
index 4cead734..6dbcd88d 100644
--- a/src/apps/qcam/main_window.h
+++ b/src/apps/qcam/main_window.h
@@ -40,6 +40,7 @@ class HotplugEvent;
 enum {
 	OptCamera = 'c',
 	OptHelp = 'h',
+	OptOrientation = 'o',
 	OptRenderer = 'r',
 	OptStream = 's',
 	OptVerbose = 'v',
