Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6387673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:10:53+00:00 2026-05-25T03:10:53+00:00

i compiled the new version of FFMPEG and the padding commands have been deprecated.

  • 0

i compiled the new version of FFMPEG and the padding commands have been deprecated.
As i try to get familiar with the new -vf pad= commands, i want to ask, how can i
convert a video without changing it’s aspect ratio.

I’ve checked numerous solutions from stackoverflow, nothing seemed to work.
Can someone, please post a working PHP example or cmd line. I would be VERY happy.

Please note that the videos in question, could be 4:3 and also be 16:9

Let’s say, i convert a 16:9 video to 640×480 format. It will need some bars at
the top and at the bottom. That is what i want to do.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:10:54+00:00Added an answer on May 25, 2026 at 3:10 am

    thanks for sharing this code.

    i had to do a variation:

    //keep always the same video size 
    //we need to add padding and then crop the same size to keep vieos with same WxH sizes    
    $command = FLV_LITE_FFMPEG_PATH . ' -i ' . $original_video;
    $command .= ' -s '.FLV_LITE_VIDEO_WIDTH . 'x' .FLV_LITE_VIDEO_HEIGHT;
    $command .= ' -croptop ' . $pad_top;
    $command .= ' -cropbottom ' . $pad_bottom;
    $command .= ' -cropleft ' . $pad_left;
    $command .= ' -cropright ' . $pad_right;
    $command .= ' -padtop ' . $pad_top;
    $command .= ' -padbottom ' . $pad_bottom;
    $command .= ' -padleft ' . $pad_left;
    $command .= ' -padright ' . $pad_right;
    $command .= ' -padcolor 0x000000';
    $command .= ' -ab 32 -f flv -ar 22050 -b 256 -r 24 -y';   
    $command .= ' ' . $converted_video; 
    
    exec($command, $output, $status);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an installer for application that is compiled using WiX and each version
I installed a new version of emacs (new for me). I didn't want to
I want to use a new version of log4net with nhibernate. The log4net version
I have been provided with an xsd that I compiled to Java classes using
If you compile a new version of compiler, how many times should you recompile
I'm new to Mono and just started recently. Is mono program are compiled from
I'm sure this is a newbie question, but every time I've compiled/dl'ed a new
I just upgraded to Snow Leopard, including installing the new XCode, re-compiled Ruby 1.8
Scenario I have a C# application compiled as a DLL. I have a build
I have created a new VS2008 ASP.Net Web service project, with the default name

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.