Osama Alshaykh
Osama Alshaykh

Reputation: 1

azure encoding: video track in one .webm file, audio track in a .mp3 separate file, output .mp4 file

In azure, I want to generate a video from two independent files: video track is in a .webm file and audio track is in a .mp3 file. Is this possible? I want to use Azure media services. If not, then FFMPEG could be a solution. correct?

Thanks, Osama

Upvotes: 0

Views: 252

Answers (1)

Jonathan
Jonathan

Reputation: 11

I know this is possible with FFMPEG

Once you have downloaded both video and audio files (‘videoplayback.mp4’ and ‘videoplayback.m4a’ respectively), here’s how you can merge them into a single file:

  • Download and install ffmpeg.
  • Open a Command Prompt window in your downloads folder and run the following command
  • In case of MP4 format (all, except 1440p 60fps & 2160p 60fps): ffmpeg -i videoplayback.mp4 -i videoplayback.m4a -c:v copy -c:a copy output.mp4
  • In case of WebM format (1440p 60fps and 2160p 60fps): ffmpeg -i videoplayback.webm -i videoplayback.m4a -c:v copy -c:a copy output.mp4
  • Wait until ffmpeg finishes merging audio and video into a single file named "output.mp4".

In Azure, one option would be to use an audio overlay. Upload the webm file, with the mp3 as an audio overlay. This would effectively combine the two.

Upvotes: 1

Related Questions