Fancy script to convert DTS to AC3

Hi all, after having tweaked all my settings I have the 1 short coming of not having a DTS capable setup on all of me vero’s. Now I can easily convert DTS audio to AC3 but the problem is a bit more complicated. (or better said I am too lazy).

-Option 1: in my bedroom I downgrade movies with DTS audio to stereo by means of kodi’s build in system
-Option 2: I convert all movies manually using ffmpeg using:

ffmpeg -i my_movie.mkv -map 0:v -map 0:a:0 -map 0:a -map 0:s -c:v copy -c:a copy -c:s copy -c:a:0 ac3 -b:a:0 640k my_movie_ac2.mkv

Now this means (this is where lazy comes in) I have to manually select 300+ files to convert. I would like to see a script that does: for i* in movies > If the first audio track is DTS > convert via ffmpeg (preferably preserve original track?).

I just dont want to check 300+ movie files to see if the track is available, convert manually etc. I also do not want to mess with all the other files.

Any ideas?

If you turn off DTS capable receiver and turn on AC-3 transcode, shouldn’t that do what you want?

Did i overlook ac3 encode? I disabled DTS passthrough capable but had to downmix it to stereo to get center sound (vocab) Would rather just run a sound conversion.

This is not really too much different than what we were talking about in the other thread. The audio setup guide should have also clarified how this works as well. You must select 2 channel in your audio settings in order for transcode to work. This setting is NOT how many output channels but rather how many PCM channels your downstream hardware supports. If you have passthrough enabled for AC3 and transcode set along with 2 channel output then all formats that are not AC3 or also set to passthrough will be transcoded to AC3 including all channels up to 5.1. The only downmixing will be from sources with more than 5.1 channels.

Ok, completely missed that. All i saw was 2 channel setting and television reporting PCM. For me indicating: stereo. It does not report dolby as it would with a converted track.

Where is the “transcode” setting hiding?

Make sure Settings level is Advanced or Expert.