0

I was creating an application in react for uploading video and using a REST API to send that to the server and store in S3. I also wanted the simple audio version of the video for some other tasks and I am confused as to what might be the better way:

  1. Creating audio file on the fly when it is needed using node-ffmpeg package and not store it anywhere
  2. Start converting the video file to audio on the browser client only, and posting that to the server for storage along with the video.
  3. Just post the video to the server and use queue system for creating a new task for video conversion to audio and then save that to the S3 storage. The second method seems to be saving some compute power on the server but it might be a problem if the video upload completes, audio conversion is still going on and the client disconnects. Would appreciate some help, thanks.
  • 1
    The idea of doing video processing client-side would take some load off the server. It might work for the case when the video is not very large, and the client's device is powerful enough to do it without compromising user experience. If you want to do this client-side, you can use [ffmpeg.wasm](https://github.com/ffmpegwasm/ffmpeg.wasm) . – wsdookadr Apr 28 '21 at 11:42
  • About your 3rd point, the concern is that the audio conversion and upload haven't finished before the client disconnects. This is a valid concern. You can address it through a progressbar that communicates to the user task completion information. To summarize, both client-side and server-side variants are possible. – wsdookadr Apr 28 '21 at 11:48

0 Answers0