chinedooo 0 Posted June 1, 2021 Share Posted June 1, 2021 On 10/26/2020 at 6:00 AM, rbjtech said: For those with the DTS problem, the best solution is to simply add a non DTS track to the original media. That way, the issues goes away and you now have a file that can be played by any system - you can opt to play the DTS Audio if you can - this script does not replace it. Go to your emby server system directory and find ffmpeg Then at a command window use the following to ADD an AC3 track and make it the default track :- ffmpeg.exe -i input.mkv -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 output.mkv It copies all the existing tracks (original quality) and just adds an AC3 track, derived from the 1st Audio track. This will work on any mkv file incl 4K - it will not touch the original 'input.mkv' file. Is there a way to do this all at once to every mkv in a folder? Link to comment Share on other sites More sharing options...
SamES 890 Posted June 1, 2021 Share Posted June 1, 2021 Link to comment Share on other sites More sharing options...
harrybi 1 Posted June 1, 2021 Share Posted June 1, 2021 (edited) 1 hour ago, chinedooo said: Is there a way to do this all at once to every mkv in a folder? I'm using this script to convert all files not already containing an ac3 stream (it uses eac3), save it as `toeac3.sh`: #!/bin/bash file=$1 newFile=$1.eac3.mkv #check if dest file already exists if [ -f "$newFile" ]; then echo "$newFile already exists." exit 0 fi #echo Check for ac3 already included probe=$(ffprobe -i "${file}" 2>&1) echo "$probe" | grep -Eq "Audio: (ac3|eac3)" if [ $? -eq 0 ]; then echo "Contains 'ac3' or 'eac3'" exit 0 fi #echo Check if the file is encoded with DTS or TrueHD or PGS ( echo "${probe}" | grep -Eq "Audio: (truehd|dts|flac)" || echo "${probe}" | grep -Eq "Subtitle: pgs" ) && #echo Check if the file is open lsof | grep "${file}" >/dev/null 2>&1 || ( # Create a subtitle stream that exludes all PGS streams substream=$(echo "${probe}" | grep -E "Subtitle: pgs" | sed -E 's/.*(0:[0-9]+).*/-map -0:\1/' | tr '\n' ' ') && echo "substream=${substream}" && # Only convert DTS, TrueHD, and FLAC streams to EAC3 acstream=$(echo "${probe}" | grep -E "Audio: (truehd|dts|flac)" | sed -E 's/.*0:([0-9]+).*/-c:\1 eac3 -ac:\1 6 -b:\1 1536k/' | tr '\n' ' ') && echo "acstream=${acstream}" && echo "===>> Convert to EAC3..." ffmpeg -i "${file}" -map 0 ${substream} -c:a copy ${acstream} -c:v copy -c:s copy -f matroska "${newFile}" #echo Replace the original mkv with the newly converted file #mv "${newFile}" "${file}" #echo remove original file #rm "${file}" ) Then I added a function in my `.bashrc` calling that script for all mkv files in the current folder: [.bashrc] toeac3all(){ for filename in ./*.mkv; do echo "==>> processing: ${filename}" toeac3 "${filename}" done } Edited June 1, 2021 by harrybi Link to comment Share on other sites More sharing options...
rbjtech 4260 Posted June 1, 2021 Share Posted June 1, 2021 7 hours ago, chinedooo said: Is there a way to do this all at once to every mkv in a folder? Which OS are you using - if Windows, then a simple recursive batch file will run it for all the subfolders. Just copy and paste the contents in Bold below into a new notepad file and save with a .bat extension (ie add-ac3.bat) and then from a command line, run this batch file from the root location of where you want to convert all the files (including all subfolders). ie - if all your movies are under c:\movies - then put it in this folder and run it from there and it will also do all the subfolders - c:\movies\movie1 ... c:\movies\movie2 etc etc I suggest copying to a single test folder to start with and then run from the root following a successful test. NOTE - if you want to remove the ORIGINAL file on each conversion - then just delete the word 'rem' from the file below. Only do this once you are happy with the test conversion. @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 More sharing options...
Henk.Lietaert 0 Posted June 3, 2021 Share Posted June 3, 2021 Any feedback from LG concerning the update? First time you mentioned that you were working with LG to get the update through was in august 2020. How slow is LG at approving updates if it takes +9 months? Link to comment Share on other sites More sharing options...
Talbs 0 Posted June 23, 2021 Share Posted June 23, 2021 I've jus got an LG and found this problem with DTS as well. Do you have any idea on when the update will be released? I really don't want to buy another Nvidia Shield if a fix is round the corner Link to comment Share on other sites More sharing options...
Twistator 0 Posted July 2, 2021 Share Posted July 2, 2021 (edited) Can we get an update on an ETA? I realize you have fixed it, but the update is still not approved by LG? Is that right? As others have noted, its been over half a year. Surely this cant be normal, what if it had been important security fixes? Cant you ask again? I mean as it stands, the TV is unusable unless u somehow force it to transcode and the only suggested workaround really is not tenable for all DTS files I have, just to accommodate one device. The Device is a LG: OLED55B87LC with the App being version: 1.0.24 Its a remote user, so right now my solution is to force limit the bitrate of the user to some low enough number to get emby to automatically transcode. But this also reduces video quality despite the connection being able to handle the direct stream. Edited July 2, 2021 by Twistator Link to comment Share on other sites More sharing options...
jdennis187 0 Posted July 22, 2021 Share Posted July 22, 2021 On 7/2/2021 at 2:04 PM, Twistator said: Can we get an update on an ETA? I realize you have fixed it, but the update is still not approved by LG? Is that right? As others have noted, its been over half a year. Surely this cant be normal, what if it had been important security fixes? Cant you ask again? I mean as it stands, the TV is unusable unless u somehow force it to transcode and the only suggested workaround really is not tenable for all DTS files I have, just to accommodate one device. The Device is a LG: OLED55B87LC with the App being version: 1.0.24 Its a remote user, so right now my solution is to force limit the bitrate of the user to some low enough number to get emby to automatically transcode. But this also reduces video quality despite the connection being able to handle the direct stream. Is it still broken? Link to comment Share on other sites More sharing options...
rbjtech 4260 Posted July 23, 2021 Share Posted July 23, 2021 On 02/07/2021 at 19:04, Twistator said: Can we get an update on an ETA? I realize you have fixed it, but the update is still not approved by LG? Is that right? As others have noted, its been over half a year. Surely this cant be normal, what if it had been important security fixes? Cant you ask again? I mean as it stands, the TV is unusable unless u somehow force it to transcode and the only suggested workaround really is not tenable for all DTS files I have, just to accommodate one device. The Device is a LG: OLED55B87LC with the App being version: 1.0.24 Its a remote user, so right now my solution is to force limit the bitrate of the user to some low enough number to get emby to automatically transcode. But this also reduces video quality despite the connection being able to handle the direct stream. This B8 directly supports DTS anyway - so you should not have an issue ? Link to comment Share on other sites More sharing options...
ParcelRot 1 Posted November 28, 2021 Share Posted November 28, 2021 (edited) Emby for LG TV is still at 1.0.24. I was shocked when I installed Emby on my LG CX 77 TV and it hadn't been updated in a year and a half. I guess the new version will never be approved by LG? I encountered the same audio problem as others here. Edited November 28, 2021 by ParcelRot Link to comment Share on other sites More sharing options...
rbjtech 4260 Posted November 28, 2021 Share Posted November 28, 2021 It's looking that way. I gave up a year ago and got a Shield Pro 2019 - it's far more capable than the internal player anyway - does DV, refresh rate switching and HD Audio. Give the LG OLED the signal it deserves ! I still miss the magic remote though - pointing to the play line and subsequent image in realtime and clicking the button was very nice - far better than the Shield in that respect. 1 Link to comment Share on other sites More sharing options...
Luke 37063 Posted December 16, 2021 Share Posted December 16, 2021 Emby for LG TV's 1.0.31 has been released. Stay tuned to the blog for the release announcement. 1 Link to comment Share on other sites More sharing options...
Simonv 1 Posted December 20, 2021 Share Posted December 20, 2021 On 12/16/2021 at 9:36 AM, Luke said: Emby for LG TV's 1.0.31 has been released. Stay tuned to the blog for the release announcement. Yes! Works like a charm! Waited a long time but the app update is perfect. Thanks Emby team for delevering! 1 Link to comment Share on other sites More sharing options...
Luke 37063 Posted December 20, 2021 Share Posted December 20, 2021 Thanks for the feedback ! Link to comment Share on other sites More sharing options...
MikeyMan 8 Posted January 22, 2022 Share Posted January 22, 2022 (edited) On 6/1/2021 at 1:23 PM, rbjtech said: Which OS are you using - if Windows, then a simple recursive batch file will run it for all the subfolders. Just copy and paste the contents in Bold below into a new notepad file and save with a .bat extension (ie add-ac3.bat) and then from a command line, run this batch file from the root location of where you want to convert all the files (including all subfolders). ie - if all your movies are under c:\movies - then put it in this folder and run it from there and it will also do all the subfolders - c:\movies\movie1 ... c:\movies\movie2 etc etc I suggest copying to a single test folder to start with and then run from the root following a successful test. NOTE - if you want to remove the ORIGINAL file on each conversion - then just delete the word 'rem' from the file below. Only do this once you are happy with the test conversion. @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" ) Any thoughts on how to replace the original file instead of ending up with a load of -AC3 files? Or maybe first rename the old one to 'DTS' on order to make it easier to delete them afterwards? Tried removing the -AC3 in order to overwrite, but FFMPEG won't allow this: FFmpeg cannot edit existing files in-place. Edited January 22, 2022 by MikeyMan Link to comment Share on other sites More sharing options...
rbjtech 4260 Posted January 24, 2022 Share Posted January 24, 2022 (edited) On 22/01/2022 at 14:26, MikeyMan said: Any thoughts on how to replace the original file instead of ending up with a load of -AC3 files? Or maybe first rename the old one to 'DTS' on order to make it easier to delete them afterwards? Tried removing the -AC3 in order to overwrite, but FFMPEG won't allow this: FFmpeg cannot edit existing files in-place. Hi - yes you can't remove the original file until after you have finished reading from it. If you're confident that this is all working for you - then you can add the following inside the FOR loop after the ffmpeg command. del /q "%%~dx%%~px%%~nx.mkv" ren "%%~dx%%~px%%~nx-AC3.mkv" "%%~nx.mkv" The del removes the original file The ren renames the -AC3 file back to the original filename Test on a test file first Edited January 24, 2022 by rbjtech 1 Link to comment Share on other sites More sharing options...
MikeyMan 8 Posted February 2, 2022 Share Posted February 2, 2022 @rbjtechthanks, worked like a charm 1 Link to comment Share on other sites More sharing options...
Luke 37063 Posted February 16, 2022 Share Posted February 16, 2022 Emby for LG TV's 1.0.33 has been released. Stay tuned to the blog for the release announcement. 1 Link to comment Share on other sites More sharing options...
Luke 37063 Posted April 26, 2022 Share Posted April 26, 2022 Emby for LG TV's 1.0.35 has been released. Stay tuned to the blog for the release announcement. Link to comment Share on other sites More sharing options...
MikeyMan 8 Posted April 26, 2022 Share Posted April 26, 2022 So will there actually be a release announcement this time? Link to comment Share on other sites More sharing options...
Luke 37063 Posted April 26, 2022 Share Posted April 26, 2022 27 minutes ago, MikeyMan said: So will there actually be a release announcement this time? Yes there will. Link to comment Share on other sites More sharing options...
jblotka 2 Posted September 9, 2023 Share Posted September 9, 2023 On 10/26/2020 at 3:00 AM, rbjtech said: Go to your emby server system directory and find ffmpeg What's the path to find this? looking on my server settings and can't find it. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now