<p>The MP4 format doesn't support an Alpha channel.  The question you've asked is very broad, and I've tried to answer to a certain extent below.  However you may need to decide what route you're going to try and then researching that route or asking further, more specific questions.</p>
<p>The file types that currently support an Alpha (transparency) channel are FLV, F4V, AVI, Quicktime, and WebM.  If you're using free programs, you may find they can export in these formats.  Often, there will be a named codec for an Alpha channel within the settings of these, or a PNG option.  Firstly, I would see if there's an option to export video within your PyMOL software in any of these formats - try exporting them in different ways to see if they have the Alpha channel.</p>
<p>Alternatively, if it's a one off video, you could use the free trial of Premiere Pro or After Effects to create and export your video, although it can be a learning curve if it's a complex project and you have never used Adobe Creative Cloud before.  Lastly, you could export your video and try and remove the background in a video editor. (If you want to use WebM, you need a <a href="https://www.fnordware.com/WebM/" rel="nofollow noreferrer">third-party WebM codec</a> for Adobe Media Encoder.)</p>
<h3>PNG import /export</h3>
<p>You could import the png sequence into either After Effects or Premiere Pro (free trials available for each).  I'm sure several free programs can import a PNG sequence automatically, or you could manually arrange the images on the timeline, one image per frame.</p>
<p>I mainly use Premiere Pro so below I've listed a couple of ways I can use it to export a transparent video directly from Premiere.  HOWEVER - there are likely to be similar options in other programs - most video programs will export in a variety of formats / codecs.</p>
<p>###Export a movie file with an alpha channel in Premiere Pro ###</p>
<ol>
<li>Select the sequence.</li>
<li>Choose File &gt; Export &gt; Media.</li>
<li>In the Export Settings dialog box, choose one of the following
options:</li>
</ol>
<p>Option 1 - QuickTime</p>
<ul>
<li>Select &quot;QuickTime&quot; in the file format</li>
<li>Select &quot;PNG&quot; from the video codecs</li>
<li>Under Channels, select &quot;RGB + Alpha&quot;</li>
</ul>
<p>Option 2 - Microsoft AVI</p>
<ul>
<li>Select &quot;AVI&quot; in the file format</li>
<li>Select &quot;RGBA + &quot; from the video codecs</li>
<li>Under Channels, select &quot;RGB + Alpha&quot;</li>
</ul>
<ol start="6">
<li>Once you have changed settings as per one of the sets of options above, continue to set other settings and click Export or Queue to export as you normally would.</li>
</ol>
<h3>Remove background</h3>
<p>Another option is that if the background is a consistent colour - white, grey, green etc, most advanced video editors will have options to remove the background using a colour match.</p>
<p>In Premiere Pro, this is done using the Chroma key effect.  In essence, add the effect to the video, take a sample of the background colour, and the background should be removed, it's just left for you to export the video in one of the methods mentioned previously.</p>

CC BY-SA 4.0
2018-04-23T15:16:06.643Z
2020-12-16T07:54:49.520Z
2020-12-16T07:54:49.520Z
AutoBaker
<p>I have a short animation clip made with PyMOL software (visualizing molecules), in the MP4 format. I am going to use this animation in future presentations, and it would look much better if the background was transparent. Is there an easy way to achieve this? I am working on a Mac. Obviously free/open source software would be best, but I am interested in any software capable of this.</p>

<p>I also have the option in PyMOL to save each frame of the video as PNG files, which do have an alpha channel. But once I convert this to mpeg or MP4, the alpha channel disappears.</p>

CC BY-SA 3.0
2018-04-23T13:58:12.537Z
How do you intend to use the MP4?
Gyan
CC BY-SA 3.0
2018-04-23T13:59:19.833Z
For use in powerpoint or keynote presentations. The format is not important to me, any format that us not too large will do.
Yoda
CC BY-SA 3.0
2018-04-24T17:08:02.993Z
One has to wonder, what exactly do you want to show through this hypothetical transparent background? You mentioned presentations. Does that mean you want to paste it onto some kind of slide texture or solid color? What's wrong with the current background? A molecular animation would seem to require a simple, white or black background. Is that not what you have now? A screen shot might help us to understand the issue.
user8356
<alpha>
Make white background in MP4 movie transparent
Yoda
# Make white background in MP4 movie transparent

(Asked by: username_0 on 2018-04-23)

I have a short animation clip made with PyMOL software (visualizing molecules), in the MP4 format. I am going to use this animation in future presentations, and it would look much better if the background was transparent. Is there an easy way to achieve this? I am working on a Mac. Obviously free/open source software would be best, but I am interested in any software capable of this.

I also have the option in PyMOL to save each frame of the video as PNG files, which do have an alpha channel. But once I convert this to mpeg or MP4, the alpha channel disappears.

**Tags:** alpha

> **Comments:**
> **username_1**: How do you intend to use the MP4?  
> **username_0**: For use in powerpoint or keynote presentations. The format is not important to me, any format that us not too large will do.  
> **username_2**: One has to wonder, what exactly do you want to show through this hypothetical transparent background? You mentioned presentations. Does that mean you want to paste it onto some kind of slide texture or solid color? What's wrong with the current background? A molecular animation would seem to require a simple, white or black background. Is that not what you have now? A screen shot might help us to understand the issue.  

---

## 1 answers

### Answer by username_3 on 2018-04-23. Score: 5

The MP4 format doesn't support an Alpha channel. The question you've asked is very broad, and I've tried to answer to a certain extent below. However you may need to decide what route you're going to try and then researching that route or asking further, more specific questions.

The file types that currently support an Alpha (transparency) channel are FLV, F4V, AVI, Quicktime, and WebM. If you're using free programs, you may find they can export in these formats. Often, there will be a named codec for an Alpha channel within the settings of these, or a PNG option. Firstly, I would see if there's an option to export video within your PyMOL software in any of these formats - try exporting them in different ways to see if they have the Alpha channel.

Alternatively, if it's a one off video, you could use the free trial of Premiere Pro or After Effects to create and export your video, although it can be a learning curve if it's a complex project and you have never used Adobe Creative Cloud before. Lastly, you could export your video and try and remove the background in a video editor. (If you want to use WebM, you need a [third-party WebM codec](https://www.fnordware.com/WebM/) for Adobe Media Encoder.)

### PNG import /export

You could import the png sequence into either After Effects or Premiere Pro (free trials available for each). I'm sure several free programs can import a PNG sequence automatically, or you could manually arrange the images on the timeline, one image per frame.

I mainly use Premiere Pro so below I've listed a couple of ways I can use it to export a transparent video directly from Premiere. HOWEVER - there are likely to be similar options in other programs - most video programs will export in a variety of formats / codecs.

###Export a movie file with an alpha channel in Premiere Pro ###

1. Select the sequence.
2. Choose File > Export > Media.
3. In the Export Settings dialog box, choose one of the following
   options:

Option 1 - QuickTime

* Select "QuickTime" in the file format
* Select "PNG" from the video codecs
* Under Channels, select "RGB + Alpha"

Option 2 - Microsoft AVI

* Select "AVI" in the file format
* Select "RGBA + " from the video codecs
* Under Channels, select "RGB + Alpha"

6. Once you have changed settings as per one of the sets of options above, continue to set other settings and click Export or Queue to export as you normally would.

### Remove background

Another option is that if the background is a consistent colour - white, grey, green etc, most advanced video editors will have options to remove the background using a colour match.

In Premiere Pro, this is done using the Chroma key effect. In essence, add the effect to the video, take a sample of the background colour, and the background should be removed, it's just left for you to export the video in one of the methods mentioned previously.


---

