The mpv media player can scale the output, just as mplayer does. This can be useful.
Use this parameter to scale the video.
-vf scale=960:720 |
This is how this is done. This will scale the output to 960×720 pixels.
4.4 Mon Jul 08 jason@Yog-Sothoth 0: $ mpv -vf scale=960:720 olr_2_5_controller.mp4 |
Generate a Mandelbrot with mpv.
4.4 Mon Jul 08 jason@Yog-Sothoth 0: $ mpv av://lavfi:mandelbrot Playing: av://lavfi:mandelbrot (+) Video --vid=1 (rawvideo 640x480) VO: [opengl] 640x480 rgb0 V: 00:00:03 / 00:00:00 |
Draw a box on the video.
mpv --vf lavfi=[drawbox=0:140:1400:900:invert:1] olr_2_5_controller.mp4 |
This is how to crop a section of video. This could be very useful for isolating a section of the video and then saving that as another video file. Without using a video editor.
mpv --vf lavfi=[crop=606:341:659:379] olr_2_5_controller.mp4 |
This is a guide for mplayer, this is how to get the values visually while the video is playing.
https://incenp.org/notes/2012/video-cropping.html.
Follow the instructions in that post, and then you may get the cropping values to enter into the mpv command line like this.
mpv --vf lavfi=[crop=290:220:30:0] olr_2_5_controller.mp4 |
Another cropping example.
mpv --vf lavfi=[crop=320:320:320:320] olr_2_5_controller.mp4 |
To output the cropped video to a file, use this command line. This will output the cropped and manipulated video to a file.
mpv --vf lavfi=[crop=290:220:30:0] olr_2_5_controller.mp4 -o video.mp4 |
If I used this instead, it would save the original instead.
--record-file=video.mp4 |
Here is an example video. This is one where I cropped into the minimap of a Stalker video.