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 9254881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:35:06+00:00 2026-06-18T11:35:06+00:00

Do VLC or FFmpeg (or AVconv ) have any feature to force the duration

  • 0

Do VLC or FFmpeg (or AVconv) have any feature to force the duration of a video to a certain number of seconds?

Let’s say I have a… 5 minutes .mp4 video (without audio). Is there a way to have any of the aforementioned tools “expanding” the video to a longer duration? The video comes from a Power Point slideshow, but it’s too short (running too fast, to say so). The idea would be automatically inserting frames so it reaches an specified duration. It looks like something pretty doable (erm… for a total newbie in video encoding/transcoding as I am): A 5 minutes video, at 30fps means I have 9000 frames… To make it be 10 times longer, get the first “real” frame, copy it ten times, then get the second “real” frame, copy it ten times… and so on.

I’m using Ubuntu 12.04, but I can install/compile any required software, if needed. So far, I have VLC, AVConv and FFmpeg (FFmpeg in an specific folder, so it won’t conflict with AVConv)

Thank you in advance.

  • 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-06-18T11:35:07+00:00Added an answer on June 18, 2026 at 11:35 am

    Use the setpts video filter in ffmpeg. Simple examples:

    • Slow (half speed): setpts=PTS*2 or setpts=PTS/0.5
    • Fast (2x): setpts=PTS/2 or setpts=PTS*0.5

    10x speed increase for video

    ffmpeg -i input.mp4 -filter_complex "setpts=PTS/10" output.mp4
    

    10x speed increase for both audio and video

    For audio use the atempo, rubberband, or asetrate audio filters.

    ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=PTS/10[v];[0:a]atempo=10[a]" -map "[v]" -map "[a]" output.mp4
    

    Matching video to audio duration

    In this example audio.wav duration is 30 seconds and video.mp4 is 90 seconds.

    1. Get the duration of the audio and video files:

       ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 audio.wav
       ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video.mp4
      
    2. Use the setpts video filter to adjust the duration of the video to match the audio duration.

       ffmpeg -i video.mp4 -i audio.wav -filter_complex "[0:v]setpts=PTS*30/90[v]" -map "[v]" -map 1:a -shortest output.mp4
      

    Fit video into specific time

    In this example the input is 120 seconds. Desired output is 30 seconds:

    1. Get the duration of the input file:

      ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 input.mp4
      
    2. Use setpts and atempo (or rubberband) filters:

      ffmpeg -i input.mp4 -filter_complex "setpts=PTS/(120/30);atempo=120/30" output.mp4
      
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 video streams (1) VLC Generated Compressed MP4 UDP stream (2) DV
I have a small video app that i would like to give vlc-like functionality.
I'm scripting with the VLC browser plugin to determine the length of any video
Is there any way to access a movie plaing in VLC through HTTP in
How I can get web-cams list using VLC command line? If I using FFmpeg,
Goal: To launch VLC player through PHP code, and play the specified video in
Because of VLC conflict I have to turn off Windows Advanced Text Services at
I am reading docs for VLC Command line programming. there I saw YUV video
I have a problem when I want to launch VLC from Apache using PHP.
User(s) decide to start a stream toward my site, VLC and FFMPEG is able

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.