Skip to content

Commit

Permalink
fix: readfile (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
jinwoo1225 committed Jun 12, 2023
1 parent 3a1bf41 commit 5b83f55
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ function App() {

const fileName = name.split('.').slice(0, -1).join('.')

await ffmpeg.run('-i', name, "-c:v", "copy", "-c:a", "libmp3lame", "-q:a", "4", fileName+'.mp3')
const outputFileNameWithExtension = fileName+'.mp3'

const data = ffmpeg.FS('readFile', 'output.mp3')
await ffmpeg.run('-i', name, "-c:v", "copy", "-c:a", "libmp3lame", "-q:a", "4", )

const data = ffmpeg.FS('readFile', outputFileNameWithExtension)

const url = URL.createObjectURL(new Blob([data.buffer], {type: 'audio/mp3'}))

Expand Down

1 comment on commit 5b83f55

@vercel
Copy link

@vercel vercel bot commented on 5b83f55 Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.