How do I open flac files longer than 3h12m so that they work in Ardour? When I try it in 8.10.0 (linux) there’s only audio up to 3h12m and after that it’s silent and no waveform is drawn. Opening the same file in audacity works fine. Converting the file to wav and then opening it in Ardour seems to also work fine.
That is not a known issue so far.
If this was a stereo 16bit wav file at 48kHz:
(3 * 60 + 12) * 60 sec * 48000 samples/sec * 2 channels * 2 bytes / channel > 2^31 bytes
This can cause issue with standard wave files (w64 is fine).
All audio file I/O in ardour happens via libsndfile, so chances are that the version used to decode FLAC has issues with long files.
Are you using the official binary, or a distro provided version?
How large is the .flac file (in MB)? Can you share it to test/debug?
I just generated me a 3h20min flac file with a 1kHz sine wave:
sox -r 48000 -c 2 -n /tmp/sine.flac synth 12000 sine 1000 gain -18
That plays just fine after 3:12:00 (I tested official binary 8.10 and local git/master build on debian):
So there must be more to it. Maybe something specific to your file?
Thanks for checking! Wav files in audacity start to have problems around 6:12:45 (both 16bit and 24bit, probably because audacity works with them as 32 bit floats). I tried your sox sine file generation and it gets opened in Ardour fine, however when I try synth 33000
instead of synth 12000
the resulting file opened in Ardour stops showing a waveform around 2:57:10, also the sound stops after that. Opening and playing in audacity works. (Same if it’s 1 channel only). So I tried looking for the shortest file that starts having this problem
sox -r 48000 -c 1 -n sine_c1_22369.6213 synth 22369.6213 sine 1000 gain -18
loads fine,
sox -r 48000 -c 1 -n sine_c1_22369.6214 synth 22369.6214 sine 1000 gain -18
loads incorrectly
I assume you meant sine_c1_22369.6214.flac
. And that also load and plays fine here in Ardour 8.10.0 (Linux / Intel 64bit). It takes about 20 sec for the waveform to show up though.
Are you running Ardour from Download Ardour | Ardour Community?
ah right, .flac sorry.
Yes I downloaded it directly from ardour.org
I tried opening the file and waiting, but nothing changed and it’s still not playing beyond a certain time.
Could this have something to do with the ulimit -l returning 8200792? I tried this, but it didn’t help
No, That specifies the max amount of locked memory. If Ardour would require more memory that might be swapped out to disk, which will cause dropouts during playback.
–
Ardour does not load the complete file into memory, but only buffers 10 sec chunks.
Here the session with sine_c1_22369.6214.flac
requires 298 MB of RAM.
Ah. Can you check Session > Properties > Media
Are you perhaps using 4GB limited WAV:
If so change it to “RF64 (WAV compatible)”.
–
Alternatively you can try to just reference the FLAC file (don’t copy it into the session - option on the import dialog).
This was the problem! Thanks! Changing it to “RF64 (WAV compatible)” solved the issue. I wonder why is this the default setting and why doesn’t it show any warning when opening larger files? What would happen if instead of opening a file I was recording for more than 7 hours?
Also when I open a new session the old setting is there again. Is there any way of setting it permanently?
Well, you could use sndfile-salvage(1) — Arch manual pages
Session > Properties > Misc … has some option to save defaults for new sessions.
thanks, this worked!