VideoHelp Forum
+ Reply to Thread
Results 1 to 3 of 3
Thread
  1. I need to create High Quality WebM for 4chans. It has a strict 3072KByte (3MB) limit

    right now im using this setting to encode videos:

    ffmpeg -i test.mp4 -an -c:v libvpx -b:v 4500k -fs 3MB test.webm

    the bitrate is determined by 3072kByte * 8 / (length of video) .. unless the original bitrate is low enough that i can fit it under 3 megabytes.. but sometimes ffmpeg goes over the 3MB limit and i read a 2pass encode doesn't encode over the filesize and that it gave better quality



    Does anybody know what the exact command I would need to use 2pass encoding on WINDOWS? I've heard you need a .bat file or something.. Do step by step because i tried the method on the ffmpeg help site and it gave me an error.

    Also I've seen people use these other commands to get high quality, do they work?

    -qmin 0 -qmax 42 -bufsize 1000k -crf 5 -quality good

    Just something that won't take too long to encode, but I'm only encoding 10 second or so clips so I guess it shoulnd't take too long .


    also.... how would you got about cropping videos from the right/bottom/left/right ????

    this command would crop a 750x420 video 30 pixels from the bottom:

    -vf crop=750:390:0:-30

    ^but that's only from one side, what if i needed to crop 30 pixels from the top as well at the same time?

    thanks
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date: Aug 2000
    Location: Sweden
    Search Comp PM
    Did you try https://trac.ffmpeg.org/wiki/x264EncodingGuide ?

    Replace /dev/null with just NUL and you don't have to use && . Just run the commands after each.
    Quote Quote  
  3. this command would crop a 750x420 video 30 pixels from the bottom:

    -vf crop=750:390:0:-30

    ^but that's only from one side, what if i needed to crop 30 pixels from the top as well at the same time?
    I wonder that ffmpeg accepts that,..
    Normally the syntax is crop=WIDTH:HEIGHT-pos:y-pos, which means you define a windows with resolutio WIDTHxHEIGHT and move it to xPos x yPos.
    -> so if you want to crop 750x420 to 750x360, you would use: 750:360:0:30
    see: http://ffmpeg.org/ffmpeg-filters.html#Examples-7
    Quote Quote