diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 14cab9e5..730fdfc5 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -444,10 +444,14 @@ PipelineHandlerIPU3::generateConfiguration(Camera *camera, std::span<const Strea
 		case StreamRole::VideoRecording: {
 			/*
 			 * Default viewfinder and videorecording to 1280x720,
-			 * capped to the maximum sensor resolution and aligned
+			 * capped to the largest output strictly smaller than
+			 * the sensor resolution (see validate()) and aligned
 			 * to the ImgU output constraints.
 			 */
-			size = sensorResolution.boundedTo(kViewfinderSize)
+			size = sensorResolution.shrunkBy({ 1, 1 })
+					       .alignedDownTo(ImgUDevice::kOutputMarginWidth,
+							      ImgUDevice::kOutputMarginHeight)
+					       .boundedTo(kViewfinderSize)
 					       .alignedDownTo(ImgUDevice::kOutputAlignWidth,
 							      ImgUDevice::kOutputAlignHeight);
 			pixelFormat = formats::NV12;
