Jump to content

Transcoding DTS-HD MA 7.1, DTS-HD MA make laggy my REMUX 4K Movies


FancyNerd92

Recommended Posts

FancyNerd92
12 hours ago, FrostByte said:

If you prefer this is how you would do it in ffmpeg.  Then you can use @rbjtech script from SamES post above on how to make a batch with FOR loop to do multiple files.

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 eac3 -ab 1536k -disposition:a:0 default -disposition:a:1 0 output.mkv

Would be a lot easier I think than messing with PS

I search on the web about "Open Command Window Here" and i think is that to do. But I'm getting an error. Must i change the name of "input.mkv" with the current movie name?

361473611_Screenshot2022-04-04145359.jpg.d88db47179ffdfc1bb03b64e68fb2db9.jpg

Link to comment
Share on other sites

FrostByte

Yes, in order to test that one line you would need to change "input.mkv" to the actual filename of your movie.

However, you could also paste the following into your bat file.

@echo off
FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (
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 eac3 -b:a 1536k -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-EAC3.mkv"
rem    del /q "%%~dx%%~px%%~nx.mkv"
)

Place the batch file in a folder with one movie and execute it.  Do NOT place it in your root movie folder yet until you tested it out on one movie first.  It searches for all mkv files in the current folder and all subfolders.  

  • Like 1
Link to comment
Share on other sites

FancyNerd92

I did that and the new movie file it's not playable on VLC at all...

I wrote:

ffmpeg.exe -i Ghostbusters.1984.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT-Copy.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 eac3 -ab 1536k -disposition:a:0 default -disposition:a:1 0 Ghostbusters.1984.2160p.BluRay.REMUX.HEVC.DTS-HD.MA.TrueHD.7.1.Atmos-FGT-CopyNEW.mkv

and after 5mins i was done.

But when i open the movie with VLC didn't play and VLC stack. But when i play the original movie file it's ok. So something goin' on with the new file.

174580783_Screenshot2022-04-04165128.jpg.dd17f79ad507aeead96c93b601dcc569.jpg

Edited by FancyNerd92
Link to comment
Share on other sites

FrostByte

Try using the script I posted.

Also, isn't there already an AC3 track in that file which you could use?

Plus there is going to be another problem in that there is already 30+ tracks in that file and Samsung TVs don't like that many tracks.  Unless you already removed all the unneeded subtitles.  Another cause of the issue you're seeing is too many tracks.

 

Link to comment
Share on other sites

rbjtech
26 minutes ago, FrostByte said:

Also, isn't there already an AC3 track in that file which you could use?

Yep - a perfectly valid 640Kb AC3 is available on the original source.  Quality wise, it will likely be better than anything converted with ffmpeg (even at 'just' AC3 max bitrates) as it was professionally created.  Also remember than ffmpeg still cannot convert to eac3 7.1, only 5.1 and of course you'll be losing Atmos anyway.

Personally, if you want to fully utilise your high end soundbar, then you need to get a high end client that can play HD Audio natively.

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

FancyNerd92

This movie, it's chosen randomly and played on VLC on my Server. It's not Samsung's problem... I have 200+ movies with DTS-MA, TRUE-HD 7.1 etc. so many of them they don't have ac3, and even they have it's the version with commendatory. Also, i prefer 1500 kbps than 640kbps.

My answer is why Emby Server it doesn't give me the options for Hardware Acceleration for Audio as it does for Video? I want my server to do the job and not my TV. I don't want to buy 4 Nvidia Shield for my TVs, after all i gave thousands euro for my Smart TVs what's the point to buy another device to make them smart?

I want a program for Windows that it can handle the convertion from DTS-HD, TRUE-HD etc to E-AC-3 and i can't find on the web. Only for AC3. I don't want so big downgrade to my audio. Movies aren't only Video but Audio too. With TRUE-HD 7.1 the server can handle it better. Also why i got a Faild after 10%-20%when I'm trying to convert the movies with Emby Server?

That i realy want is to do the job the Emby Server and not my TVs. How can I do it that?

Edited by FancyNerd92
Link to comment
Share on other sites

FancyNerd92
3 hours ago, FrostByte said:

Yes, in order to test that one line you would need to change "input.mkv" to the actual filename of your movie.

However, you could also paste the following into your bat file.

@echo off
FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (
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 eac3 -b:a 1536k -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-EAC3.mkv"
rem    del /q "%%~dx%%~px%%~nx.mkv"
)

Place the batch file in a folder with one movie and execute it.  Do NOT place it in your root movie folder yet until you tested it out on one movie first.  It searches for all mkv files in the current folder and all subfolders.  

What can I do with that? It's a script, ok. But how i use it? In txt? In CMD? In the movie file? In the PC random file? In FFMPEG file? I say again I don't know code in windows, i'm new. 🙂

Link to comment
Share on other sites

FrostByte

Copy/paste it into a .bat file.  Then either double click on it to execute, or from cmd prompt "call file.bat"  

Link to comment
Share on other sites

rbjtech
32 minutes ago, FancyNerd92 said:

This movie, it's chosen randomly and played on VLC on my Server. It's not Samsung's problem... I have 200+ movies with DTS-MA, TRUE-HD 7.1 etc. so many of them they don't have ac3, and even they have it's the version with commendatory. Also, i prefer 1500 kbps than 640kbps.

My answer is why Emby Server it doesn't give me the options for Hardware Acceleration for Audio as it does for Video? I want my server to do the job and not my TV. I don't want to buy 4 Nvidia Shield for my TVs, after all i gave thousands euro for my Smart TVs what's the point to buy another device to make them smart?

I want a program for Windows that it can handle the convertion from DTS-HD, TRUE-HD etc to E-AC-3 and i can't find on the web. Only for AC3. I don't want so big downgrade to my audio. Movies aren't only Video but Audio too. With TRUE-HD 7.1 the server can handle it better. Also why i got a Faild after 10%-20%when I'm trying to convert the movies with Emby Server?

That i realy want is to do the job the Emby Server and not my TVs. How can I do it that?

Smart TV's are designed to stream 4K Media at low 'streaming' bitrates and play non HD Audio (EAC3)

If you want to play UHD Remux's with HD Audio - you need to either play them in a UHD Hardware Blu-ray Player, or use a streaming client capable of playing them.

Yes you can convert the HD Audio to EAC3, but during the conversion process will lose quality/Atmos/channels.

The batch script above looks like it came from me originally but modified for EAC3 - so I'm not 100% if EAC3 works ok in ffmpeg at the chosen bitrate.  The bitrate should probably be reduced anyway as it's 5.1, not 7.1 and EAC3 has a better compression ratio than AC3.  ie a 640K EAC3 track will sound 'better' than a 640K AC3 track converted from the same source, but unless you are using top end AVR and speakers, I highly suspect you would not be able to tell the difference.

Once the script is in a .bat file - then just use a command prompt to run it - if you called the file 'myfile.bat' - then just type 'myfile' and hit enter.

Have a play with just the single version first, then once it does what you want - then move that config into the recursive version which then converts all the files and adds the EAC3 track.

There is unfortunately no magic solution here - emby will convert on the fly to AC3, but to Direct Play - you need to modify the source files.

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

FrostByte

Yes, this is rbjtech's script modified.  I did use it on a folder with two subfolders with movies and it seemed to work, and the output play fine for me.

If this is the original FGT release though you will still need to remove all the unused subtitles.  Samsung TVs do not like that many tracks.

I still think you will be happier with a Shield :)

  • Like 2
Link to comment
Share on other sites

FancyNerd92

I did the transcode with the script and it plays well as E-AC-3 in my TV with direct play, but why i have another 2 display resolutions? How can i transcode without them because I need to open them MKV Toolnet for each movie and for the quantity that I have it's a bit tricky.

Link to comment
Share on other sites

rbjtech
26 minutes ago, FancyNerd92 said:

I did the transcode with the script and it plays well as E-AC-3 in my TV with direct play, but why i have another 2 display resolutions? How can i transcode without them because I need to open them MKV Toolnet for each movie and for the quantity that I have it's a bit tricky.

Assuming you ran the script above - it creates a COPY of the original file - it does not delete the original file.  Due to it being the same file name but with an extra -EAC3 part - emby has correctly considered it a 2nd copy of the same item. (ie multi-version). 

If you are happy with the script (as a test) then you have the option to remove the 'rem' (remark) from the script below which then deletes the original file as it goes.

However - My strong advice here is to ensure the conversions work BEFORE doing this.

Thus, I have added a quick log which keeps a record of all the files it has processed (eac3.txt) - once you are happy all the new EAC3 files work ok - THEN we can use this log file to batch delete all the original copies.  or of course you can delete them manually yourself ;)

@echo off
FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (
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 eac3 -b:a 1536k -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-EAC3.mkv"
echo "%%x" >> eac3.txt
rem del /q "%%~dx%%~px%%~nx.mkv"
)

 

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

FancyNerd92

The problem is not in the Emby, is in the file. When i open with MKVToolnet and compare the original and the transcoded files i see on the 2nd the 4K resolution and 2 another resolutions as MEDIA for ex. 1600x800 900x400. How can i avoid this? Not in Emby, but inside the MKV.

Link to comment
Share on other sites

rbjtech
10 hours ago, FancyNerd92 said:

The problem is not in the Emby, is in the file. When i open with MKVToolnet and compare the original and the transcoded files i see on the 2nd the 4K resolution and 2 another resolutions as MEDIA for ex. 1600x800 900x400. How can i avoid this? Not in Emby, but inside the MKV.

Can you provide an example MediaInfo to show the tracks ?

If there are other Video streams in the file - then these cannot currently be used by Emby at this time - but unless they are Dolby Vision tracks, which are usually 1080p resolution - I'm not 100% sure what they are.   The scripts above only deal with Audio Tracks, they have nothing to do with Video.

Link to comment
Share on other sites

FancyNerd92

Here are side by side. The red marks shows on the right the other videos and I want to ask you why i have so low bitrates on E-AC-3. I read https://www.videoconverterfactory.com/tips/eac3.html the E-AC-3 top bitrates are 6144 kbit/s so why from a source of more than 1.536kb/s i take only this?

1626242959_Screenshot2022-04-08113455.thumb.jpg.b9ddd06b620bb031fed2940492b028f7.jpg

 

Also on the transcoded file I see that I have E-AC-3 x2 times and they looks identical I'm i right?

970532926_Screenshot2022-04-08114028.thumb.jpg.e3adaf5ff4984e12ac0dba2f82ab20d9.jpg

 

I aks these because if there are files in the new transcoded movie that I don't need them, I want to delete theme for saving space because of the numbers of movies that I store in my disks.

Edited by FancyNerd92
Link to comment
Share on other sites

rbjtech

Those extra streams are just MJPEG, which are actually just images (jpg's) - posters etc - you can safely delete those and the remux using the script will remove them anyway as we have not asked to copy them.  They take a tiny amount of space - the same as a normal poster.jpg. 

Yes that track has two -EAC3's as you probably ran the script on the same file twice - each time you run the script, it will ADD another EAC3 track from the 1st Audio track.  So if you ran it again on this file, it would have 3 EAC3 tracks ;)  Just delete the EAC3 file and re-convert from the original as each generation of conversion from the eac3 copy (as that is now the first track) will reduce the quality.

EAC3 is lossy Audio, ie compressed and only has 5.1 channels - so 1536k is MORE than sufficient.   You can go more if you like (just change the -b:a 1536k in the script to what you like, but it will be a waste of storage as you will not be able to tell the difference - infact, personally I would lower to 768k as e-ac3 compression is far better than ac3 - thus you do not need 1536.. but your call.

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

  • 1 month later...
FancyNerd92
On 07/04/2022 at 18:05, rbjtech said:

Assuming you ran the script above - it creates a COPY of the original file - it does not delete the original file.  Due to it being the same file name but with an extra -EAC3 part - emby has correctly considered it a 2nd copy of the same item. (ie multi-version). 

If you are happy with the script (as a test) then you have the option to remove the 'rem' (remark) from the script below which then deletes the original file as it goes.

However - My strong advice here is to ensure the conversions work BEFORE doing this.

Thus, I have added a quick log which keeps a record of all the files it has processed (eac3.txt) - once you are happy all the new EAC3 files work ok - THEN we can use this log file to batch delete all the original copies.  or of course you can delete them manually yourself ;)

@echo off
FOR /F "delims=" %%x in ('dir /a-s /b /s *.mkv') DO (
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 eac3 -b:a 1536k -disposition:a:0 default -disposition:a:1 0 -f matroska "%%~dx%%~px%%~nx-EAC3.mkv"
echo "%%x" >> eac3.txt
rem del /q "%%~dx%%~px%%~nx.mkv"
)

 

Your code work perfectly but is there a way to keep the subs inside the movie because they lost all of them. Thanks!

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...