Audio waveform does not behave correctly during cut operation

Windows 10
Shotcut version 24.01.28

On one of the video files, the display of the audio track behaves very strangely.
It is impossible to mount it. We have to constantly rebuild audio waveform

I tried turning the use higher performance wave form setting on and off but the problem persists.

I also tried turning the waveform display off and on. Moreover, on a file encoded with the same codec, with the same parameters, everything works well.

The problem persists even when working with a proxy of this file.

I forgot to write, I tried to completely reinstall the program, deleting all the settings.

Did you know that is not instant? It takes as long as when a new video is initially added to the Timeline, and that can take a fairly long time depending on the weight and duration of the file. You might not notice this due to the timeline zoom level and you only see a small part of the clip near the beginning. If you still do not understand that, do an experiment:

  1. Start Shotcut
  2. do not open an existing project
  3. add a long video (at least 30 minutes) to the timeline by itself
  4. use Zoom Timeline to Fit (zoom out to see the whole clip)
  5. Rebuild Audio Waveform
  6. watch it draw the waveform slowly by chunk

Also, it may not be obvious when the task is done if it is updating the display of an existing clip near the beginning. Therefore, it may appear to be an instant action. The only way I reproduced the problem shown in your video is by splitting a clip while the background waveform task is still running. I also noticed that if I continue working, when the background task completes, the waveform is updated and correct. However, it is possible that is not the case, and the F5 key redraws without making a new, heavy waveform task.

The workaround is to be more patient. Only use Rebuild Audio Waveform as a last resort, and when you do use it wait a minute for the results (time varies per file, machine, system busyness etc). For the next version, I will make it show a status message briefly when a waveform task is done.

I understand that building a waveform is not instantaneous, but I’ve been editing in shotcut for several years in a row and this is the first time I’ve seen this behavior.

I recorded a video where I take an hour-long video, on it the waveform behaves as usual, it can be edited, the sound changes instantly. This video is also recorded in OBS as the problematic one. Then I take the latest video, compressed with the same codec, and capture completely different behavior.

OK, thanks for the video. I do not know at this time why it will behave fine on one file and not on another. We developers will be on the lookout for when it happens to us.
If you want to manually reset the waveform data instead of use Rebuild Audio Waveform:

  1. start Shotcut
  2. open the audio/video file
  3. Properties > Proxy > Copy Hash Code
  4. Settings > App Data Directory > Show
  5. go into thumbnails in Explorer (or whatever)
  6. do a Find (F3)
  7. Ctrl+V to paste and Enter
  8. Now, you see a list of icons and files containing “audiolevels” in their name (there might be more than one audiolevels).
  9. close Shotcut
  10. Now you can delete the audiolevels files
2 Likes

Your remark gave me an idea, I divided a large piece of the video on the right side.
When cut, the waveform of the previous parts disappears, but those parts on the right do not move and
needs to be constantly rebuilt. This way I can finish editing the video.

But something about shotcut’s behavior with this file is clearly not right.

I can put the file in public access if necessary.

codec: H264 - MPEG-4 AVC (part 10) (avc1)
1920x1080
Frame frequency: 30

stream1:
MPEG AAC Audio (mp4a)
Sampling frequency: 48000 Гц
32bit
stream2:
MPEG AAC Audio (mp4a)
Sampling frequency: 48000 Гц
16bit

I had this issue (needing to constantly rebuild the audio waveform after cutting a piece of video) with the latest video I was editing. Deleting the thumbnails fixed it for me, thanks!

I suspect that what may have caused it is that I first opened the video in another project, so the proxy was created by that other project. Then when I created this second project (in the same folder), I added the video and it detected that the proxy already existed (good for me, as it had taken 25 minutes to create the proxy the first time), but somehow that messed up the waveform thumbnails.

Anyway, it’s fixed now after deleting the other thumbnails that were in the way. Thanks again

1 Like

Deleting the thumbnails also worked for me.

”The fix is to be patient” is wrong and misleading, after trying several things for literally hours Google AI also suggested “be patient” and I left it overnight. Didn’t do anything. 0 disk activity.

”Rebuild Audio Waveform” rebuilds them instantly, but then when you do any edit to the project, they disappear, and you need to rebuild them. It is hairpullingly frustrating when trying to edit a project using sound cues if you need to rebuild them every edit manually. Even things like “split” would wipe both side of a split rather than just split the waveform.

Once the thumbnails were deleted and the project opened again, the waveforms populated for the entire 30gb / multi-hour project in like 30 seconds.

There is a bug corrupting the thumbnails and stopping them from being used, and then discarding them during edits and not auto-rebuilding them.