Close Menu
    Facebook X (Twitter) Instagram Pinterest WhatsApp Discord
    TechzureTechzure
    • Blog
      1. Crypto
      2. Windows
      3. View All

      How to Make an Account on Metamask

      March 20, 2023

      Crypto Testnet Faucets: How They Work and Should You Use Them?

      March 10, 2023

      Is Cryptocurrency The Future of Money?

      February 15, 2023

      Crypto and Blockchain Explained

      February 10, 2023

      RAM: The Unsung Hero Powering Modern Computing

      October 22, 2021

      Mastering the Windows Task Scheduler: Automation at Its Best

      October 11, 2021

      Unmasking Windows Driver Errors: Causes, Solutions, and Best Practices

      October 4, 2021

      Computer Storage: The Bedrock of Digital Progress

      January 3, 2021

      AI’s Societal Impact: Analysis & Adaptive Strategies

      May 26, 2025

      Smartwatch Evolution: From Timekeepers to Health Tools

      May 19, 2025

      Rise of Sophisticated Mobile Games & Monetization Models

      May 12, 2025

      How AI Enhances Gameplay with Adaptive Difficulty & NPCs

      May 5, 2025
    • Web
      1. WordPress
      2. SEO
      3. Hosting
      4. View All

      Resolve common HTTPS insecure site and mix-content warning Error

      February 3, 2020

      Backlink Breakdown: The Art and Science of Building Quality Links

      November 28, 2021

      The Power of Backlinks in SEO: A Deep Dive into Their Role, Quality, and Influence on Ranking

      November 21, 2021

      Mastering Web Design: Crafting User-Centric Experiences

      May 8, 2021

      The Role of Content in SEO: A Deep Dive into the Symbiotic Relationship

      May 3, 2021

      Building A Business With Unlimited Reseller Hosting

      March 13, 2020

      Backlink Breakdown: The Art and Science of Building Quality Links

      November 28, 2021

      The Power of Backlinks in SEO: A Deep Dive into Their Role, Quality, and Influence on Ranking

      November 21, 2021

      Understanding SSL: Ensuring Online Security

      November 12, 2021

      Streaming Wars: The Digital Transformation of Entertainment

      July 16, 2021
    • Gaming

      GTA Popularity Continues to Rising

      March 15, 2023

      Top Upcoming games and what to expect

      January 8, 2023

      Top Games of 2022

      December 7, 2022

      Play 2 Earn In Crypto

      September 3, 2022
    • News

      GTA Popularity Continues to Rising

      March 15, 2023

      The Rise of Private Trackers

      February 23, 2023

      Top Upcoming games and what to expect

      January 8, 2023

      Top Games of 2022

      December 7, 2022

      Is meta the future

      December 6, 2022
    • Reviews

      Best Grocery Shopping APP in India in 2020

      April 7, 2020
    • How-To Guides

      How to Make an Account on Metamask

      March 20, 2023

      How to Resolve Error 1923 occurs when you try to update Adobe Acrobat DC

      January 30, 2023

      How to change name pattern in Sharex

      January 24, 2023

      Maximizing Phone Battery Life: Essential Tips and Tricks

      September 21, 2021

      How to Make Money on Youtube

      August 21, 2021
    • Technology

      New Feature of Microsoft Edge: Constant Data Fetch from Chrome

      March 4, 2023

      Does NFT have a future?

      January 15, 2023

      Web3 Future

      October 4, 2022

      Understanding SSL: Ensuring Online Security

      November 12, 2021

      The Motherboard: The Heart and Soul of a Computer

      November 2, 2021
    TechzureTechzure
    Home - Software - FFmpeg Commands Helpful with Audio and Video Files Working
    Software

    FFmpeg Commands Helpful with Audio and Video Files Working

    JainBy JainJanuary 4, 20205 Mins Read
    Facebook Twitter WhatsApp Telegram Email Pinterest
    ffmpeg commands

    If you’re familiar with FFmpeg, hop over to the commands already, and if not, wait and check what wonders this software will do in a 2-minute introduction. 

    FFmpeg is a free and open-source project consisting of a vast software suite of libraries and programs for handling video, audio, and other multimedia files and streams. It can do many things like joining two video files, extracting the audio component from a video file, converting your video into an animated GIF, Converting your video to any other format, and much more.

    It is available for free to Download on many Platforms. It’s a simple Command line tool and easy to operate; also, there is many GUI for this on the web; you can look for one as per your preferences.

    FFmpeg Commands supports the most popular audio and video formats; alternatively, you can quickly get the full list by running this command ./ffmpeg -formats.

    Without further ado, let’s take a look at some useful commands below-

    A. If you need to split a big video into smaller clips without re-encoding, This command will split the source video into two parts – 

    ffmpeg -i video.mp4 -t 00:00:30 -c copy small-1.mp4 -ss 00:00:30 -codec copy small-2.mp4

    One clip will end in the 30s, and the next one will start at the beginning of the 30s.

    B. To crop and audio file, the below command will create a 30-second audio file starting at 90 seconds from the original audio file without transcoding.

    ffmpeg -ss 00:01:30 -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3

    C. Change the volume; it’s easy to use volume filter to alter the volume of a media and compress the size.

    ffmpeg -i input.wav -af ‘volume=0.5’ output.wav

    D. Rotate the video clip 90° clockwise. To do it, set transpose to 2 to turn the video 90° anti-clockwise.

    ffmpeg -i input.mp4 -filter:v ‘transpose=1’ rotated-video.mp4

    E. Split video files into smaller clips like mini clips to do this use the time offset parameter (-ss) to specify the start time stamp in HH:MM: SS.ms format while the -t parameter is for determining the actual duration of the clip in seconds.

    ffmpeg -i input.mp4 -ss 00:00:50.0 -codec copy -t 20 output.mp4

    F. Combine multiple files into a single file.

    FFmpeg -f concat -i file-list.txt -c copy output.mp4

    G. Split the audio from video file with -vn switch extracts the audio portion from a video, and we are using the -ab switches to save the sound as a 256kbps MP3 file.

    ffmpeg -i video.mp4 -vn -ab 256 audio.mp3

    Change the audio output format per your preference.

    H. Convert your video into a GIF (animated)m with the help of scale filter you can specify the width of the GIF and the -t parameter to specify the duration while -r specifies the fps.

    FFmpeg -i video.mp4 -vf scale=500:-1 -t 10 -r 10 image.gif

    I. Get Images from a video

    FFmpeg -ss 00:00:45 -i video.mp4 -vf scale=800:-1 -vframes 1 image.jpg

    J. Change video format from like Flv to mp4 to do that use the -vcode option to define the encoding format for the output file and adjust the video format from Flv to mp4. It takes time to encode a video so you can speed up the process by forcing a preset, although it reduces overall video quality.

    ffmpeg -i youtube.flv -c:v libx264 filename.mp4

    ffmpeg -i video.wmv -c:v libx264 -preset ultrafast video.mp4

    K. Easily create slideshow from images using a 

    collection of pictures called img001.png, img002.png, and so forth. 

    Every picture will take 5 seconds to complete (-r 1/5).

    ffmpeg -r 1/5 -i img%03d.png -c:v libx264 -r 30 -pix_fmt yuv420p slideshow.mp4

    L. Add a poster image to audio, A cover image attached to an audio file, and the length of the output video would be the same as the input audio stream.

    FFmpeg -loop 1 -i image.jpg -i audio.mp3 -c:v libx264 -c:a aac -strict experimental -b:a 192k -shortest output.mp4

    M. If you want to Convert Video into Images, use the command below to extract images from frames every ‘n’ seconds. This command saves image frames from the video after every 2 seconds.

    FFmpeg -i movie.mp4 -r 0.50 frames_%04d.png

    N. Mute a video (Remove the audio component)

    Use the -an parameter to disable the audio portion of a video stream.

    FFmpeg -I video.mp4 -an mute-video.mp4

    O. To Merge an audio and video file, please specify the -shortest switch to finish the encoding when the shortest clip ends.

    ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -strict experimental output.mp4

    ffmpeg -i video.mp4 -i audio.mp3 -c:v copy -c:a aac -strict experimental -shortest output.mp4

    P. Resize a video with the size (-s) switch to resize a video while maintaining the aspect ratio.

    FFmpeg -i input.mp4 -s 480×320 -c:a copy output.mp4

    Use the -t parameter to specify the duration of the video.

    FFmpeg -loop 1 -i image.png -c:v libx264 -t 30 -pix_fmt yuv420p video.mp4

    Q. Add subtitles to a movie.

    ffmpeg -i movie.mp4 -i subtitles.srt -map 0 -map 1 -c copy -c:v libx264 -crf 23 -preset veryfast output.mkv

    ffmpeg -i input.mp4 -filter:v ‘transpose=2,transpose=2’ rotated-video.mp4

    R. Speed up or Slow down the video

    You can change your video’s speed using the steps (set presentation time stamp) filter of FFmpeg. This command will make the video 8x (1/8) faster or use setpts=4*PTS to make the video 4x slower.

    FFmpeg -i input.mp4 -filter:v “setpts=0.125*PTS” output.mp4

    S. Speed up or Slow down the audio

    For changing the speed of audio, use the tempo audio filter. This command will double the speed of audio. You can use any value between 0.5 and 2.0 for sound.

    FFmpeg -i input.mkv -filter:a “atempo=2.0” -vn output.mkv

    If you would like to add more commands to this list, please comment below.

    Source: https://github.com/hrsh2112/PHP-Video-Converter–Kit–ffmpeg

    Share. Facebook Twitter Pinterest Email Reddit Telegram WhatsApp
    Next Article Get more Backlinks to your Website

    Related Posts

    Technology

    New Feature of Microsoft Edge: Constant Data Fetch from Chrome

    March 4, 20234 Mins Read
    How-To Guides

    How to Resolve Error 1923 occurs when you try to update Adobe Acrobat DC

    January 30, 20232 Mins Read
    Software

    Image and Video Date Fixer App: Complete Overview of Features and Benefits

    September 6, 20215 Mins Read
    View 1 Comment

    1 Comment

    1. Eric Izle on July 25, 2020 12:45 PM

      I just started my blog a few months ago and discovered this site just two weeks now, and wow…So grateful for you. Thanks for the post. awesome..

      Reply
    Leave A Reply Cancel Reply

    Editors Picks

    Unmasking Windows Driver Errors: Causes, Solutions, and Best Practices

    October 4, 2021

    Internet Marking – The Present and The Future

    August 29, 2021

    AI Assistants: A Practical Guide to Automate Daily Tasks

    February 11, 2025

    Quantum Tech’s Rise: Guide for Software Developers

    February 27, 2025

    Content Management Systems (CMS): Revolutionizing Web Development

    April 2, 2021
    • Techzure: Your Source for all things Techie Stuffs. We provide all the latest Tech, Games, Crypto news and reviews of World, Windows, Market & much more.
    Facebook X (Twitter) Pinterest Instagram RSS

    Categories

    • Blog
    • News
    • Crypto
    • How To
    • Gaming
    • Reviews
    • Technology

    Services

    • Advertise with US
    • Cookies Policy
    • Copyright
    • Newsletters
    • Sponsored News
    • Work With Us

    Subscribe to Updates

    Get the latest creative news from FooBar about art, design and business.

    © 2025 ThemeSphere. Designed by ThemeSphere.
    • Privacy Policy
    • Terms
    • Contact

    Type above and press Enter to search. Press Esc to cancel.