英文:
MediaRecorder convert blob to MP4 for PPTXGenJS video
问题
我正在使用MediaRecorder从GetDisplayMedia()记录视频流,以便在PowerPoint文档中使用PPTXGenJS嵌入。
我知道MediaRecorder不能记录为mp4,只能为webm,而PPTX需要MP4格式。
因此,来自MediaRecorder的结果webm blob需要转换为mp4。
如何将来自MediaRecorder
的webm blob转换为mp4 blob?
英文:
I'm recording a video stream from GetDisplayMedia() using MediaRecorder to be embedded within a powerpoint document using PPTXGenJS.
<br>
I know MediaRecorder can't record to mp4, only webm, and PPTX requires MP4 format.
<br>
<br>
So the resultant webm blob from MediaRecorder will have to be converted to mp4.
<br>
How can I convert the webm blob from MediaRecorder
to an mp4 blob?
答案1
得分: 1
我最终将WebM数据块保存为文件系统上的文件,然后使用FFmpeg将WebM转换为MP4,然后将MP4的Base64字符串表示发送回前端。
英文:
I ended up saving the webm blob as a file on the file system, then using ffmpeg to convert the webm to mp4, then sending the base64 string representation of the mp4 back to the front end.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论