ffmpeg ... -c:a flac -exact_rice_parameters 1 -multi_dim_quant 1 ...

I was encoding wav to flac.

  • With default options, the result was almost instant
    • At > 500x speed
  • Used -compression_level 12, finished in ~ 7 seconds
    • speed = 48.9x
  • Then I used multi_dim_quant
    • After ~ 10 minutes, I checked the speed to be ~ 0.02x. So thought it would take an hour or so. 1.30 seconds worth of audio was encoded
    • It's been over 2 hours now.
      • Shows 1.46 seconds of audio encoded with current speed = 0.00017x

Considering running it in a VM, so I can "pause" it whenever I need to restart my computer.

Update:
size= 123KiB time=00:00:02.82 bitrate= 356.3kbits/s speed=4.68e-05x
It stopped trying to use layman notation.
I'll need to restart soon-ish, but I'll see how far this goes and if the 2.82 seconds of audio is even listenable.

all 13 comments

sorted by: hot top controversial new old
[–] 13 points 1 year ago (4 children)

Or, and hear me out, you could maybe reevaluate whether you really need the very marginal compression improvements offered by multi dimensional quantization.

  • source
  • hideshow 4 child comments
  • [–] [S] 12 points 1 year ago (3 children)

    This try was actually me evaluating the thing.

    Now I am considering reevaluating whether evaluating the option is viable for me.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 12 points 1 year ago (2 children)

    Now I am considering reevaluating whether evaluating the option is viable for me.

    ...Have you ever considered a career in the Civil Service?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 7 points 1 year ago* (2 children)

    Heh, joke's on you; you're using the wrong library for obsessive FLAC compression anyway:

    http://cue.tools/wiki/FLACCL


    0.00017x sounds like a bug though. Maybe it balloons RAM usage enough to trigger swapping?

  • source
  • hideshow 2 child comments
  • [–] [S] 3 points 1 year ago (1 child)

    Maybe it balloons RAM usage enough to trigger swapping?

    Well, my RAM usage doesn't seem to have increased though (at least from this process).
    And I haven't setup a swap.

    http://cue.tools/wiki/FLACCL

    Oh, it has a CUDA library!?
    Then this FFmpeg FLAC library is really basic, considering it has no parallelism. I was assuming that the algorithm itself is not parallelisable.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 6 points 1 year ago*

    It's OpenCL, so it should even run on integrated graphics.

    Yeah, it's great! Extremely fast and marginally smaller than ffmpeg, last I checked, though I have not messed with those newer ffmpeg options. And cuetools has some other nice utilities anyway.

  • source
  • parent
  • [–] 2 points 1 year ago (1 child)

    Make sure you report this to ffmpeg directly at this link: https://ffmpeg.org/bugreports.html

  • source
  • hideshow 1 child comment
  • [–] [S] 2 points 1 year ago

    I am currently thinking that it might just be the problem with me having set too high parameters, but considering that mpv is unable to recognise the format even after 2 seconds of audio, perhaps there is some bug.

  • source
  • parent
  • [–] [S] 1 point 1 year ago (2 children)

    I realise I wasn't able to make this look funny.

    BTW, the resultant bitrate from the same source file with:

    • default options : 706.8 kb/s
    • -compression_level 12 : 698.1 kb/s
    • with -exact_rice_parameters 1 -multi_dim_quant 1 that I am trying right now, it currently shows the bitrate to be 331.4 kb/s
      • but it's only encoded the first 1.88 seconds yet, so no idea if it really will manage such an impressive compression.
  • source
  • hideshow 2 child comments
  • [–] 2 points 1 year ago (1 child)

    I don't see where the humor is, but I have an idle server so might let it run for a few days to compress a half minute of audio at .00017x. But are you sure it isn't just stuck?

  • source
  • parent
  • hideshow 1 child comment
  • [–] [S] 1 point 1 year ago

    Well, the time value is definitely going forward, so I won't expect that, but then a similar thing happens quite a bit with video stuff, so maybe you're right.
    Similar, not same, because in that case, it starts showing speed=N/A

  • source
  • parent