search

Home  >  Q&A  >  body text

In Node.js, how to get the audio duration of an audio file in Google Cloud Storage without downloading?

<p>In Node.js, how to get the audio duration of an audio file in Google Cloud Storage without downloading? </p>
P粉127901279P粉127901279493 days ago671

reply all(1)I'll reply

  • P粉262073176

    P粉2620731762023-08-18 11:17:27

    When looking at the documentation I didn't see anything about checking the file contents, let alone something as specific as calculating the duration of an audio file, so: cannot be implemented .

    At a minimum (depending on the file format), you'll need to download enough of the file to read its embedded metadata (I don't see any mention of support for content ranges , so you might Need to get the entire file).

    reply
    0
  • Cancelreply