Changes between Version 1 and Version 2 of CroppingVideo


Ignore:
Timestamp:
Mar 7, 2022, 3:10:11 PM (4 years ago)
Author:
Pascal S
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CroppingVideo

    v1 v2  
    1 PAGE UNDER CONSTRUCTION
     1= Cropping a video stream =
     2== An alternative to cropdetect filter ==
     3Sometimes a 16/9 movie is recorded within a 4/3 window. Therefore the video player cannot zoom the video to full screen, even if the Display Aspect Ratio is 16/9. This is due to existing black areas in the upper and lower part of the video.
    24
    3 = Cropping a video stream =
    4 An alternative to cropdetect filter :
     5Standard procedure to eliminate these black areas is to run first the '''cropdetect''' filter and then run the '''crop''' filter. In some cases, the drawback of cropdetect is that it needs a log analysis when a human eye give a better result quicker.
     6
     7An alternative to this procedure is to run first the '''fillborders''' filter with blue color and evaluate the result in an iterative manner.
    58{{{
    6 ffmpeg -i "INPUT.mp4" -map 0 -vf fillborders=top=84:bottom=56:mode=fixed:color=blue "OUTPUT.mp4"
     9ffmpeg -i "INPUT.mp4" -vf fillborders=top=84:bottom=56:mode=fixed:color=blue "OUTPUT.mp4"
    710}}}
    8 .
     11The resulting crop filter is then this one :
    912{{{
    10 ffmpeg -i "INPUT.mp4" -map 0 -vf crop=720:576-84-56:0:84 "OUTPUT.mp4"
     13ffmpeg -i "INPUT.mp4" -vf crop=720:576-84-56:0:84 "OUTPUT.mp4"
    1114}}}