ohio813 / xvid4psp

Automatically exported from code.google.com/p/xvid4psp
GNU General Public License v2.0
0 stars 0 forks source link

Mysterious audio delay with lossy audio when encoding #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

That's something bothering for quite some time, but for unknown reason, 
everytime I do encode with aac/ac3 audio, audio delays appears.
This happens with every xvid4psp version.
So I was wondering if it was a normal behavior or a bug. Audio seems to be in 
sync though.

PS: I would recommend you to have a look at this vsfilter, it's more advanced 
and stable than any other vsfilter. 
http://code.google.com/p/xy-vsfilter/

Original issue reported on code.google.com by Okocha1...@gmail.com on 25 Jun 2012 at 12:46

Attachments:

GoogleCodeExporter commented 9 years ago
Hello. As for delay in MKV:

Delay relative to video                  : 9ms

I believe it's pretty normal (this delay appears due to audio packets lenght or 
something like that), also 9ms - will be unnoticeable, it is less than duration 
of one frame in 25fps video (40ms, and ~42ms for 23.976fps).

As for MP4, there was a bug in MediaInfo: 
http://forum.doom9.org/showthread.php?p=1577792#post1577792 so your version is 
still broken or this bug wasn't properly fixed, or it maybe another bug :).

As for VSFilter - thanks for the info. I can't test it because I don't have a 
subs or files with subs on my PC :) And to be fair, I don't have any interest 
in subs. So.. if it will be added, it will be added untested (at least by me).

Original comment by forc...@gmail.com on 25 Jun 2012 at 6:04

GoogleCodeExporter commented 9 years ago
Damn.. It seems that in some of my .RARs I've put wrong, unfixed MediaInfo from 
10.06.2012. But fixed version - is from 11.06.2012, it can be obtained from 
here: 
http://sourceforge.net/projects/mediainfo/files/development_snapshots/0.7.58%2B/

Original comment by forc...@gmail.com on 25 Jun 2012 at 6:19

GoogleCodeExporter commented 9 years ago
I see, thanks.
So it's a mediainfo bug, it's not fixed yet in the latest version and it's even 
worse as it now shows +83ms delay.

Original comment by Okocha1...@gmail.com on 25 Jun 2012 at 6:38

GoogleCodeExporter commented 9 years ago
And I get 80ms too. But +80ms is much better, than -3min :)

Original comment by forc...@gmail.com on 25 Jun 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Yeah, but still weird.
Also that won't help us to identify videos that really have audio delays from 
those whose just a mediainfo bug.

Original comment by Okocha1...@gmail.com on 26 Jun 2012 at 12:39

GoogleCodeExporter commented 9 years ago
OK, I found the bug.
That bug comes from .m4a, everytime one of those audio files gets muxed into an 
MKV, the result will have a +9ms audio delay.
But if we use .aac audio files instead of .m4a audio files, then there won't be 
any audio delay in the MKV.

So my question is, is it possible to have XVID4PSP encode AAC audio into an 
.aac file instead of .m4a? That would solve every audio delays.

Original comment by Okocha1...@gmail.com on 26 Sep 2012 at 3:00

GoogleCodeExporter commented 9 years ago
neroAacEnc can only encode to m4a; aac - is a RAW stream, and MKVMerge now can 
extract audio delay from mp4 (=m4a) files:

2012-02-06  Moritz Bunkus  <moritz@bunkus.org>

    * mkvmerge: new feature: mkvmerge will parse and apply the audio
    encoder delay in MP4 files that contain said information in the
    format that iTunes writes it. Fix for bug 715.

So I think that this delay is from m4a by neroAacEnc. RAW aac can't hold any 
extra-info - there is no delay. For some strange reasons QAAC not working for 
me anymore so I can't test this encoder. But when encoding in aac@m4a using 
FFmpeg - seems like there is no delay after muxing. And plus I'm not sure that 
this is not MediaInfo bug :)
9ms - it is unnoticeable delay, just ignore it.

Original comment by forc...@gmail.com on 28 Sep 2012 at 10:04