FFmpeg
FFmpeg (Fast Forward MPEG) is a free and open source command-line utility that can encode and decode a variety of media formats. It also allows you to stream and record audio and video on your system. FFmpeg can be compiled or installed on most operating systems. You can visit the FFmpeg website and download the newest version of the utility and to access a variety documentation (Table of Contents) and read the latest news. The website is at: https://www.ffmpeg.org/.
If you are using Linux, you can check to see if FFmpeg is installed on your system by opening your Terminal and entering the following:
ffmpeg -version
Press the Enter or Return key. If the utility is installed it will display the version that is installed on your system. It will also display a list of dependencies and their version numbers.
If you are using Linux, you can check to see if FFmpeg is installed on your system by opening your Terminal and entering the following:
ffmpeg -version
Press the Enter or Return key. If the utility is installed it will display the version that is installed on your system. It will also display a list of dependencies and their version numbers.
If you do not have it installed then type the following in your Terminal:
sudo apt-get install ffmpeg
Press the Enter or Return key. If it ask you if you want to install the program press the 'y' key and press Enter or Return.
To make sure that it installed, type the following in your Terminal:
ffmpeg -version
Press the Enter or Return key. The utility may display a different version than you see in my example.
sudo apt-get install ffmpeg
Press the Enter or Return key. If it ask you if you want to install the program press the 'y' key and press Enter or Return.
To make sure that it installed, type the following in your Terminal:
ffmpeg -version
Press the Enter or Return key. The utility may display a different version than you see in my example.
Using the command line or Terminal can be a bit intimidating for new users, so I will not go into a lot of details. I will try to keep my explanations short and simple. If you would like to know more about FFmpeg then check out The Complete Guide for Using ffmpeg in Linux by Sergiu. He does a great job explaing many of the features of FFmpeg.
Converting video from one format to another is as simple as opening your Terminal and entering the following format:
ffmpeg -i input.mp4 output.avi
This will allow you to convert from mp4 format to avi format. You just have to replace "input.mp4" to your actual video name and format and replace "output.avi" to the actual video name and format.
You can convert from one audio file format to another by opening your Terminal and entering the following format:
ffmpeg -i filename.wav newfilename.mp3
This will allow you to convert from wav format to mp3 format. You just have to replace "filename.wav" to your actual video name and format and replace "newfilename.mp3" to the actual video name and format.
ffmpeg -i input.mp4 output.avi
This will allow you to convert from mp4 format to avi format. You just have to replace "input.mp4" to your actual video name and format and replace "output.avi" to the actual video name and format.
You can convert from one audio file format to another by opening your Terminal and entering the following format:
ffmpeg -i filename.wav newfilename.mp3
This will allow you to convert from wav format to mp3 format. You just have to replace "filename.wav" to your actual video name and format and replace "newfilename.mp3" to the actual video name and format.
FFmpeg works great!
If you use Plex, Emby, and/or Kodi media server/media player system to play your video or audio files on your computer to the TVs in your house and you are not getting true Dolby Digital surround sound, then you can use FFmpeg to convert the audio inside your video file to AC3 to give you the Dolby Digital surround sound.
You need to open up the video file that's not providing true Dolby Digital surround sound with MediaInfo. Then look at your Audio stream information. If you see AAC LC instead of AC3, that will explain why you are not getting the best sound for your sound system. You can see in the Audio section that the audio file supports 6 channels, so it should provide seperation to your speakers throughout your room.
If you use Plex, Emby, and/or Kodi media server/media player system to play your video or audio files on your computer to the TVs in your house and you are not getting true Dolby Digital surround sound, then you can use FFmpeg to convert the audio inside your video file to AC3 to give you the Dolby Digital surround sound.
You need to open up the video file that's not providing true Dolby Digital surround sound with MediaInfo. Then look at your Audio stream information. If you see AAC LC instead of AC3, that will explain why you are not getting the best sound for your sound system. You can see in the Audio section that the audio file supports 6 channels, so it should provide seperation to your speakers throughout your room.
Most receivers can't decode AAC 5.1, so it's not a great format to use with receivers that use and support Dolby Digital 5.1. AAC (Advanced Audio Coding) is an audio coding standard for lossy digital audio compression. "AAC is the default or standard audio format for YouTube, iPhone, iPod, iPad, Nintendo DSi, Nintendo 3DS, iTunes, DivX Plus Web Player, PlayStation 3 and various Nokia Series 40 phones. It is supported on PlayStation Vita, Wii (with the Photo Channel 1.1 update installed), Sony Walkman MP3 series and later, Android and BlackBerry. AAC is also supported by manufacturers of in-dash car audio systems." -- wikipedia
AC3 (Dolby Digital) is widely used in HDTV broadcast, DVDs, Blu-ray Discs and game consoles. If you use an amplified theater system which supports Dolby Digital then I highly recommend that you convert or use video files with AC3 audio track. AC3 is great for backward compatibility on older Dolby Digital equipments.
AC3 (Dolby Digital) is widely used in HDTV broadcast, DVDs, Blu-ray Discs and game consoles. If you use an amplified theater system which supports Dolby Digital then I highly recommend that you convert or use video files with AC3 audio track. AC3 is great for backward compatibility on older Dolby Digital equipments.
How To Convert AAC to AC3 using FFmpeg
Open your Terminal and enter the following format:
ffmpeg -i "inputfile.mp4" -codec copy -acodec ac3 "outputfile.mp4"
If your output file uses the same extension, then use a slightly different filename for your output file. Using the format above will allow you to convert from AAC audio format to AC3 audio format. You just have to replace "inputfile.mp4" to your actual video name and format and replace "outputfile.mp4" to the actual video name and format.
Open your Terminal and enter the following format:
ffmpeg -i "inputfile.mp4" -codec copy -acodec ac3 "outputfile.mp4"
If your output file uses the same extension, then use a slightly different filename for your output file. Using the format above will allow you to convert from AAC audio format to AC3 audio format. You just have to replace "inputfile.mp4" to your actual video name and format and replace "outputfile.mp4" to the actual video name and format.
Open your Terminal and change to the directory or folder that your video file is in. I have the video file in my Videos folder so I entered the following: cd /home/tommy/Videos
I was immediately in my Videos folder after I pressed the Enter key.
I was immediately in my Videos folder after I pressed the Enter key.
Next I entered the following:
ffmpeg -i "5.1 Surround Sound AAC Test.mp4" -codec copy -acodec ac3 "5.1 Surround Sound AC3 Test.mp4"
If you are using a file name that contains spaces then use quotation marks around the file name to prevent the operating system from thinking the first word or characters is a new folder or location.
ffmpeg -i "5.1 Surround Sound AAC Test.mp4" -codec copy -acodec ac3 "5.1 Surround Sound AC3 Test.mp4"
If you are using a file name that contains spaces then use quotation marks around the file name to prevent the operating system from thinking the first word or characters is a new folder or location.
The conversion process will start and it should take long to conver the audio inside your video file. The amount of time will depend on the file size. The larger the file, the longer the conversion process will take.
You will see your new video file in the same folder as your original video file.
You can see the Audio Stream is now AC-3 and the audio still supports 6 channels.
FFmpeg is a great command line utility that can do so much more than convert one file format to another. I think it will be worth your time to learn more about this utility.
If you have not been getting the best audio output from your sound system, then I hope that FFmpeg will fix your problem too.
Take care!
If you have not been getting the best audio output from your sound system, then I hope that FFmpeg will fix your problem too.
Take care!
Aug 10, 2019