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

Reply
 
Thread Tools Search this Thread Display Modes
Old 24th August 2021, 23:47   #15101  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,264
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   Reply With Quote
Old 25th August 2021, 22:46   #15102  |  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   Reply With Quote
Old 25th August 2021, 23:30   #15103  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
it might have been discussed here already, i would guess, but i only found little information about it:

when i demux a normal .dts file (in this case a 320kbps 2.0 dts track) eac3to says: patching dts to 24 bits.
mediainfo tells me the dts track inside m2ts file is 16 bit, there is a switch: -dontpatchdts - if I use it i get a file of the same size (down to the last byte). However on a wiki i read that -dontpatchdts switch applies a dither.

will this switch really apply a dithering to a normal .dts file?
and is the patching to 24 bit change anything else than a metaflag change somewhere inside the dts file?

as far as i have understand it, lossy audio usually dont have a bit depth at all, but for some reason a dts file has a flag, to be able to be copied to an audio disc, as there are also some dts audio tracks and it seems to be mandatory to have that flag on a audio disc.

actually i would like to keep the 16 bit flag, even if it doesnt change anything, that 24 bit however would just be pointless if i can demux it without that 24 bit patching, and without damaging the file of course (which would be the case with dithering in same way). As this whole patching thing amplifies the uselessness of that information, i think.

But for dithering i would expect that eac3to needs to reencode the file, but with the -dontpatchdts switch, eac3to just says extracing track. it takes the same time too (almost, 2secs more 9m 24s vs 9min 26s, but i doubt that the 2 secs are enough to reencode and dther), so i would strongly guess that dither only is applied to lossless dts-hd when decoing to wav or flac or that the information on the wiki is misleading,

so my final question is: is it save to use the -dontpatchdts switch to keep the (useless) bit flag as it is?

I would guess yes, but maybe someone here can give me more information, so that i feel more satisfied doing it
Etroxamin is offline   Reply With Quote
Old 26th August 2021, 00:08   #15104  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 435
Quote:
Originally Posted by Etroxamin View Post
However on a wiki i read that -dontpatchdts switch applies a dither.
will this switch really apply a dithering to a normal .dts file?
No, and if it's this wiki, it doesn't claim that standard DTS files will be dithered when that switch is used.
Quote:
Originally Posted by Etroxamin View Post
and is the patching to 24 bit change anything else than a metaflag change somewhere inside the dts file?
No. It's just metadata.
Quote:
Originally Posted by Etroxamin View Post
as far as i have understand it, lossy audio usually dont have a bit depth at all,
Correct.
Quote:
Originally Posted by Etroxamin View Post
so my final question is: is it save to use the -dontpatchdts switch to keep the (useless) bit flag as it is?
Yes.
Richard1485 is offline   Reply With Quote
Old 26th August 2021, 01:52   #15105  |  Link
Etroxamin
Registered User
 
Join Date: Jul 2021
Location: Bremen, Germany
Posts: 36
Quote:
Originally Posted by Richard1485 View Post
No, and if it's this wiki, it doesn't claim that standard DTS files will be dithered when that switch is used.

No. It's just metadata.

Correct.

Yes.
Great

thank you very much for your answer.

Btw, no that wasn't the wiki where i have read this, it was here:

https://en.wikibooks.org/wiki/Eac3to/How_to_Use

(this seems to be the same, but with a very slightly different url)

but after rechecking the information there, it actually really just seems to be DTS-HD, but i somehow ignored that and thought this can happen to any DTS track ... wellm thanks again for clarification

Last edited by Etroxamin; 26th August 2021 at 01:56.
Etroxamin is offline   Reply With Quote
Old 26th August 2021, 03:05   #15106  |  Link
Pochka
Registered User
 
Join Date: Aug 2021
Posts: 4
Thank you tebasuna51 and Etroxamin
Pochka is offline   Reply With Quote
Old 26th August 2021, 10:09   #15107  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,264
Quote:
Originally Posted by Etroxamin View Post
Btw, no that wasn't the wiki where i have read this, it was here:

https://en.wikibooks.org/wiki/Eac3to/How_to_Use

(this seems to be the same, but with a very slightly different url)
Both are out of date concerning to DTS-HD decoder, in the changelog:

Quote:
v3.30 (2015)
* libDcaDec is now default for all DTS tracks except XSA / low bitrate
libdcadec.dll is included in eac3to package, and can decode bit exact DTS-MA (unique DTS with util metadata 'Source PCM Resolution': 16 or 24).

Some old DTS standard encoders (Surcode) put always Source PCM Resolution to 24 even with PCM 16 bits sources, then that metadata is useless and maybe false.

Now a updated version (suport for DTS Express and other improvments) of libdcadec is included in ffmpeg (not included in 2015 libav dll's in eac3to)
__________________
BeHappy, AviSynth audio transcoder.
tebasuna51 is offline   Reply With Quote
Old 20th September 2021, 05:32   #15108  |  Link
Sakura-chan
Registered User
 
Join Date: Sep 2010
Posts: 30
Quote:
Originally Posted by tebasuna51 View Post
Just add the inverse delay, for instance:


or
I know this is long overdue, but thanks. Yeah, I figured the only way was to add the inverse delay.

Quote:
Originally Posted by Asmodian View Post
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?
Generally the delay it's correct, but I had a couple of discs that had some random delay set that was wrong. If I let eac3to process the delay I ended up with out of sync audio. You just had to ignore the delay, the track was perfectly in sync. Curiously mkvmerge seemed to ignore the delay and the remuxed file was in sync. But I needed eac3to as I use it to convert lpcm to flac from source, without extracting/remuxing first. So far I haven't encountered more discs with wrong delays.



Now, something I really can't figure out and has bothered me for a while.

When processing a bluray playlist eac3to likes to label the chapters as the first track, so chapters is 1, video is 2, first audio track is 3 and so on. When processing any other file type 1 is the video, 2 is audio. Why chapters in playlists are always first I do not know. Most sensible thing I think would be to put them at the end (since the chapters are arguably the least important "track") or to make it more batch friendly have a non-number to them. Like:

Code:
1: h264/AVC, 1080p24 /1.001 (16:9)
2: DTS Master Audio, German, 2.0 channels, 24 bits, 48kHz
   (core: DTS, 2.0 channels, 1509kbps, 48kHz)
3: DTS Master Audio, English, 2.0 channels, 16 bits, 48kHz
   (core: DTS, 2.0 channels, 1509kbps, 48kHz)
4: Subtitle (PGS), German
5: Subtitle (PGS), English
C: Chapters, 12 chapters
Anyway, those damn chapters mess up by batches when extracting from a mix of mpls and m2ts sources. I have the list of files and the tracks I need but then I have to manually search the batch offsetting the mpls track numbers and it's a pain in the ass.

Is there a way to leave out chapters from the track list?

I'm trying ffmpeg, it ignores chapters completely, video always falls on 1, audio on 2 and so on, easy to batch. Still, I'm unsure whether ffmpeg supports seamless branching (have yet to try) and has some not-very-nice looking warnings (PES packet size mismatch and packet corrupt on DTS tracks), when eac3to processes the playlist without a hitch.

Last edited by Sakura-chan; 20th September 2021 at 05:36.
Sakura-chan is offline   Reply With Quote
Old 21st September 2021, 22:50   #15109  |  Link
Richard1485
AviSynth monkey
 
Richard1485's Avatar
 
Join Date: Feb 2010
Posts: 435
AFAIK, ffmpeg still lacks support for seamless-branching discs. The quirk with eac3to's track order does present problems on occasion. Unless there's an undocumented switch somewhere that locks onto the first video track (like the -demux switch does), there probably isn't a ready-made solution. Maybe you could write a batch script with a conditional that handles files differently based on extension.

Last edited by Richard1485; 21st September 2021 at 23:12.
Richard1485 is offline   Reply With Quote
Old 24th September 2021, 00:18   #15110  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,285
Quote:
Originally Posted by Richard1485 View Post
Maybe you could write a batch script with a conditional that handles files differently based on extension.
Parsing EAC3TO cmd output is weird, but it does work. I did one in Python.
__________________
madVR options explained
Asmodian is offline   Reply With Quote
Old 27th September 2021, 12:15   #15111  |  Link
AnimeN
Registered User
 
Join Date: Aug 2015
Posts: 3
Hi, anyone could help me? I need to cut .aac file without reencode from time hh:mm:ss to time hh:mm:ss
I don't know how work with edit parameter

Thanks a lot
AnimeN is offline   Reply With Quote
Old 27th September 2021, 14:55   #15112  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,264
You have the answer in the FAQ (convert hh:mm:ss to seconds):

besplit -core( -input in.aac -prefix out -type aac ) -split( s1.m1 s2.m2 )
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 27th September 2021 at 14:57.
tebasuna51 is offline   Reply With Quote
Old 28th September 2021, 12:09   #15113  |  Link
AnimeN
Registered User
 
Join Date: Aug 2015
Posts: 3
Quote:
Originally Posted by tebasuna51 View Post
You have the answer in the FAQ (convert hh:mm:ss to seconds):

besplit -core( -input in.aac -prefix out -type aac ) -split( s1.m1 s2.m2 )
Finally I did with this https://mpesch3.de/
AnimeN is offline   Reply With Quote
Reply

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 17:18.


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