<p>Use bitstream filter <code>filter_units</code> with ffmpeg 4.0 or newer.</p>

<pre><code>ffmpeg -i INPUT -c copy -bsf:v 'filter_units=remove_types=6' OUTPUT
</code></pre>

<p>P.S.</p>

<pre><code>/* NAL unit types */
enum {
    H264_NAL_SLICE           = 1,
    H264_NAL_DPA             = 2,
    H264_NAL_DPB             = 3,
    H264_NAL_DPC             = 4,
    H264_NAL_IDR_SLICE       = 5,
    H264_NAL_SEI             = 6,
    H264_NAL_SPS             = 7,
    H264_NAL_PPS             = 8,
    H264_NAL_AUD             = 9,
    H264_NAL_END_SEQUENCE    = 10,
    H264_NAL_END_STREAM      = 11,
    H264_NAL_FILLER_DATA     = 12,
    H264_NAL_SPS_EXT         = 13,
    H264_NAL_AUXILIARY_SLICE = 19,
};
</code></pre>

CC BY-SA 4.0
2019-05-13T12:52:32.433Z
Yes, this is now directly possible.
Gyan
CC BY-SA 4.0
2019-05-13T12:28:04.180Z
2019-05-13T12:53:54.607Z
2019-05-13T12:53:54.607Z
whmiao
<p>Regular ffmpeg won't do this. You'll need a combination of two tools to carry this out.</p>

<p><strong>#1</strong> Use <a href="https://sourceforge.net/projects/direct264/files/Related%20Programs/" rel="noreferrer">ffmpeg</a> from direct264, a modded version of an old ffmpeg build with a custom filter to modify H264 bitstreams. This build is crippled in most other ways, so rename it or don't put it in your path.</p>

<pre><code>ffmpeg -i in.mp4 -vcodec copy -acodec copy -vbsf h264_changesps=removesei -map_metadata -1 out.mp4
</code></pre>

<p><strong>#2</strong> Use mp4box from the <a href="https://gpac.wp.mines-telecom.fr/downloads/" rel="noreferrer">GPAC</a> suite to strip the writing application metadata</p>

<pre><code>mp4box -add out.mp4 -new stripped.mp4
</code></pre>

CC BY-SA 3.0
2016-04-22T10:24:09.247Z
2016-04-22T10:24:09.247Z
Gyan
<p>Is it possible to remove certain information form a MP4 file? Specifically things like tagging and encoding dates, Writing library and application, Encoding settings... No client needs to know when I encoded something or what software and settings I've used.</p>

<p>My only guess was to remux the file with ffmpeg, but that only gets rid of the dates and replaces the writing application info with the more generic Lavf.</p>

<p>I'm on Windows, btw, but MacOS and Linux (Ubuntu) would work as well.</p>

<ffmpeg><encoding><mp4><x264>
Removing MP4 encoding information
eppic
# Removing MP4 encoding information

(Asked by: username_0 on 2016-04-22)

Is it possible to remove certain information form a MP4 file? Specifically things like tagging and encoding dates, Writing library and application, Encoding settings... No client needs to know when I encoded something or what software and settings I've used.

My only guess was to remux the file with ffmpeg, but that only gets rid of the dates and replaces the writing application info with the more generic Lavf.

I'm on Windows, btw, but MacOS and Linux (Ubuntu) would work as well.

**Tags:** ffmpeg, encoding, mp4, x264


---

## 2 answers

### Answer by username_2 on 2016-04-22. Score: 6 | Accepted answer

Regular ffmpeg won't do this. You'll need a combination of two tools to carry this out.
#1 Use ffmpeg from direct264, a modded version of an old ffmpeg build with a custom filter to modify H264 bitstreams. This build is crippled in most other ways, so rename it or don't put it in your path.
ffmpeg -i in.mp4 -vcodec copy -acodec copy -vbsf h264_changesps=removesei -map_metadata -1 out.mp4

#2 Use mp4box from the GPAC suite to strip the writing application metadata
mp4box -add out.mp4 -new stripped.mp4


---

### Answer by username_1 on 2019-05-13. Score: 13

Use bitstream filter filter_units with ffmpeg 4.0 or newer.
ffmpeg -i INPUT -c copy -bsf:v 'filter_units=remove_types=6' OUTPUT

P.S.
/* NAL unit types */
enum {
    H264_NAL_SLICE           = 1,
    H264_NAL_DPA             = 2,
    H264_NAL_DPB             = 3,
    H264_NAL_DPC             = 4,
    H264_NAL_IDR_SLICE       = 5,
    H264_NAL_SEI             = 6,
    H264_NAL_SPS             = 7,
    H264_NAL_PPS             = 8,
    H264_NAL_AUD             = 9,
    H264_NAL_END_SEQUENCE    = 10,
    H264_NAL_END_STREAM      = 11,
    H264_NAL_FILLER_DATA     = 12,
    H264_NAL_SPS_EXT         = 13,
    H264_NAL_AUXILIARY_SLICE = 19,
};

> **Comments:**
> **username_2**: Yes, this is now directly possible.  

---

