Jump to content

Can Emby transcode DTS to DD/AC3?


andrewmalpass

Recommended Posts

rbjtech
4 hours ago, Strudo76 said:

Would this issue be the reason why my friends with a LG 75UN8100PTB don't get any audio at all with DTS or TrueHD streams? If there is something that can be specified in the app to transcode those streams to something it can play, can someone describe it to me? I'm trying to troubleshoot their problem but I don't have an LG TV to see what the app looks like.

No LG TV that I'm aware of supports HD Audio internally (WebOS Apps) - and in 2020 they also removed DTS Core (5.1).  

Emby should therefore try and transcode those streams to AC3 - but a preferred option would be to simply select the non-HD/non-DTS stream before playing.

 

 

 

Link to comment
Share on other sites

mctubster

I would also like to vote for the the AC3 switch. I have a 2020 LG with zero DTS capability and a Sonos soundbar. BTW the Samsungs also have no DTS decode as well and Sonos is selling a lot of soundbars, so suspect this intersection will get larger and larger

Cheers

Link to comment
Share on other sites

rbjtech

This feature is in the next release of the LG App - the issue with with all the TV Apps is the manufacturers take FOREVER to validate and approve EACH update.    LG appear to actually be one of the quicker ones .. so just a waiting game I'm afraid ..

 

Edited by rbjtech
  • Like 1
Link to comment
Share on other sites

Rather than wait for the apps to be approved, would it be possible to introduce a list of available formats on a per user basis? That way if there are troublesome devices that for one reason or another don't support a particular format, we could set up a user profile which that device would sign in as, and transcoding would be based on what formats the user profile says are valid, rather than what the device says it supports. It would work around any issues of device incompatibilities and allow the desired configuration up to the server administrator.

Link to comment
Share on other sites

coolspot

Oh nice I think this has been my issue with some media forever now on my LG and sonos.  Glad to be the DTS thing has been addressed!

It's sometimes hard to find the media in the sound format I'm looking for, especially with the 4k

Link to comment
Share on other sites

  • 1 month later...
jelaniecob
On 11/08/2019 at 05:06, sire said:

@@Luke just wanted to see if there was any chance this DTS to DD (or even AC3) option would be implemented in the LG TV app anytime soon?

 

Thanks for your help!

Have also a LG oled c9.

 

and can’t play any dts movie with my Sonos arc :-(

Link to comment
Share on other sites

CBers
2 minutes ago, jelaniecob said:

can’t play any dts movie with my Sonos arc 😞

The Sonos Arc still doesn't support DTS does it, just Dolby upto Atmos? 

 

Edited by CBers
Link to comment
Share on other sites

  • 1 month later...
mctubster

Dec 2020. Still no sign of this release... 

I’m paying to $5 pm deliberately to support Emby but this issue has been raised for a couple of years now. 😕 Not a new issue and the LG takes ages for releases story is wearing thin. I’m getting a lot of Prime, Disney releases 

Edited by mctubster
Link to comment
Share on other sites

nitrup93
On 12/6/2020 at 9:12 AM, mctubster said:

Dec 2020. Still no sign of this release... 

I’m paying to $5 pm deliberately to support Emby but this issue has been raised for a couple of years now. 😕 Not a new issue and the LG takes ages for releases story is wearing thin. I’m getting a lot of Prime, Disney releases 

I'm in same situation :(

Link to comment
Share on other sites

Charlie117
On 12/6/2020 at 9:12 AM, mctubster said:

Dec 2020. Still no sign of this release... 

I’m paying to $5 pm deliberately to support Emby but this issue has been raised for a couple of years now. 😕 Not a new issue and the LG takes ages for releases story is wearing thin. I’m getting a lot of Prime, Disney releases 

So just watch those in the native apps? They both use Dolby Digital for everything.

Link to comment
Share on other sites

  • 2 weeks later...
Vanboozin

DTS is Definitely my preferred source !!

So much better than dolby

I came here looking to stop emby  from transcoding my dts tracks to dolby ( driving me crazy )

I only save the dts track & mux out the dolby stuff, Plex plays them fine but Emby encodes it to ac3 WHY ?

its telling me "unsupported container" wtf i dont wanna re-encode all my dam files just so emby is happy

Link to comment
Share on other sites

2 minutes ago, Vanboozin said:

DTS is Definitely my preferred source !!

So much better than dolby

I came here looking to stop emby  from transcoding my dts tracks to dolby ( driving me crazy )

I only save the dts track & mux out the dolby stuff, Plex plays them fine but Emby encodes it to ac3 WHY ?

its telling me "unsupported container" wtf i dont wanna re-encode all my dam files just so emby is happy

Hi there, we're happy to help. Please see how to report a media playback issue. thanks.

Link to comment
Share on other sites

Strudo76
4 minutes ago, Vanboozin said:

DTS is Definitely my preferred source !!

So much better than dolby

I came here looking to stop emby  from transcoding my dts tracks to dolby ( driving me crazy )

I only save the dts track & mux out the dolby stuff, Plex plays them fine but Emby encodes it to ac3 WHY ?

its telling me "unsupported container" wtf i dont wanna re-encode all my dam files just so emby is happy

What container format are you using? I find some players don’t handle the avi files very well, but don’t generally have an issue with mkv. But that’s determined by the playback device and what formats it can use. 

Link to comment
Share on other sites

Vanboozin

Yes emby handles my MKV's with DTS  very well

Its the recent MPEG 2 Transport streams (m2ts ) with DTS i recently added that are being transcoded 

 

I will post another thread, just readin the facts & posting rules

Cheers

Edited by Vanboozin
Link to comment
Share on other sites

  • 2 weeks later...
nekoLite

I find myself in the same situation as some others here, LG 2020 model + Sonos Arc, so no DTS capability and half of my library is in DTS. 

To manually convert them all to DD5.1 is not feasible... I suppose I could write a script to do it but I've been holding off on doing that waiting for the LG app update. 

Out of curiosity, how long did it take LG to approve the previous update to the Emby app?

Link to comment
Share on other sites

  • 2 weeks later...
rbjtech

The key issue is DTS is now out of favour with seemingly most manufacturers - so the only real option imo is to add a compatible track - meaning it can be played natively on any device without the dependency of needing a 'on the fly' conversion each time it is played.

A basic windows script to do this is very simple - I've given an example below.  All you need to do is create a .bat file (in notepad), cut and paste in the text below, save it.  Put the created .bat file in the sub directory (or root) of the file system where all your .mkv files are - and it will go through them ALL and add an AC3 audio track (derived from the first Audio track it finds ) to them all in a NEW file with the original filename plus '-AC3' appended.  

so 'alien.mkv' will create a new file called 'alien-AC3.mkv'.  alien.mkv will remain untouched.(*)

You'll need to change the path of ffmpeg to where yours is installed (highlighted in red).

(*) If you are comfortable with what it is doing (test on a test subdirectory first ;)...) then remove the 'rem' from the script (highlighted in Green) and it will also remove the original .mkv as it goes.

-----

@echo off

FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (

    "C:\Emby-Server\system\ffmpeg.exe" -i "%%x" -map 0:v -map 0:a:0 -map 0:a  -c:s copy -c:v copy -c:a copy -c:a:0 ac3 -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-AC3.mkv"

rem    del /q "%%~dx%%~px%%~nx.mkv"

    )

 

Link to comment
Share on other sites

unisoft
On 25/11/2018 at 20:45, Luke said:

Unfortunately LG doesn't have an API available to allow us to detect DTS support, therefore the only solution is going to be via a setting.

A setting is fine, but my OLED55C6V supports direct DTS (I think LG took that codec support out in newer TVs and this was the last 3D panel and don't intend to upgrade until I really have to).

I'd like DTS to be passed by default (at least on OLED55C6V and other models of the time B6 and G6) - which sounds like a setting to change it if wanted would work? Allows old that have direct support and newer that don't (unless you can do this automatically by model numbers anyway???)

Link to comment
Share on other sites

rbjtech

If your LG TV supports DTS (my C8 does) then the current LG App will play DTS or pass it through if you have an AV Receiver (via ARC).  There are no settings to change in the App.

I presume once the new LG App is released, then you'll need to manually tell the app to transcode DTS to AC3 (to then passthough via ARC) as currently emby is 'dumb' to what the LG TV can and cannot do with regards to DTS processing.

Link to comment
Share on other sites

nekoLite
On 1/7/2021 at 11:49 AM, rbjtech said:

The key issue is DTS is now out of favour with seemingly most manufacturers - so the only real option imo is to add a compatible track - meaning it can be played natively on any device without the dependency of needing a 'on the fly' conversion each time it is played.

A basic windows script to do this is very simple - I've given an example below.  All you need to do is create a .bat file (in notepad), cut and paste in the text below, save it.  Put the created .bat file in the sub directory (or root) of the file system where all your .mkv files are - and it will go through them ALL and add an AC3 audio track (derived from the first Audio track it finds ) to them all in a NEW file with the original filename plus '-AC3' appended.  

so 'alien.mkv' will create a new file called 'alien-AC3.mkv'.  alien.mkv will remain untouched.(*)

You'll need to change the path of ffmpeg to where yours is installed (highlighted in red).

(*) If you are comfortable with what it is doing (test on a test subdirectory first ;)...) then remove the 'rem' from the script (highlighted in Green) and it will also remove the original .mkv as it goes.

-----

@echo off

FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (

    "C:\Emby-Server\system\ffmpeg.exe" -i "%%x" -map 0:v -map 0:a:0 -map 0:a  -c:s copy -c:v copy -c:a copy -c:a:0 ac3 -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-AC3.mkv"

rem    del /q "%%~dx%%~px%%~nx.mkv"

    )

 

I don't disagree with you that AC3 is preferred rather than DTS for native playback. I've just been lazy and thought I could wait for the LG Emby app update.

Thank you for the script, I'm sure someone will be happy for it, but for me personally it doesn't help much because I only run Linux 🙂

I threw together this simple bash script maybe it can be of use for someone else. It will recursively search a directory for mkv files, check if it has a DTS audio stream and if found convert and add an AC3 audio stream. It will output a new mkv file and then delete the original mkv. I recommend testing it out first before running it on your library folder.

#!/bin/bash 

DTS="Audio: dts (DTS)"

find . -type f -name "*.mkv" -print0 | while IFS= read -r -d '' file; do
        if ffprobe "$file" |& grep -F "$DTS"; then 
        echo "DTS audio found, converting $file"
        ffmpeg -nostdin -i "$file" -map 0:v -map 0:a:0 -map 0:a -map 0:s?  -c:v copy -c:s copy -c:a copy -c:a:0 ac3 -disposition:a:0 default -disposition:a:1 0 "${file%.mkv}.AC3.mkv"
        wait
        test -f "${file%.mkv}.AC3.mkv" && rm "$file"
    else
        echo "DTS audio not found in $file"
    fi
done

 

Edited by nekoLite
  • Like 2
Link to comment
Share on other sites

rbjtech

Cool - the more scripts the better - bash, batch, powershell - the concept is the same, recursively find what you want and let ffmpeg do it's thang .. 👍

Link to comment
Share on other sites

  • 2 weeks later...
Asgart
On 1/7/2021 at 11:49 AM, rbjtech said:

The key issue is DTS is now out of favour with seemingly most manufacturers - so the only real option imo is to add a compatible track - meaning it can be played natively on any device without the dependency of needing a 'on the fly' conversion each time it is played.

A basic windows script to do this is very simple - I've given an example below.  All you need to do is create a .bat file (in notepad), cut and paste in the text below, save it.  Put the created .bat file in the sub directory (or root) of the file system where all your .mkv files are - and it will go through them ALL and add an AC3 audio track (derived from the first Audio track it finds ) to them all in a NEW file with the original filename plus '-AC3' appended.  

so 'alien.mkv' will create a new file called 'alien-AC3.mkv'.  alien.mkv will remain untouched.(*)

You'll need to change the path of ffmpeg to where yours is installed (highlighted in red).

(*) If you are comfortable with what it is doing (test on a test subdirectory first ;)...) then remove the 'rem' from the script (highlighted in Green) and it will also remove the original .mkv as it goes.

-----

@echo off

FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (

    "C:\Emby-Server\system\ffmpeg.exe" -i "%%x" -map 0:v -map 0:a:0 -map 0:a  -c:s copy -c:v copy -c:a copy -c:a:0 ac3 -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-AC3.mkv"

rem    del /q "%%~dx%%~px%%~nx.mkv"

    )

 

Great! Thank you, this really helped! :D

 

But I got an issue with this bat. If there are two or more audio tracks, like in my case a german and an english audiotrack, this script is just converting the main track into ac3. Would it be possible to adjust the script so it would create an ac3 track for every dts track in the mkv?

 

Another issue I'm facing is, that I can't seem to use it on my network drive. The script says "UNC paths are not supported.  Defaulting to Windows directory." and just closes the cmd window. I guess this might be an issue with ffmpeg not supporting network drives (in my case an unraid server)? If I copy the mkv on my windows machine, it works flawlessly. 

 

I'm not sure if the second problem is fixable, but it would be awesome if the first issue could be fixed by chanigng a few lines in the code :)

Link to comment
Share on other sites

nekoLite
8 hours ago, Asgart said:

Another issue I'm facing is, that I can't seem to use it on my network drive. The script says "UNC paths are not supported.  Defaulting to Windows directory." and just closes the cmd window. I guess this might be an issue with ffmpeg not supporting network drives (in my case an unraid server)? If I copy the mkv on my windows machine, it works flawlessly. 

If you map the shared folder as a network drive with a drive letter as described here it should work: https://support.microsoft.com/en-us/windows/map-a-network-drive-in-windows-10-29ce55d1-34e3-a7e2-4801-131475f9557d

  • Like 1
Link to comment
Share on other sites

rbjtech

Hi

You are possibly trying to run the batch file from a network drive ?

Try copying the batch file to the actual drive in use and run it from there - batch files have some issues with UNC file paths in certain circumstances.

Re the multiple track - sure this is easily doable by just mapping the extra track - ie

"C:\Emby-Server\system\ffmpeg.exe" -i "%%x" -map 0:v -map 0:a:0 -map 0:a  -map 0:a:1 -c:s copy -c:v copy -c:a copy -c:a:0 ac3 -c:a:1 ac3 -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-AC3.mkv"

If you wanted the 2nd AC3 track as the default - just change around the disposition statement - ie -disposition:a:1 default -disposition:a:0 0

When ffmpeg runs - you'll see it adding 2 extra tracks now - ie

Stream mapping:
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (dts (dca) -> ac3 (native))
  Stream #0:1 -> #0:2 (dts (dca) -> ac3 (native))
  Stream #0:2 -> #0:3 (copy)
  Stream #0:2 -> #0:4 (copy)

This is meant as an example of what you can do - not necessarily as a direct solution ;) - for conditional DTS selection, then you need to start adding logic to the script - probably via ffprobe to scan the file first to see what it needs to convert.

Anyway - have a 'play' with a copy of the file to see what you can do.  You can run it directly from the command line if you like to test - no need to do it from a batch file - ie

"C:\Emby-Server\system\ffmpeg.exe" -i "G:\Films 8\Cast Away (2000)\Cast Away (2000) - test.mkv" -map 0:v -map 0:a:0 -map 0:a -map 0:a:1 -c:s copy -c:v copy -c:a copy -c:a:0 ac3 -c:a:1 ac3 -disposition:a:0 default -disposition:a:1 0 -f matroska "G:\Films 8\Cast Away (2000)\Cast Away (2000) - dual-ac3.mkv"

I hope this helps - good luck.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...