• Resolved URBANISTER

    (@srbanister)


    I really like this plugin and the waveforms it creates. It fits perfectly into the style of my audiophile website. But there is a little problem. I haven’t figured out yet how to deal with large audio files like a two-hour DJ set. It basically works, but the browser tab on a desktop machine consumes 2 GB of RAM. On mobile it crashes the browser tab.

    Do you have any suggestions? How do I create a cache or how do I get a waveform without consuming gigs of ram?

    I’m really grateful for your help!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author iamzhirik

    (@iamzhirik)

    Hello, I saw your link, website looks pretty nice.

    Technically to generate the picture of waveprint for wavesurfer it needs to load the whole audio file into memory. And if you file is 2 GB, then it will need 2 GB of RAM which is not good for big audio files.

    You asked about caching…. As I remember there was some caching ability for wavesurfer in past, theoretically what you asking should be possible I think, need to look into the code…

    Plugin Author iamzhirik

    (@iamzhirik)

    Currently I’ve updated player version to 1.39 and added the functionality that you need (hope it works fine). List of steps that you need to do:

    1. You can use the “cached” attribute in your shortcode attribute, here is an example:
    [UIWaveSurfer file=”/demo.mp3″ cached=”1″]

    2. You need to generate the cached file, so you need call the following command in console of your web browser:
    mediaUI.generateWaveSurferCacheForAudioFile()
    It will opens the dialog where you need to select your audio file, and after that you will receive the same file name with the .surf extension

    3. You need to move this “.surf” file to the same folder with your audio file. So in the same folder you have 2 files, here is an example of the names of these files:
    – demo.mp3
    – demo.mp3.surf

    4. You running the player and everything should work.

    Also I’ve updated description of the “cached” attribute on the player page. Let me know if it works or you have any troubles with it.

    Thread Starter URBANISTER

    (@srbanister)

    I can’t thank you enough! This is exactly what I needed. The waveform is displayed instantly, and the browser tab doesn’t use up so much RAM anymore.

    Plus, the page doesn’t crash on mobile browsers like it did before.

    Thank you so much for this quick solution!

    Plugin Author iamzhirik

    (@iamzhirik)

    Possibly it will be a good feature, and I think that it is necessary and not hard to implement.

    You welcome)

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.