zamaudio / ptformat

Free software file format parser for Avid ProTools sessions
GNU Lesser General Public License v2.1
71 stars 18 forks source link

pt import failure #25

Closed Xansta closed 2 years ago

Xansta commented 2 years ago

Hi,

I am running Ardour 6.8.0 under Lubuntu 18.04 and when I try to import the attached protools file, Ardour crashes. The protools file was created with ProTools version 2021.12. I asked the Ardour folks about it and they directed me here stating that they use your software for ptx import.

Suggestions?

session26Mar2022.zip

zamaudio commented 2 years ago
ProTools 12 Session: Samplerate = 44100Hz
Target samplerate = 48000

24 wavs, 34 regions, 17 active regions

Audio file (WAV#) @ offset, length:
`Drums_01.wav` w(0) @ 0, 1022628
`Guitar 1_01.wav` w(1) @ 0, 1022628
`Bass Guitar_01.wav` w(2) @ 0, 1022628
`Guitar 2_01.wav` w(3) @ 0, 1022628
`aux Guitar2_01.wav` w(4) @ 0, 1022628
`Acoustic_01.wav` w(5) @ 0, 1022628
`Keyboard 1_01.wav` w(6) @ 0, 1022628
`Keyboard 2_01.wav` w(7) @ 0, 1022628
`Keyboard 3_01.wav` w(8) @ 0, 1022628
`Vocal 1_01.wav` w(9) @ 0, 1022628
`Vocal 2_01.wav` w(10) @ 0, 1022628
`Vocal 3_01.wav` w(11) @ 0, 1022628
`Drums_02.wav` w(12) @ 0, 514089180
`Guitar 1_02.wav` w(13) @ 0, 514089180
`Bass Guitar_02.wav` w(14) @ 0, 514089180
`Guitar 2_02.wav` w(15) @ 0, 514089180
`aux Guitar2_02.wav` w(16) @ 0, 514089180
`Acoustic_02.wav` w(17) @ 0, 514089180
`Keyboard 1_02.wav` w(18) @ 0, 514089180
`Keyboard 2_02.wav` w(19) @ 0, 514089180
`Keyboard 3_02.wav` w(20) @ 0, 514089180
`Vocal 1_02.wav` w(21) @ 0, 514089180
`Vocal 2_02.wav` w(22) @ 0, 514089180
`Vocal 3_02.wav` w(23) @ 0, 514089180

Region (Region#) (WAV#) @ into-sample, length:
`Acoustic_01` r(0) w(5) @ 0, 1113064
`Acoustic_02` r(1) w(17) @ 0, 559552896
`Bass Guitar_01` r(2) w(2) @ 0, 1113064
`Bass Guitar_02` r(3) w(14) @ 0, 559552896
`Drums_01.L` r(4) w(0) @ 0, 1113064
`Drums_01.R` r(5) w(0) @ 0, 1113064
`Drums_02.L` r(6) w(12) @ 0, 559552896
`Drums_02.R` r(7) w(12) @ 0, 559552896
`Guitar 1_01.L` r(8) w(1) @ 0, 1113064
`Guitar 1_01.R` r(9) w(1) @ 0, 1113064
`Guitar 1_02.L` r(10) w(13) @ 0, 559552896
`Guitar 1_02.R` r(11) w(13) @ 0, 559552896
`Guitar 2_01` r(12) w(3) @ 0, 1113064
`Guitar 2_02` r(13) w(15) @ 0, 559552896
`Keyboard 1_01` r(14) w(6) @ 0, 1113064
`Keyboard 1_02` r(15) w(18) @ 0, 559552896
`Keyboard 2_01.L` r(16) w(7) @ 0, 1113064
`Keyboard 2_01.R` r(17) w(7) @ 0, 1113064
`Keyboard 2_02.L` r(18) w(19) @ 0, 559552896
`Keyboard 2_02.R` r(19) w(19) @ 0, 559552896
`Keyboard 3_01.L` r(20) w(8) @ 0, 1113064
`Keyboard 3_01.R` r(21) w(8) @ 0, 1113064
`Keyboard 3_02.L` r(22) w(20) @ 0, 559552896
`Keyboard 3_02.R` r(23) w(20) @ 0, 559552896
`Vocal 1_01` r(24) w(9) @ 0, 1113064
`Vocal 1_02` r(25) w(21) @ 0, 559552896
`Vocal 2_01` r(26) w(10) @ 0, 1113064
`Vocal 2_02` r(27) w(22) @ 0, 559552896
`Vocal 3_01` r(28) w(11) @ 0, 1113064
`Vocal 3_02` r(29) w(23) @ 0, 559552896
`aux Guitar2_01.L` r(30) w(4) @ 0, 1113064
`aux Guitar2_01.R` r(31) w(4) @ 0, 1113064
`aux Guitar2_02.L` r(32) w(16) @ 0, 559552896
`aux Guitar2_02.R` r(33) w(16) @ 0, 559552896

MIDI Region (Region#) @ into-sample, length:

Track name (Track#) (Region#) @ Absolute:
`Drums` t(0) r(6) @ 0
`Drums` t(1) r(7) @ 0
`Guitar 1` t(4) r(10) @ 0
`Guitar 1` t(5) r(11) @ 0
`Bass Guitar` t(8) r(3) @ 0
`Guitar 2` t(9) r(13) @ 0
`aux Guitar2` t(10) r(32) @ 0
`aux Guitar2` t(11) r(33) @ 0
`Acoustic` t(12) r(1) @ 0
`Keyboard 1` t(15) r(15) @ 0
`Keyboard 2` t(16) r(18) @ 0
`Keyboard 2` t(17) r(19) @ 0
`Keyboard 3` t(18) r(22) @ 0
`Keyboard 3` t(19) r(23) @ 0
`Vocal 1` t(22) r(25) @ 0
`Vocal 2` t(23) r(27) @ 0
`Vocal 3` t(24) r(29) @ 0

MIDI Track name (MIDITrack#) (MIDIRegion#) @ Absolute:

Track name (Track#) (WAV filename) @ Absolute + Into-sample, Length:
`Drums` t(0) (Drums_02.wav) @ 0 + 0, 559552896
`Drums` t(1) (Drums_02.wav) @ 0 + 0, 559552896
`Guitar 1` t(4) (Guitar 1_02.wav) @ 0 + 0, 559552896
`Guitar 1` t(5) (Guitar 1_02.wav) @ 0 + 0, 559552896
`Bass Guitar` t(8) (Bass Guitar_02.wav) @ 0 + 0, 559552896
`Guitar 2` t(9) (Guitar 2_02.wav) @ 0 + 0, 559552896
`aux Guitar2` t(10) (aux Guitar2_02.wav) @ 0 + 0, 559552896
`aux Guitar2` t(11) (aux Guitar2_02.wav) @ 0 + 0, 559552896
`Acoustic` t(12) (Acoustic_02.wav) @ 0 + 0, 559552896
`Keyboard 1` t(15) (Keyboard 1_02.wav) @ 0 + 0, 559552896
`Keyboard 2` t(16) (Keyboard 2_02.wav) @ 0 + 0, 559552896
`Keyboard 2` t(17) (Keyboard 2_02.wav) @ 0 + 0, 559552896
`Keyboard 3` t(18) (Keyboard 3_02.wav) @ 0 + 0, 559552896
`Keyboard 3` t(19) (Keyboard 3_02.wav) @ 0 + 0, 559552896
`Vocal 1` t(22) (Vocal 1_02.wav) @ 0 + 0, 559552896
`Vocal 2` t(23) (Vocal 2_02.wav) @ 0 + 0, 559552896
`Vocal 3` t(24) (Vocal 3_02.wav) @ 0 + 0, 559552896

Your session seems to be fine according to ptftool. Is it really containing 3 hour clips by the way?

zamaudio commented 2 years ago

Does Ardour really crash, or does the progress bar on the resampling just seem to stop moving? I have a feeling it is still working but taking a very long time to resample your 11GB of audio. Can you confirm?

x42 commented 2 years ago

Looks like the track indices are not consecutive. 0,1,4,5,... 24 for only 17 tracks The Ardour import code expects them to be consecutive

libs/ardour/import_pt.cc:356: void ARDOUR::Session::import_pt_rest(PTFFormat&): Assertion `ntr == nth + 1' fail

So this is an Ardour bug after all.

zamaudio commented 2 years ago

Thanks x42! I haven't finished importing the test session yet, it's still resampling. I would have reached a similar conclusion eventually.

zamaudio commented 2 years ago

As the region to track numbering in ptformat is arbitrary, it makes more sense to change ptformat to number the tracks consecutively. This is now fixed in c1c6475 and pushing a fix to ardour as well to simplify the region to track mappings to not require a lookup table but just use the index.

zamaudio commented 2 years ago

Fixed in Ardour/Ardour@6bbe684304

zamaudio commented 2 years ago

Thank you @Xansta for your bug report!

Xansta commented 2 years ago

I tried several times. Sometimes it was a direct crash, other times, I would wait for a while (several minutes) and finally give up. Yes, the session is three hours long. You're welcome for the bug report. I'm happy to contribute to better software