How to Convert MKV Video Audio from DTS to AC3

dts to ac3 convert dts to ac3

There are many models of Smart TV, so in that sense there is something for all tastes, but the truth is that some have somewhat curious restrictions regarding the formats supported for the reproduction of content, and that limits us a lot. A very common case is that of power play MKV videos whose audio is in AC3 format but not being able to do so if it is in DTS format, something that now we are going to see how to solve.

Luckily in Linux we have alternatives for everything, and one way to face this problem is through a script that will allow us convert the audio of a MKV video from DTS to AC3 automatically. To do this, we run our preferred text editor (it can be Gedit, as in my case, Nano, Vi or any other):

gedit DTSaAC3.sh

Once the file is open, we add the following:

nice -15 ffmpeg -i $1 -y -vcodec copy -copyts -acodec ac3 -ab 192k \
-vbsf h264_mp4toannexb -sn -f matroska $2

Now we must establish the script as executable, for which we do the following:

sudo chmod +755 ./DTSaAC3.sh

We are going to explain in a basic way how this script works: on the one hand, with the nice command together with the parameter -15 (we can also use -10) we are indicating that we want run this script with a low prioritya, so as not to affect the operation of the computer and restrict CPU usage to no more than 50%. Then, we execute the command ffmpeg itself, which is the one that performs the conversion, and as we can see, it is indicated that the video is left unchanged (-vcodec copy) while the audio is changed to ac3 (-acodec ac3).

Then, if we look closely we will see that there is two similar expressions, $ 1 and $ 2, that are intended to store the input and output file names respectively. So if our original file is called "PinkFloyd – TheWall.mkv" and it is located in / home / fede / Downloads, we must execute the command as follows:

./DTSaAC3 /home/fede/Descargas/PinkFloyd-TheWall.mkv PinkFloydTheWallAC3.mkv

That's it, the conversion will start, and in less than 5 minutes we will have our movie converted to MKV but with the audio in AC3 format.

More information - AMD Radeon has extreme performance on Linux 3.12


A comment, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Victor said

    thanks for the post but my linux skills have decreased a lot over time I can't make the script executable, if you can help me with that please !!! Thank you, I am writing to you from Venezuela