Possible Problem With TrueHD Audio Codec

Hello. :slight_smile:

I was trying to export a project and the audio of the original file was DTS. I thought about using the TrueHD codec option that is found on the Audio tab. However, it would constantly fail. I had to end up using both flac and wav.

So I am not sure if this is a problem with Shotcut that needs to be fixed.

By the way, I do imagine that this is the same TrueHD that is found on retail Blu-Ray discs and such correct?

Here is the audio info of the original file to help give more information:

ID : 2
Format : DTS
Format/Info : Digital Theater Systems
Format profile : MA / Core
Mode : 16
Format settings, Endianness : Big
Codec ID : A_DTS
Duration : 1 h 25 min
Bit rate mode : Variable / Constant
Bit rate : 1 967 kb/s / 1 509 kb/s
Channel(s) : 6 channels
Channel positions : Front: L C R, Side: L R, LFE
Sampling rate : 48.0 kHz
Frame rate : 93.750 FPS (512 SPF)
Bit depth : 16 bits
Compression mode : Lossless / Lossy
Stream size : 1.17 GiB (19%)


Shotcut Export panel is designed to let you experiment with the numerous options FFmpeg provides. It is not designed to restrict you to only use combinations and parameters that are valid or make sense. That is what the presets are for. If you stray from the defaults or presets, you are are expected to know what you are doing and figure out some things for yourself. Sometimes you need to add options in the Other tab. In this case, you did not specify very much about what you attempted. Is TrueHD permitted in MP4?
I get this:
[truehd @ 0x7f841483a600] The encoder 'truehd' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

So, I added “strict=-2” into Other, and I get this:
[truehd @ 0x7fb8ce0b7000] Unsupported channel arrangement

I added “channel_layout=3” for stereo into Other. Now, I get
[mp4 @ 0x7fc72407b600] Could not find tag for codec truehd in stream #1, codec not currently supported in container

Just as I thought. I changed format to Matroska, and now it works.

Ah, okay. So TrueHD cannot be used in MP4. Can it be done in AVI by any chance?

I ask this because Shotcut has a problem with MKV were it exports the frame rate as variable instead of constant. So I try to use MP4 instead whenever possible.

Another thing, if I wanted to export only the TrueHD audio then what file format do I use? I used the TrueHD option in the file format list, I also picked it as the codec, put 2000k as the average bitrate (since it was around that in the original audio), put .thd as the file extension but then it failed again. What gives?

Can you try a .dts extension?