EAC3TO - MP4 and 3.52 removing the gaps from audio

eac3to forked from madshi eac3to 3.36
Post Reply
DAE avatar
rgr
Ghost
Posts: 8
Joined: Wed Oct 23, 2024 5:15 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by rgr »

I remove audio gaps with EAC3TO by first converting mp4 to mkv (ffmpeg -c copy) and then running EAC3TO.

I have 2 difficulties :)

1. I need to convert MP4 to MKV first -- is there a way to avoid the conversion to MKV step?

Code: Select all

eac3to.exe "VFR.mp4"
Running in fast mode
Keeping dialnorm
The format of the source file could not be detected.
2. Version 3.52 gives me this message:

MKV, 1 video track, 1 audio track, 4:06:24, 49.998p
1: h265/HEVC, 576p50 (15:11)
2: AAC, 2.0 channels, 48kHz, dialnorm: 0dB
[v01] The video bitstream framerate field doesn't match the container framerate. <WARNING>
Track 2 is used for destination file "out.wav".
[a02] Extracting audio track number 2... [a02] Decoding with DirectShow (Nero Audio Decoder 2)... [a02] Getting "Nero Audio Decoder 2" instance failed. <ERROR> Aborted at file position 3932160. <ERROR>

But I downloaded the older version 3.36 and it works fine.

MKV, 1 video track, 1 audio track, 4:06:24, 49.998p 1: h265/HEVC, 576p50 (15:11) 2: AAC, 2.0 channels, 48kHz v01 The video bitstream framerate field doesn't match the container framerate.
a02 Extracting audio track number 2... a02 Creating file "out.aac"... a02 Audio has a gap of 5ms at playtime 0:02:55.
a02 Audio has a gap of 5ms at playtime 0:05:03.
a02 Audio has a gap of 5ms at playtime 0:09:10.
a02 Audio has a gap of 6ms at playtime 0:14:42.
a02 Audio has a gap of 5ms at playtime 0:19:30.
a02 Audio has a gap of 6ms at playtime 0:24:23.
a02 Audio has a gap of 5ms at playtime 0:29:35.
a02 Audio has a gap of 5ms at playtime 0:33:36.
a02 Audio has a gap of 6ms at playtime 0:39:01.
a02 Audio has a gap of 5ms at playtime 0:42:43.
[...]

Is this a bug in a version 3.52?
User avatar
Curly
Posts: 819
Joined: Sun Mar 15, 2020 11:05 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by Curly »

Welcome to the forum, rgr!

I've been following the issue at doom9 and honestly there is a lot of disinformation and wrong assumptions being made. I won't start an analysis from other people's false starts. So, if you want my help with this you will have to be willing to share the original MP4 with me under fair use. I can send you my FTP by PM if you want to do that.
Curly Howard
Director of EAC3TO Development
DAE avatar
rgr
Ghost
Posts: 8
Joined: Wed Oct 23, 2024 5:15 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by rgr »

Ok. I don't have that file anymore, but the problem affects every one of my recorders, so I can send any one.
The files are large -- 10GB and more.
User avatar
Curly
Posts: 819
Joined: Sun Mar 15, 2020 11:05 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by Curly »

10 GB is no problem. So you have an issue with your chain. I'll try to help you with it. Sending you FTP details...
Curly Howard
Director of EAC3TO Development
User avatar
Curly
Posts: 819
Joined: Sun Mar 15, 2020 11:05 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by Curly »

That clip you gave me is not great for assessing AV sync. It is a hodge-podge collection of spliced things, with starting and stopping of a VCR, jumps between personal recordings and recordings of TV shows, etc. While I can see the MP4 timestamps and conclude that your capture device simply cannot keep up with the data (on both audio and video), thereby creating pseudo-VFR, I cannot assess possible ways to correct that due to the inadequacy of the clip. I need a clean clip with a single uninterrupted, non-spliced capture of a single source with content adequate to assess sync. That means talking, gunshots, etc. Shots of people swimming, etc., have no events allowing sync determination. I can't do more without a proper clip to analyze.

I will say that your capture device is horribly bad and you would be much better advised to ditch it and get a better device and associated software. It simply cannot keep up with even modest data rates.

I did try a heuristic fix for your clip. I assumed that the missed data is equally distributed throughout the clip (false but not too far off) and then calculated a proper audio time stretch to align the audio and video durations, then coupled that with an empirically determined audio delay. The result is reasonable sync throughout the clip, as best that could be assessed, given the crappy clip. Here is the script I used:

loadplugin("dgdecodenv.dll")
loadplugin("lsmashsource.dll")
vid=dgsource("D:\tmp\rgr\538@451785@Hiszpania 1997.dgi") # use 50 fps when indexing
# This audio demuxed by DGIndexNV.
aud=LWLibavAudioSource("D:\tmp\rgr\538@451785@Hiszpania 1997 [2].aac").delayaudio(-0.06)
audiodub(vid,aud)
timestretch(tempo=99.9997249)

You could play around with those numbers and try to do better than I did. But it can't be perfect because the data delays are not evenly distributed. I suppose you could try to individually correct the audio and video by converting the pseudo-VFR to CFR using appropriate tools, e.g., eac3to 3.34 and ffmpeg. But that is crazy and, as I said, get a proper capture solution that can do clean CFR audio and video. Yes, you'll have to spend some $$$. Don't forget the old saying: You can't make a silk purse out of a pig's ear.

There is not a bug per se in eac3to 3.52. This kind of gap correction was intentionally removed (see related threads here). You can use 3.34/3.36 if you find that processing of use to you. And if you need to use eac3to then there is no way to avoid your MP4 -> MKV conversion.

Just out of curiosity, what is your standalone recorder and what are you feeding it with?
Curly Howard
Director of EAC3TO Development
User avatar
Curly
Posts: 819
Joined: Sun Mar 15, 2020 11:05 am

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by Curly »

after i invested 10+ hours into this it sure wud be nice if you could reply
Curly Howard
Director of EAC3TO Development
User avatar
admin
Posts: 4558
Joined: Thu Sep 09, 2010 3:08 pm

EAC3TO - MP4 and 3.52 removing the gaps from audio

Post by admin »

Check our new policy on ghosting/abandonment.
Post Reply