View Issue Details

IDProjectCategoryView StatusLast Update
0000667Cinelerra-GG[All Projects] Bugpublic2025-01-29 23:55
ReporterNafnlaus Assigned ToPhyllisSmith  
PriorityurgentSeveritymajorReproducibilityalways
Status acknowledgedResolutionopen 
Product Version2020-08 
Target VersionFixed in Version 
Summary0000667: Random audio pops make using Cinelerra-GG for mastering a maddening task
DescriptionVersion: CinGG-20241031-x86_64.AppImage (Fedora 41)

Certain things - mainly filters - and in particular the freeverb and graphical equalizer filters (two of the most important when mixing audio) can add subtle (or sometimes not so subtle) pops into the audio. They're incredibly difficult to track down, and it's so much work to isolate them that before now I've not spent the many hours to try to narrow down a fill project into a simple test case. It's to the point where I'm seriously thinking about just giving up on Cinelerra-GG for music; I can't keep having the program ruin my tracks by introducing random pops :(

I also do not believe that they represent a single problem, but rather multiple problems. In the process of submitting this, due to your incredibly low file size limit (come on, this is a bug report page for a media tool!), I tried converting my samples to m4a encoded with ffmpeg, and the problem *didn't* occur, whereas on FLAC it did (then again, these things are so random, who knows?). But the behavior is different for different types of bugs - for example, with freeverb, the pops seem most common when it's shifting parameters from one keyframe to the next (for example, amping up the wetness).

In none of these cases is there any clipping.
Steps To Reproduce1. I had to split loop_concat.flac to up load it here, so first mv loop_concat.flac.pt1 loop_concat.flac, then cat loop_concat.flac.pt2 >> loop_concat.flac

2. Open the xml. Note the marker. There will either be a pop here or not. You will *never hear the pop* just from playing the loop concat track in the interface, only via rendering (and possibly only via rendering to flac?) (note: when I say flac, I mean the flac option, not the ffmpeg suboption)

3. If you render the in-out points with the equalizer on, it will create the pop. If you shut the equalizer off, the pop will go away. Note that the equalizer is set to 0 - it should do absolutely nothing. But that's clearly not the case!

4. Other things that can make it go away are changing the render positioning (such as rendering a shorter section around the pop point) or removing the first chunk of the loop concat (before the in point, e.g. what we're not even rendering!)

5. I have included examples of it rendered with and without the bug. On close inspection, the pop seems to occur when cinelerra is - for some reason - getting skew between the left and right channels. I'm not sure if that's the /only/ thing going on, but it's certainly /something/ going on. See the png.
Additional InformationAs noted earlier, I don't believe that this is the /only/ pop bug. For example, I think the freeverb pop bug is an entirely separate thing, and there might be even more. But these render Cinelerra practically unusable for music to anyone who cares about mastering quality :(

Just now, I tried rendering my main project (from which this highly simplified example was derived) to wav. But the pop was still there. I then tried converting loop_concat in my main project to wav, and rendering to wav. That particular pop seems to have vanished. So this particular one might be a flac-source bug rather than a flac-output bug. Since flac and wav should be identical (since flac is lossless), to debug this issue, you might want to have two different versions, one flac and one wav, and (A) see if they load identically, and if they do, (B) see where the processing of them starts to differ, and why.
TagsNo tags attached.

Activities

PhyllisSmith

PhyllisSmith

2025-01-29 23:55

manager   ~0005751

@Nafnlaus
@Andrew-R
"So, for now workaround is to decompress flac to wav (for example via flac -d) and load that?"
YES, WORKAROUND is to convert input flac to wav and then load the .wav version. This always worked to render to flac (and tested with equal correct results if rendered using ffmpeg/flac. I used "ffmpeg -i loop_concat.flac loop_concat.wav" to convert the input from flac to wav.

Andrew thinks he recalls that "inside cinelerra audio exist as uncompressed pcm array (of doubles, 64 bit per sample..)" and if you do a mediainfo on loop_concat.wav, you will see that that audio format is reported as "PCM" whereas loop_concat.flac reports audio format as "FLAC". I think that explains why the bug does not appear when using wav audio.

Still will try to backtrace where the problem occurs; but unfortunately we do not have the programming expertise at this time to fix the actual bug.
Andrew-R

Andrew-R

2025-01-28 23:35

reporter   ~0005750

@PhyllisSmith

so,I think your experiment points either at flac decoder or resampler/converter in cinelerra' s code. But coupled with plugin buffer management somehow?

So, for now workaround is to decompress flac to wav (for example via flac -d) and load that?
PhyllisSmith

PhyllisSmith

2025-01-28 23:00

manager   ~0005749

Last edited: 2025-01-28 23:04

View 2 revisions

@Nafnlaus
@Andrew-R
Using the AppImage Andrew created of the Heroine Warrior original (not sure if version 9 but close enough), I have verified that the bug is also still in that version. I.e. EQ Graphic audio plugin creates the error (pop, I guess) if input is Flac and output is Flac whereas input of Wav and output of Flac or Wav does not whether EQ Graphic is in or out. So unfortunately, the HV version does not provide a fix. Still looking at problem.

PhyllisSmith

PhyllisSmith

2025-01-18 19:10

manager   ~0005744

@Nafnlaus
@Andrew-R:
"without i/o points set it renders fine? " No, it just may be in a different place. The problem shows up in this particular audio in Channel 2. If I move the IN pointer a lot closer to where the label is, I do not see a difference in the channel 2 wave so it really varies.
@IgorBeg:
Thank you for the methodology to use Calf LV2 plugins with AppImage !!! I will correct the manual.
IgorBeg

IgorBeg

2025-01-18 12:29

reporter   ~0005743

Off Topic ?
@PhyllisSmith

For using lv2/Calf plugins also for the Appimages.
-----------------------------------------------------------------------
My Operating System, as always, is UbuntuStudio_16.04-64bit.

Tested with:
  - CinGG-20241231-alternative_shortcuts.AppImage

Cinelerra-GG
Menu-> Setings-> Preferences...-> Interface TAB
  - Default LV2_PATH:
    $HOME/plugins_lv2-calf_for_Cin/lv2

I copied the "calf" and "lv2" folders from /usr/lib/ to /home/user/plugins_lv2-calf_for_Cin/.

Then, inside /home/user/plugins_lv2-calf_for_Cin/lv2/, I removed some of the plugins do not work in Cinelerra-GG.
It works for all Cin builds and Appimages (In my tests).

The final folders structure is below:

/home/user/plugins_lv2-calf_for_Cin/
  \__ calf
      \__ calf.a
      \__ calf.la
      \__ calf.so
  \__ lv2
      \__ abGate.lv2
      \__ a_law-swh.lv2
      \__ alias-swh.lv2
      \__ allpass-swh.lv2
      \__ am_pitchshift-swh.lv2
      \__ amp-swh.lv2
      \__ analogue_osc-swh.lv2
      \__ balance.lv2
      \__ bandpass_a_iir-swh.lv2
      \__ bandpass_iir-swh.lv2
      \__ bode_shifter_cv-swh.lv2
      \__ bode_shifter-swh.lv2
      \__ butterworth-swh.lv2
      \__ calf.lv2
      \__ gx_chorus.lv2

Screenshot_2025-01-18.jpg (387,848 bytes)
Andrew-R

Andrew-R

2025-01-18 06:43

reporter   ~0005742

so, to reiterate a bit, bug surfaces when you
1) load source file
2) add i/o points
3) add eq plugin set to off.

without i/o points set it renders fine?
PhyllisSmith

PhyllisSmith

2025-01-17 18:18

manager   ~0005741

@IgorBeg
@Andrew-R
Another update - no solution.
(1) To determine if bug is recent, went all the way back to May 2016 and bug still in render.
(2) Heroine Virtual original author version of cinelerra 4.6.1 also still has bug. This is disappointing too since it would have been great to compare the relevant code for a fix. 4.6.1 is about the version of Cinelerra CV (community version) so bug probably there too but I can not test that.
(3) Interestingly, if render to other lossless codecs with AIFF (Apple/SGI), and FFmpeg ALAC mp4/m4a still get bug.
(4) As already noted by @Nafnlaus, changing the In/Out pointer does get rid of the bug at that particular place but could show up somewhere else instead. You can change the Out pointer a little closer to the Label and still get the bug though.
(5) Most helpful is that if you enable Debug (gdb) the bug is in the same spot making it possible to maybe track down the bug (which I am going to try next).

IgorBeg: according to the Manual, the LV2 plugins do not work with AppImage so I must have tested that at some time to verify but I do not specifically remember. At any rate, it does not really seem like the same problem since Nafnlaus reported other effects like Freeverb hav the problem also.
IgorBeg

IgorBeg

2025-01-14 08:59

reporter   ~0005740

Some time ago, using "EQ Graphic" plugin, I heard a lot of clicks when I played the track.
I think it is a different problem by you; I think it depends by my Operating System (UbuntuStudio_16.04) or/and Hardware, I don't know.
So, to bypass my problem, I have been able to use LV2/Calf plugin thanks to Developers and Users, here.
I use "L2_Calf Equalizer 8 Band" plugin for the Audio tracks and it works very good to me.
Do you have any chance to try that (those) plugin(s)?

I write here, the link to the Manual for that.
https://cinelerra-gg.org/download/CinelerraGG_Manual/Audio_LV2_Calf_Plugins.html#11606
Nafnlaus

Nafnlaus

2025-01-12 22:09

reporter   ~0005739

I appreciate you working on this! :)
PhyllisSmith

PhyllisSmith

2025-01-12 21:57

manager   ~0005738

Last edited: 2025-01-12 22:00

View 2 revisions

@Nanlaus
@Andrew-R
Just an update - no solution yet.
(1) Problem not due to AppImage. I eliminated that by executing CinGG-20241031-x86_64.AppImage on Fedora 40 (close enough to 41) and then did the build there with the same results. Same as Fedora 32 which is where I usually work.
(2) Problem not due to any code or package updates. Eliminated that by doing a GIT of October 2020 source code. Same bad results.
(3) Not a Flac problem specifically. Same problem with rendering to Wav or to FFmpeg Flac.
(4) Totally reproducible when rendering In/Out points as in the d3cpcpr_bug xml file.
(5) Since I can neither hear or actually see the problem, I am looking at the blown up wave images in Cinelerra to see where it differs between the No Bug and Bug renders (without EQ effect and with EQ effect). The wave s begins to differ right before 07:14 up to 08:08 in the second channel. Attached is a png showing the channel2 differing. First two waves show same wave with and without the bug of channel1 and waves3&4 show what I assume is correct waves of channel2. And the last two waves show how the waves with the bug differ (but match each other as well as original d3cpcpr_withbug.flac on channel2.

In the png of the bug waves, you can see a "funny little blip" that may be where things are going wrong.
Am still persueing the problem



audiowave.png (55,279 bytes)
audiowave.png (55,279 bytes)
PhyllisSmith

PhyllisSmith

2025-01-07 23:38

manager   ~0005737

@Nafnlaus
@Andrew-R
Because problems happen with at least freeverb and equalizer effects, I am guessing it is most likely a bug in Cinelerra. And probably some kind of end case or round off. Your number "3. If you render the in-out points with the equalizer on, it will create the pop." may be the best way for an expert to debug this.
Nafnlaus

Nafnlaus

2025-01-07 22:48

reporter   ~0005736

Ugh, I'm sorry to hear that. :( Would spectrograms be easier for you, given your hearing? Here's audacity, from 07,300 to 07.870. Note the spike in the centre on d3cpcpr_withbug.flac (the one with the equalizer enabled() and how it's absent in d3cpcpr_withoutbug.flac (the one with the equalizer disabled). It's only present in the right channel.

image.png (639,638 bytes)
image-2.png (651,704 bytes)
PhyllisSmith

PhyllisSmith

2025-01-07 21:55

manager   ~0005735

@Nafnlaus
@Andrew-R
Andrea and I both are having trouble hearing the "pop", but are somewhat hard of hearing. Will continue to try.
I think the best we can hope for is to just find a reliable/usable workaround that is automatic and not dependent on taking extra steps.
Will update if I find out anything new.
Nafnlaus

Nafnlaus

2025-01-06 23:52

reporter   ~0005734

@Andrew-R I verify that the problem persists with single-processor mode. Which obviously is unfortunate because it'd be nice to have an easy fix, but is fortunate in that it should make debugging easier :)
Andrew-R

Andrew-R

2025-01-06 22:03

reporter   ~0005732

well, I am not really developer, more like advanced user.

One idea to check - run cingg on just one processor (using checkbox in preferences or launch like this

'taskset -c 0 cin'

I suspect this might be some buffer pointer skipping around at wrong time, but debuggin
multithreaded programs usually not easy even for pros. :(
Nafnlaus

Nafnlaus

2025-01-06 21:36

reporter   ~0005731

@PhyllisSmith Thank you so much! If there's anything I can do to help, let me know. :) I can't tell you how encouraging it is, when you're dealing with bugs, to know that there's actually active devs out there who care to fix them if you can isolate and report them :)

(No joke, these are much more annoying bugs than crashes, because the problems sneak into all your music and then you discover them incrementally over the course of months, often after you've already released and there's nothing you can do about them. Whereas with crashes, like the "crashing when dragging a keyframe bug... that's super-common, but I've just made it instinct to hit "s" right before I drag any keyframes ;) )
PhyllisSmith

PhyllisSmith

2025-01-06 19:44

manager   ~0005730

@Nafnlaus : Acknowledging that we have seen this 667 and 668 and will take a look at the files/issue.
Nafnlaus

Nafnlaus

2025-01-05 20:31

reporter   ~0005729

Probably relates to: https://www.cinelerra-gg.org/bugtracker/view.php?id=668
Nafnlaus

Nafnlaus

2025-01-04 21:47

reporter  

loop_concat.flac.pt2 (3,723,050 bytes)
d3cpcpr_withbug.flac (3,429,313 bytes)
d3cpcpr_bug.xml (17,145 bytes)
d3cpcpr_bug.png (45,809 bytes)
d3cpcpr_bug.png (45,809 bytes)
d3cpcpr_withoutbug.flac (3,429,310 bytes)
loop_concat.flac.pt1 (3,072,000 bytes)

Issue History

Date Modified Username Field Change
2025-01-04 21:47 Nafnlaus New Issue
2025-01-04 21:47 Nafnlaus File Added: d3cpcpr_bug.xml
2025-01-04 21:47 Nafnlaus File Added: d3cpcpr_bug.png
2025-01-04 21:47 Nafnlaus File Added: d3cpcpr_withoutbug.flac
2025-01-04 21:47 Nafnlaus File Added: loop_concat.flac.pt1
2025-01-04 21:47 Nafnlaus File Added: loop_concat.flac.pt2
2025-01-04 21:47 Nafnlaus File Added: d3cpcpr_withbug.flac
2025-01-05 20:31 Nafnlaus Note Added: 0005729
2025-01-06 19:44 PhyllisSmith Assigned To => PhyllisSmith
2025-01-06 19:44 PhyllisSmith Status new => acknowledged
2025-01-06 19:44 PhyllisSmith Note Added: 0005730
2025-01-06 21:36 Nafnlaus Note Added: 0005731
2025-01-06 22:03 Andrew-R Note Added: 0005732
2025-01-06 23:52 Nafnlaus Note Added: 0005734
2025-01-07 21:55 PhyllisSmith Note Added: 0005735
2025-01-07 22:48 Nafnlaus File Added: image.png
2025-01-07 22:48 Nafnlaus File Added: image-2.png
2025-01-07 22:48 Nafnlaus Note Added: 0005736
2025-01-07 23:38 PhyllisSmith Note Added: 0005737
2025-01-12 21:57 PhyllisSmith File Added: audiowave.png
2025-01-12 21:57 PhyllisSmith Note Added: 0005738
2025-01-12 22:00 PhyllisSmith Note Edited: 0005738 View Revisions
2025-01-12 22:09 Nafnlaus Note Added: 0005739
2025-01-14 08:59 IgorBeg Note Added: 0005740
2025-01-17 18:18 PhyllisSmith Note Added: 0005741
2025-01-18 06:43 Andrew-R Note Added: 0005742
2025-01-18 12:29 IgorBeg File Added: Screenshot_2025-01-18.jpg
2025-01-18 12:29 IgorBeg Note Added: 0005743
2025-01-18 19:10 PhyllisSmith Note Added: 0005744
2025-01-28 23:00 PhyllisSmith Note Added: 0005749
2025-01-28 23:04 PhyllisSmith Note Edited: 0005749 View Revisions
2025-01-28 23:35 Andrew-R Note Added: 0005750
2025-01-29 23:55 PhyllisSmith Note Added: 0005751