4

I tried to record audio.webm using HTML5 MediaRecorder on Chrome and it cannot seek. Which is a known bug for Chrome. And I'm using ffmpeg to fix this problem with billion different ways, but still haven't succeeded.

ffmpeg -i <source> -fflags +genpts output.webm

It works if the source file has a video stream, but it didn't work for only audio stream with opus encoding. When I try to seek, Chrome dev tools network timeline keep downloading the entire file:

screenshot

I even tried to play with VLC and still cannot seek. Then I tried to convert webm to MP3:

ffmpeg -i <source> output.mp3

Now I can seek in the browser and any other media players, but the output file's duration and start time is incorrect:

output.web and output.mp3

What is the correct ffmpeg parameters to fix this problem?

Racil Hilan
  • 294
  • 2
  • 10
jeefo
  • 71
  • 8

1 Answers1

3

I've been research about it and found an issue discussion from https://github.com/GoogleChromeLabs. In the issue discussion they used a node module called ts-ebml. It's like:

ts-ebml -s not_seekable.webm | cat > seekable.webm

It fixed non-seekable webm metadata duration and cues.

I hope it will be help somebody.

jeefo
  • 71
  • 8