How to combine WebM and Opus to generate MP4?

Solution 1:

WebM containers typically contain VP8 or VP9 video. The MP4 container format however does not support VP8 or VP9 video, at least according to the registration authority.

In your command you are trying to copy the video bitstream, and obviously it will fail:

codec not currently supported in container

You have two options:

  1. Re-code the video to H.264 using -c:v libx264.
  2. Choose another output container like Matroska (.mkv), but note that this will not be compatible for HTML5 video.

See also this MDN reference on supported HTML video formats and this Super User post on how to convert video for HTML5: What bunch of ffmpeg scripts do I need to get HTML5-compatible "Video for everybody"?

Solution 2:

ffmpeg -i video.webm -i audio.opus -c:v copy -c:a aac -strict experimental output.mp4

it should look something like this.

ffmpeg -i audio.opus -i vid.webm  -c:v copy -c:a opus -strict experimental output6.webm

replace aac with opus and the two files around with opus being in front(i think), it should work.