VideoHelp Forum

+ Reply to Thread
Results 1 to 7 of 7
  1. i hv just ripped a part of DVD, but it gave weird bar on top border and light green bar on right border.

    How Can I crop and pad these bars using FFMPeg CLI under Linux? -OR-
    What are the commandlines for followings?
    1) How to crop 10 pixels from the lefth, 15 pixels from right borders,20 pixels from the top and 25 pixels from bottom borders?

    2) How to pad 10 pixels to the lefth, 15 pixels to right borders,20 pixels to the top and 25 pixels to bottom borders?

    Quote Quote  
  2. Explorer Case's Avatar
    Join Date
    Feb 2004
    Middle Earth
    Search Comp PM
    These command parts are not for a very recent ffmpeg release (2008), so the ffmpeg team might have changed a few things in the mean time. I haven't checked for changes in newer versions.

    -croptop 32 -cropbottom 32 -cropleft 16 -cropright 16
    -padtop 32 -padbottom 32 -padleft 16 -padright 16
    Note that the output size has to have the padding substracted from the output dimensions, as it will be added after encoding the video. For PAL you would encode to 688x512 to get 720x576, for NTSC you would encode to 688x416 to get 720x480, with these padding settings.

    Note that the copping and padding is multiples of 16, as the MPEG-2 encoder wants to encode the video to output as multiples of 16. Cropping and padding itself is only restricted in ffmpeg to be even numbers.
    Quote Quote  
  3. @ Case

    Thanks for the reply.
    it seems that latest version of FFmpeg-svn-25456 does not understand the commandlines you have suggested!
    Quote Quote  
  4. Member bat999's Avatar
    Join Date
    Feb 2008
    United Kingdom
    Search Comp PM
    Last edited by bat999; 16th Oct 2010 at 20:08.
    Quote Quote  
  5. bat999

    thanks for reply.
    b4 posting i try all sorts by going through manual.
    direct sweet and short working solution will be appreciated.
    Quote Quote  
  6. Get Slack disturbed1's Avatar
    Join Date
    Apr 2001
    init 4
    Search Comp PM
    Not sure about crop, but to resize and pad I use this -
    -vf scale=720:368,pad=720:480:0:56
    ffmpeg has changed it's syntax to use the -vf for video filters.

    aspect           Set the frame aspect ratio.
    crop             Crop the input video to x:y:width:height.
    format           Convert the input video to one of the specified pixel formats.
    noformat         Force libavfilter not to use any of the specified pixel formats for the input to the next filter.
    null             Pass the source unchanged to the output.
    pad              Add pads to the input image.
    pixelaspect      Set the pixel aspect ratio.
    scale            Scale the input video to width:height size and/or convert the image format.
    slicify          Pass the images of input video on to next video filter as multiple slices.
    unsharp          Sharpen or blur the input video.
    vflip            Flip the input video vertically.
    buffer           (null)
    nullsrc          Null video source, never return images.
    nullsink         Do absolutely nothing with the input video.
    See here for more info
    Linux _is_ user-friendly. It is not ignorant-friendly and idiot-friendly.
    Quote Quote  
  7. Member
    Join Date
    Dec 2009
    United States
    Search Comp PM
    I have been using FFMPEG for some time for audio file conversions. I just downloaded the newest version and the command:

    ffmpeg -i x.flac -ab 128k x.mp3

    no longer produces a 128k file.

    It produces a 48k file no matter what the -ab command requests. Any suggestions?
    Quote Quote  

Similar Threads