Converting Audio and Video files using FFMPEG Tool

Reading Time : ~ .

FFMPEG (Fast Forward Moving Pictures Expert Group):

FFmpeg is a  command line tool used for performing various conversion operations on audio and video files.

FFMPEG Installation:

FFmpeg is free and open source. You’ll be able to install it on your Windows PC as well as your Linux server.

sudo apt-get install software-properties-common python-software-properties

sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next

sudo apt-get update

sudo apt-get install ffmpeg

Basic Syntax:
The most basic form of an FFmpeg command

ffmpeg -i input_filename output_filename.extension

"ffmpeg" reads from an arbitrary number of input "files", specified by the -i option, and writes to an arbitrary number of output "files", which are specified by output filename.

import os
Input_file_path = '/home/xyz/Input_file_path.mp3'
Output_file_path = '/home/xyz/'(Path to store converted file)
os.system("ffmpeg -i "+Input_file_path+" -strict experimental "+Output_file_path+".extension")

This will convert the video/Audio to required formats.

    By Posted On
SENIOR DEVELOPER at MICROPYRAMID

Need any Help in your Project?Let's Talk

Latest Comments
Related Articles
Working with python collections part 1 Rakesh babu Podishetty

Python Collections - named tuple is to access by the names specified and deque is to append and pop the elements from both sides of ...

Continue Reading...
python class special methods or magic methods Ravi Kumar Gadila

python class special methods or magic methods. magic methods allow us to override or add the default functionality of python objects. One of the biggest ...

Continue Reading...
Python Coding Techniques and Programming Practices Ashwin Kumar

Coding techniques and programming practices are one of the features of a professional programmer. While writing code to solve a problem programmer should make simple ...

Continue Reading...

Subscribe To our news letter

Subscribe to our news letter to receive latest blog posts into your inbox. Please fill your email address in the below form.
*We don't provide your email contact details to any third parties