I have never encountered a command-line app where the order of the switches actually mattered, until now. The second one before, and its the second one I wanted, cropping the video first, then resizing it. Output2.avi: RIFF (little-endian) data, AVI, 320 x 240, 25.00 fps, video: FFMpeg MPEG-4, audio: MPEG-1 Layer 1 or 2 (stereo, 44100 Hz)Īs you can see, the first output file has its dimensions cropped after resizing. ![]() Output1.avi: RIFF (little-endian) data, AVI, 298 x 232, 25.00 fps, video: FFMpeg MPEG-4, audio: MPEG-1 Layer 1 or 2 (stereo, 44100 Hz) ![]() Input.avi: RIFF (little-endian) data, AVI, 640 x 480, 25.00 fps, video: XviD, audio: MPEG-1 Layer 3 (stereo, 44100 Hz) Now let’s look at the output with: file *.avi. In the second case we set the cropping first. Notice that in the first case, we’ve set the size first (qvga means 320×240). Our input file, input.avi is a 640×480 video.įfmpeg -i input.avi -s qvga -croptop 8 -cropright 22 output1.aviįfmpeg -i input.avi -croptop 8 -cropright 22 -s qvga output2.avi I wanted to remove these, but have a fixed output size. The video I was re-encoding had some fuzziness at the top, and an ugly black border down the right-hand side. I discovered something whilst trying to crop and re-size a video with FFMPEG: the order of switches actually matters! I couldn’t find any mention of this in the documentation, and nowhere could I find an explanation of why my video was being cropped after it was resized.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |