Can't handle WAVE64 well (enough)


I have this AviSynth script:

LoadPlugin("C:\Program Files (x86)\MeGUI\tools\dgindexnv\DGDecodeNV.dll")
LoadPlugin("C:\Program Files (x86)\MeGUI\tools\avisynth_plugin\NicAudio.dll")

PT1_v = DGSource("E:\LOTR1_PT1\00000.track_4113.dgi",fieldop=0).Crop(0,140,0,-140).ConvertToYV12()
PT1_a = RaWavSource("E:\LOTR1_PT1\00000.track_4352.w64", 4)

PT2_v = DGSource("E:\LOTR1_PT2\00013.track_4113.dgi",fieldop=0).Crop(0,140,0,-140).ConvertToYV12()
PT2_a = RaWavSource("E:\LOTR1_PT2\00013.track_4352.w64", 4)


PT1 = AudioDub(PT1_v,PT1_a).Trim(0,151968)

PT2 = AudioDub(PT2_v,PT2_a).Trim(48,0)

SEE = UnalignedSplice(PT1,PT2)

return SEE
The above script is for the english audio. I also have one for the german one (slightly different filenames).
The result for the english audio is that AviSynth removes the original audio and inserts silence beginning at ~2:37:10.843 until the end so starting somewhere in the middle of PT2.
The result for the german audio is that there is silence until 1:45:38.331 (= the whole PT1 is silent) and then the whole PT2 is fine.

I also have tried AlignedSplice and got different results (but still missing audio). I also tried Trim(x,x,false) but that just removed the parts that were silent in the above encodes from the resulting files.

I manually checked the source w64 files in WMP12 and Audacity and there is audio from the beginning to the end and the length are fine too.

The w64 sources were re-encoded from DTS-HD Master with eac3to and in AviSynth (MeGUI) I've chosen FLAC as output and NicAudio as Decoder.

I found out the problem is NicAudio. The file sizes are as follows:

E:\LOTR1_PT1\00000.track_4352.w64 = 6.393.074.816 Bytes
E:\LOTR1_PT2\00013.track_4352.w64 = 7.414.192.256 Bytes

E:\LOTR1_PT1\00000.track_4353.w64 = Bytes
E:\LOTR1_PT2\00013.track_4353.w64 = 4.942.794.880 Bytes

English audio:
  • TOP LEFT: RaWavSource("E:\LOTR1_PT1\00000.track_4352.w64", 4)
  • TOP RIGHT: RaWavSource("E:\LOTR1_PT2\00013.track_4352.w64", 4)
  • BOTTOM LEFT: LWLibavAudioSource("E:\LOTR1_PT1\00000.track_4352.w64",cache=false)
  • BOTTOM RIGHT: LWLibavAudioSource("E:\LOTR1_PT2\00013.track_4352.w64")

German audio:
  • TOP LEFT: RaWavSource("E:\LOTR1_PT1\00000.track_4353.w64", 4)
  • TOP RIGHT: RaWavSource("E:\LOTR1_PT2\00013.track_4353.w64", 4)
  • BOTTOM LEFT: LWLibavAudioSource("E:\LOTR1_PT1\00000.track_4353.w64")
  • BOTTOM RIGHT: LWLibavAudioSource("E:\LOTR1_PT2\00013.track_4353.w64")

I'll keep all the files for at least one week so if you want me to test something just reply :)