VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Member
    Join Date
    Apr 2018
    Location
    Sunsari [Nepal]
    Search Comp PM
    Hello, I want to crop Black Bar From Video (top and Button) and at Same time i want 720p output of my 1080p input Video, But i don't Understand actual cmd to crop 132px top and 140px on Button and Have one Drawtext Filter on My Code

    (I Want to Apply Crop on input Video)

    Code:
    ffmpeg.exe -i %input% -vf "drawtext=fontsize=22:fontfile=C\\:/Windows/fonts/arial.ttf:fontcolor=white:text='NBMedia':bordercolor=black:borderw=2:x=w-tw-10:y=h-th-10, scale=1280:-1, crop= {Want to Crop 132px on Top and 140px on button}"  -c:v libx264 -b:v 1200k -maxrate 1200k -bufsize 1200k "%output%.mp4"
    Please Help Me to Apply Crop Filter in Input Video

    Thanks
    Quote Quote  
  2. ffmpeg does not specify top, bottom, left, right values to crop it crops by defining a rectangle and it's placement.

    So if your input is 1920x1080 and you want to crop 132 from the top and 140 from the bottom, your would.
    Use a rectangle with the full width (1920) and a limited height (1080 -132 -140) and place it at x/y-coordinate 0/132 (0/0 is the upper left corner).
    so the crop command would be:
    Code:
    crop=w=1920:h=808:x=0:y=132
    since you mentioned that you want to crop on the input, your probably want to change the order of your video filter options.
    1st crop
    2nd resize
    3rd add your text
    in your example you used the opposite order,...

    Cu Selur
    users currently on my ignore list: deadrats, Stears555, marcorocchini
    Quote Quote  
  3. Assuming a 1920x1080 frame:

    -vf crop=w=1920:h=808:x=0:y=132,scale=1280:-4

    Notes:

    808 = 1080 = 132 - 140

    width -4 means the nearest mod4 height for the specified width (1280), maintaining aspect ratio. In this case I think it will be 540 rather than the exact 538.666...
    Last edited by jagabo; 5th Dec 2020 at 08:42.
    Quote Quote  
  4. Member
    Join Date
    Apr 2018
    Location
    Sunsari [Nepal]
    Search Comp PM
    Thanks to all,
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!