• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

decode audio in base64 in extendscript premiere pro

New Here ,
Sep 19, 2023 Sep 19, 2023

Copy link to clipboard

Copied

Hello
I am making a plugin in premiere pro with extendscript in the html and javascript, I am obtaining an .mp3 audio of which comes from api rest, I pass the audio to extendscript in base64 and I would like to know if there is any way to decode the audio in base64 in extendscript to save the file to the device, the code that I will provide you does not work for me

 

saveAudio: function (data,rutaArchivo) {
// Crear un objeto File para el archivo de texto
    var archivo = new File(rutaArchivo);
    archivo.encoding = "ASCII";
    // Abrir el archivo en modo de escritura
    if (archivo.open("w")) {
      var decode =atob(data)
      // Escribir el string en el archivo
      var datatemp=archivo.write(decode);
      $.IA.alertEventPanel("Se guardo: ",datatemp)
      // Cerrar el archivo
      archivo.close();

      alert("Archivo creado con éxito.");
    } else {
      alert("Error al crear el archivo.");
    }
}

 

TOPICS
Audio , SDK

Views

280

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Adobe Employee , Sep 20, 2023 Sep 20, 2023

I'll refresh my memory on the File object (https://extendscript.docsforadobe.dev/file-system-access/file-object.html), and...

Any way you could handle this at the JavaScript level? Maybe with a command line? [CEP HTML Test Extension shows command line usage from within a panel.]

Votes

Translate

Translate
Adobe Employee ,
Sep 20, 2023 Sep 20, 2023

Copy link to clipboard

Copied

LATEST

I'll refresh my memory on the File object (https://extendscript.docsforadobe.dev/file-system-access/file-object.html), and...

Any way you could handle this at the JavaScript level? Maybe with a command line? [CEP HTML Test Extension shows command line usage from within a panel.]

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines