Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > General > Audio encoding

Closed Thread
 
Thread Tools Search this Thread Display Modes
Old 28th June 2021, 09:40   #15081  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Richard1485 View Post
Have you tried -no2ndpass?

You could also try DGDemux. It's now free.

Thx. I'll give these a try.

EDIT: -no2ndpass doesn't even get listed as option, but it did solve the issue for me.
__________________
Gorgeous, delicious, deculture!

Last edited by asarian; 28th June 2021 at 10:03.
asarian is offline  
Old 28th June 2021, 12:29   #15082  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by asarian View Post
EDIT: -no2ndpass doesn't even get listed as option, but it did solve the issue for me.
Great! Yeah, eac3to correctly drops frames in the first pass, but it tends to go wrong in the second pass by dropping frames unnecessarily. These days, I always try -no2ndpass first. For TrueHD, use mlp or CloneBD instead.
 
Old 29th June 2021, 23:02   #15083  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Richard1485 View Post
Great! Yeah, eac3to correctly drops frames in the first pass, but it tends to go wrong in the second pass by dropping frames unnecessarily. These days, I always try -no2ndpass first. For TrueHD, use mlp or CloneBD instead.
MLP worked like a charm! It can't remove dialogue normalization yet, sadly. So, I figured I do a second pass on the newly formed .thd stream then, with eac3to, but then, LOL, eac3to starts complaining about gaps again (which I expected to no longer exist again, btw).
__________________
Gorgeous, delicious, deculture!
asarian is offline  
Old 30th June 2021, 21:12   #15084  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by asarian View Post
So, I figured I do a second pass on the newly formed .thd stream then, with eac3to, but then, LOL, eac3to starts complaining about gaps again (which I expected to no longer exist again, btw).
Given that eac3to has problems with such tracks, I don't know how much credence to attach to that error message. If your track is in sync and plays fine, maybe you can ignore it. My preference with branching discs is to extract the AC-3 track with eac3to (-no2ndpass), so in suggesting mlp/CloneBD, I'm just passing on what's considered best practice.

The only other method known to me to remove dialnorm from TrueHD is to load the MKV or playlist (mpls) into MKVToolNIx, click the audio track, scroll down, and check "Remove dialog normalization gain" under "Audio properties". It works for me. The downside is that the AC-3 "core" will become a separate track, not one that remains interleaved with the TrueHD, which might or might not matter to you when it comes to playback. Perhaps you want to avoid MKV output.
 
Old 30th June 2021, 23:07   #15085  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,462
Quote:
Originally Posted by Richard1485 View Post
Given that eac3to has problems with such tracks, I don't know how much credence to attach to that error message. If your track is in sync and plays fine, maybe you can ignore it. My preference with branching discs is to extract the AC-3 track with eac3to (-no2ndpass), so in suggesting mlp/CloneBD, I'm just passing on what's considered best practice.

The only other method known to me to remove dialnorm from TrueHD is to load the MKV or playlist (mpls) into MKVToolNIx, click the audio track, scroll down, and check "Remove dialog normalization gain" under "Audio properties". It works for me. The downside is that the AC-3 "core" will become a separate track, not one that remains interleaved with the TrueHD, which might or might not matter to you when it comes to playback. Perhaps you want to avoid MKV output.

To start with the latter, I love the MKV container. Or rather, Kodi loves it (it has trouble playing individual UHD .m2ts files properly here, sans stuttering, for some reason, but plays MKV very smoothly).

And I want the HD audio stream, of course. So, I will start just ignoring the gap warnings given by eac3to for the dialogue normalization removal (sorry, can't test now: inthe middle of huge render job).
__________________
Gorgeous, delicious, deculture!
asarian is offline  
Old 1st July 2021, 00:13   #15086  |  Link
Richard1485
Guest
 
Posts: n/a
Quote:
Originally Posted by asarian View Post
And I want the HD audio stream, of course.
Of course! What I was explaining is that if you use MKVToolNIx to remove the dialnorm from the TrueHD, you will end up with a track without an AC-3 "core" (the interleaved track), in other words, a thd track on its own, rather than thd+ac3 (as found on BD), which the eac3to method allows you to keep. But since you are happy with MKV, you can use either method.
 
Old 15th July 2021, 15:05   #15087  |  Link
Tass
Registered User
 
Join Date: Jun 2021
Posts: 2
Quote:
Originally Posted by SeeMoreDigital View Post
Is there any particular reason why you don't want to extract the lossy 5.1 channel DTS (core) stream from the lossless DTS-HD MA stream and play that instead?
Yep, thanks to LG, DTS won't be passthru to my AVR from the TV via optical because for a few years LG TVs stoped DTS compatibilty, so I have no option other than modify my setup or convert to AC3, for now, converting to AC3 is the less hassle since modifying my setup would involve geting a new AVR with eARC and laying new cables INSIDE my walls
Tass is offline  
Old 15th July 2021, 18:31   #15088  |  Link
SeeMoreDigital
Life's clearer in 4K UHD
 
SeeMoreDigital's Avatar
 
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,227
Quote:
Originally Posted by Tass View Post
Yep, thanks to LG, DTS won't be passthru to my AVR from the TV via optical because for a few years LG TVs stoped DTS compatibilty,...
Indeed, LG dropped support for onboard DTS decoding and pass-through, from 2020 onwards...
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
SeeMoreDigital is offline  
Old 24th July 2021, 04:37   #15089  |  Link
Sakura-chan
Registered User
 
Join Date: Sep 2010
Posts: 34
Is there any way to ignore the delay when extracting/re-encoding? Currently when eac3to detects a delay it automatically applies it to the extracted files with no way to ignore it. I see no switch to extract/re-encode as is. Like an -ignoredelay switch or something.
Sakura-chan is offline  
Old 24th July 2021, 10:02   #15090  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Just add the inverse delay, for instance:
Quote:
eac3to "test(+300).mkv" 2: "test(+300).mkv_2eng.ac3" -300ms
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 0:00:22, 25p
1: h264/AVC, English, 720p25
2: AC3 Surround, English, 2.0 channels, 448kbps, 48kHz, 300ms
[a02] Extracting audio track number 2...
[a02] Creating file "D:\Temp\t\00_test (+300).mkv_2eng.ac3"....
or

Quote:
eac3to "test(-80).mkv" 2: "test(-80).mkv_2eng.ac3" +80ms
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 0:00:22, 25p
1: h264/AVC, English, 720p25
2: AC3 Surround, English, 2.0 channels, 448kbps, 48kHz, -80ms
[a02] Extracting audio track number 2...
[a02] Creating file "D:\Temp\t\00_test (2).mkv_2eng.ac3"...
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 26th July 2021, 00:04   #15091  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
Why would you want to ignore delay? It is a flag telling all players to add/subtract that much audio before playing, so unless it is normally out of sync, what is the use case for ignoring that field? Is it that the flag smaller than Xms of silence and you will reapply it when muxing?

Maybe some other reason I haven't thought of?
__________________
madVR options explained
Asmodian is offline  
Old 17th August 2021, 01:05   #15092  |  Link
Pochka
Registered User
 
Join Date: Aug 2021
Posts: 4
Hi guys, i'm new here, asking for help, does eac3to supports .mka audio file? I have a audio file for video 25 Framerate .mka, which I need to recode into same as .mka audio file but in 23.976fps and keep all original bit rate and sampling rate and channels. I use command eac3to [input.mka] [output.mka] -24.000 -changeTo23.976 but I get an error. I'm a wrong entering the command line?
Pochka is offline  
Old 17th August 2021, 08:37   #15093  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Show the full log to know the audio inside the .mka file.

If is something like:

MKA, 1 audio track...
1: AC3, 5.1 channels, 448kbps, 48kHz

eac3to input.mka 1: output.ac3 -25.000 -changeTo23.976

(25 or 24 input?)

eac3to need the output bitrate and code, if supported.
Here for ac3 the bitrate 448 is the default, not the read in the input file than must be decoded to perform the timestretch.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 22nd August 2021, 00:53   #15094  |  Link
Pochka
Registered User
 
Join Date: Aug 2021
Posts: 4
to tebasuna51 Here is log to know the audio .mka file it's 25fps audio and i need change to 23.976fps what is eac3to command for it?

Audio
ID : 1
Format : E-AC-3
Format/Info : Enhanced AC-3
Commercial name : Dolby Digital Plus
Codec ID : A_EAC3
Duration : 59 min 34 s
Bit rate mode : Constant
Bit rate : 320 kb/s
Channel(s) : 6 channels
Channel layout : L R C LFE Ls Rs
Sampling rate : 48.0 kHz
Frame rate : 31.250 FPS (1536 SPF)
Compression mode : Lossy
Stream size : 136 MiB (100%)

Last edited by Pochka; 22nd August 2021 at 04:30.
Pochka is offline  
Old 22nd August 2021, 10:38   #15095  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Sorry but eac3to only can decode eac3 from EVO container, and can't encode to eac3.
You must use ffmpeg instead, with two options:

1) Like eac3to do, changing the pitch of the audio (maybe recovering the original pitch):

ffmpeg -i "eac3.mka" -af "aresample=50050, asetrate=48000" -acodec eac3 -ab 320k "eac3_r.eac3"

2) Or preserving the pitch of the audio, changing only duration:

ffmpeg -i "eac3.mka" -af "atempo=0.959041" -acodec eac3 -ab 320k "eac3_t.eac3"
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 24th August 2021, 07:02   #15096  |  Link
Pochka
Registered User
 
Join Date: Aug 2021
Posts: 4
То tebasuna51 thank you for help and command line, i will try sometime in ffmpeg. I don't understand where can i learn command line for eac3to or ffmpeg? I don't understand what mean is (-af -ab all this numbers 0.959041 and they can be different for other things.
Pochka is offline  
Old 24th August 2021, 13:46   #15097  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
@Pochka - you should find out if your audio has the correct pitch as it is now, sometimes audio on 25 fps video, have the correct pitch, but it's more likely that it was recorded at 23,976 fps or 24 and has the wrong pitch.

Btw 320 kbps seems quite low bitrate, evtl. you can find a better audio source ...

however changing the pitch after slowing down the audio, usually doesnt sound great, there are expensive programms (and you may find some sort of "trail versions") giving slightly more acceptable results, but as you said:

"I need to recode into same as .mka audio file but in 23.976fps and keep all original bit rate and sampling rate and channels"

with some luck your audio may have the correct pitch, and you could stretch the audio in MKVToolNix instead. At least i know it is possible with ac3 files (I would guess e-ac3 too), i once added the PAL DVD audio of a movie to a bluray video source, the pitch was correct on DVD with 25 fps. I tried the MKVToolNix stretch and the quality was (imo) as good as on DVD (but well that was a movie from the 50s, so the audio quality wasnt the best to judge on this).

The good thing is you dont have to reencode, as lossy to lossy isnt the best thing you can do to audio files. I usually keep 25 fps ac3 audio, stretched with audacity or eac3to to 23,976 as lossless 24 bit, thats quite pointless but actually the only way to not lose more quality.
Etroxamin is offline  
Old 24th August 2021, 14:08   #15098  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
Quote:
Originally Posted by Pochka View Post
То tebasuna51 thank you for help and command line, i will try sometime in ffmpeg. I don't understand where can i learn command line for eac3to or ffmpeg? I don't understand what mean is (-af -ab all this numbers 0.959041 and they can be different for other things.
you should first add a path to cmd, here is a guide for it:

https://www.howtogeek.com/118594/how...d-line-access/

you find cmd.exe in C:\Windows\System32

all you need to do then is starting cmd.exe and write:

eac3to

eac3to will output a list of commands to use, usually you define your source, like:

eac3to "C:\myfilesfolder\myfile.mka"

and then you can put the command behind, you can also join files like "file1"+"file2"

or even cut or fill audio within a track with -edit command. Best to try out a bit for yourself.

But if you just want to stretch the e-ac3 file, i think you can easily do it with mkvtoolnix gui, but tbh its been some time since i made that, guess you would need to add the number tebasuna51 mentioned (0.959041).

thats the slowdown in percent, to reach 23,976 fps, like 1.000000 is your current 25 fps, 0.959041 would be the tempo in percent to slowdown for your desired 23,976 fps.
Etroxamin is offline  
Old 24th August 2021, 23:47   #15099  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,914
Quote:
Originally Posted by Pochka View Post
I don't understand where can i learn command line for eac3to or ffmpeg?
If you have problems with command line try my GUI UsEac3to to execute eac3to or ffmpeg. There are some help with eac3to parameters.

Quote:
I don't understand what mean is (-af -ab all this numbers 0.959041 and they can be different for other things.
ffmpeg have many parameters (-af means Audio Filter, -ab Audio Bitrate).
https://ffmpeg.org/ffmpeg-filters.html
https://ffmpeg.org/ffmpeg-codecs.html

For atempo, for instance, the number is the cocient between the fps desired and the fps original:

(24/1.001)/25 = 0.959041

@Etroxamin
Thanks for your opinions. Only one thing:

I can't recommend the timestretching method used by MkvToolNix, is based in add timestamps to the audio track, and some frames can be ignored with problems inicializing correctly the decoder, and producing cliks.

The best option is always modify the video fps to obtain the same duration than the audio.
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline  
Old 25th August 2021, 22:46   #15100  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
Quote:
Originally Posted by tebasuna51 View Post

I can't recommend the timestretching method used by MkvToolNix, is based in add timestamps to the audio track, and some frames can be ignored with problems inicializing correctly the decoder, and producing cliks.

The best option is always modify the video fps to obtain the same duration than the audio.
I think MKVToolNix also says it is not recommended
(well i know MKVToolNix warned me, not sure if it still does)

But i tried it anyway, imo it will sound better than applying a pitch correction, but it may change from case to case. I think the audio track that i used there was already pitch corrected. So the only other possebility i had, was to stretch with eac3to, then apply ANOTHER pitch corrections and keep a crapier sound lossless 24 bit or encode lossy again.

So that would be:

2x pitch correction + 2 lossy encode
vs
1x pitch correction + 1 lossy encode

i think its not wrong to say that this method can be useful, at least sometimes, but well, in such a case its of course better to compare the results.

Also this method doesn't change the file at all, even if you notice very minor problems later you could still just demux it and it is the file you started with as it was from the source.

Changing the video fps would be a better workaround, but not if you add additional audio tracks that are more or at least of the same importance, and are matching with 23,976 fps.

the MKV stretch is working, even if its not recommended, it could be the best choice in certain situations and as said is completely reverseable, so there is nothing to lose by giving it a try. At least if it fits for a certain situation.
Etroxamin is offline  
Closed Thread

Tags
eac3to

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:37.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.