Replacing the Video in an Atmos MP4

 

 

Task: You´ve created an “Atmos.mp4” with Dolby Atmos Renderer and want to replace the black image in that mp4 with a new video. 

One effective way to do this is with the open source software FFMPEG. This guide will explain the workflow step-by-step.

 

 

 

On Mac OS:

(steps 1 + 2 only need to be done the first time you install FFMPEG).

 

To install FFMPEG on a Mac you first need an additional piece of free software, called Homebrew.

 

 

  1. Install Homebrew:
    1. Go to https://brew.sh/breindex (or just Google “Homebrew”)
    2. Open the MacOS Terminal (found in Applications/Utilities) and copy paste the command line that is shown on the brew.sh website. 
    3. Optional Video Guidehttps://www.youtube.com/watch?v=8nbuqYw2OCw

 

 

  1. Install FFMPEG from Homebrew:
    1. Directly after you installed Homebrew, type: brew install ffmpeg
      1. This will download and install FFMPEG will all necessary packages
      2. Done.

 

  1. Working with FFMPEG:
    1. Copy the Atmos.mp4 and the Video.mp4 to the desktop
    2. Open Terminal
    3. Type: cd desktop
    4. Type: ffmpeg -i Video.mp4 -i Atmos.mp4 -c:v copy -c:a copy Output.mp4
    5. Press enter and you´re done ?

 

 

 

  1. Some notes:
    1. -i means “Input” – this selects the files you want to work with.
    2. -c:v and -c:a and means “Codec:Video” and “Codec:Audio”.  You told ffmpeg to just copy the video and audio assets, without converting them into a new codec.
    3. The last part of the command line specifies the name and the file-format of your final Output file.

 

  1. The order in the command line above is important (putting Video.mp4 first)
  2. The video file can also be a .mov or .h264 file
  3. The Atmos audio file can also be an .ec3
  4. Obviously, the MP4s don´t have to be copied to the desktop as in the example…. Instead you can also type cd and then drag and drop any folder into terminal, this allows you to work from that folder.

 

 

 

 

On Windows 10:

(steps 1 + 2 only need to be done the first time you install FFMPEG).

 

  1. Install FFMPEG:
    1. Download FFMpeg from ffmpeg.zeranoe.com/builds
    2. Select the latest version, 64 bits, Static build
    3. Unzip the folder, copy it to wherever you want to store FFMPEG. Then go to the bin folder. It should look like this:

 

 

 

 

  1. Add FFMPEG to System variables.
    1. This is probably the most complicated bit…
    2. Open Windows Search and type ENV – this should bring you the option to “Edit the system environment variables”
    3. In that window click on “Environment Variables”

 

 

 

  1. Select the one that says “Path” and click Edit.

 

 

 

 

  1. Click “New” and add here the path of the bin folder where FFMPEG is located. (most easily by copy pasting the folder address).
  2. Optional Video Guide: https://www.youtube.com/watch?v=qjtmgCb8NcE

 

 

 

  1. Working with FFMPEG:

 

  1. Put your Atmos.mp4 and your Video.mp4 into any folder on your computer.
  2. SHIFT + Right click in that folder and chose: “open command window here”.
  3. In the command line window type:  ffmpeg -i Video.mp4 -i Atmos.mp4 -c:v copy -c:a copy Output.mp4
  4. Press Enter and you´re done.

 

 

 

 

  1. Some notes:
    1. -i means “Input” – this selects the files you want to work with.
    2. -c:v and -c:a and means “Codec:Video” and “Codec:Audio”.  You told ffmpeg to just copy the video and audio assets, without converting them into a new codec.
    3. The last part of the command line specifies the name and the file-format of your final Output file.

 

  1. The order in the command line above is important (putting Video.mp4 first)
  2. The video file can also be a .mov or .h264 file
  3. The Atmos audio file can also be an .ec3