6

我想使用网络记录用户网络摄像头流MediaRecorder并生成一个文件,该文件具有:

  • 正确设置持续时间(浏览器可以看到和使用,例如 html5 视频播放器在视频处于preload状态时显示正确的持续时间)
  • 为音频和视频轨道正确设置编解码器

在这里您可以看到一个完整的示例(Chrome:54.0.2840.71,Firefox:49.0.2 -> 请使用相对较新的浏览器,因为演示中使用的 API 是相当新的):https ://jsfiddle.net/2vr7vL2p/12/除了:

  • 在 chrome 中,持续时间返回Infinity(在 Firefox 中它工作正常)
  • 在 firefox 和 chrome 中,结果文件都损坏了编解码器(例如 VLC 媒体播放器返回VLC does not support the audio or video format "undf". Unfortunately there is no way for you to fix this.:)

如何解决这些问题?

4

0 回答 0