Please let me know how to change the size of the camera view. The red dotted line of the square is too small for me.
When you are in camera view and you have Lock Camera to View enabled, you won't be able to change the size or position of the camera relative to the 3D View.
If you have this setting enabled and you want to change the size or position of the camera within your view, you just need to disable the setting, move the camera around as desired, then turn the setting back on.
The Lock Camera to View setting is in the Properties menu (N) on the right side of the 3D View.
You can use the middle mouse wheel to change the size of the camera screen in the viewport. To move the camera screen around, hold shift and the middle mouse button and drag your mouse.
If you actually want to move the camera, press shift and "f" to enable the manual motion. In this mode, you can use W, A, S, D, and, Q and E to move the camera around your scene.
To pan and zoom the size and position of the camera view rectangle while in camera view mode (which you can enter by pressing numpad 0), use:
shift + middle mouse --- pan by dragging the mouse around
ctrl + middle mouse --- zoom by dragging the mouse up and down
scroll wheel --- zoom in and out by scrolling the mousewheel
Make sure "lock camera to view" is off when you do that; if it's on, you'll pan and zoom the view instead of the camera view rectangle within your view. That setting is in the 3D view properties pane under "view". You can open and close that pane with the "n" key while the mouse is hovered over the 3D view.
If you need to change the aspect ratio of that rectangle (width and height), you can do that by selecting the camera and going to the "render" properties (hand held camera icon, the left most icon in the properties icon tray, at least for me) and changing the x and y values under "aspect ratio" in the "dimensions" panel of those properties.
The top two answers are correct, but I don't have a 'home' key and the second answer confused me at first, so here's an attempt to explain it a bit more clearly. To change the size of the rectangle, do these steps:
Ensure that "lock camera to view" is turned off. This can be found in the 'view' tab on the right-hand edge of the viewport window, press
Nto reveal it.
Ensure you're looking through the camera. (press
~, select "view camera". But you're probably looking through the camera already.)
if using a Mac, hold CMD and use two-finger scrolling on trackpad; on Windows, use ctrl + mouse wheel.
If this just moves the viewpoint, it means either "lock camera to view" is turned on or you're not looking through the camera. This action moves the viewpoint unless you're both looking through the camera and have "lock camera to view" turned off, in which case it changes the size of the preview box.
To reposition the camera preview within the viewport, again make sure you're looking through the camera and 'lock camera to view' is turned off, then hold shift and two finger scroll. (I don't know the Windows equivalent, maybe it's drag with the right mouse button.)