<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/">
  <channel>
    <title>media-framework on stillcooking.dev</title>
    <link>https://stillcooking.dev/en/tags/media-framework/</link>
    <description>Personal portfolio and technical notes</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    
    <copyright>© 2026 stillcooking.dev — CC BY 4.0, https://creativecommons.org/licenses/by/4.0/</copyright>
    <lastBuildDate>Tue, 04 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://stillcooking.dev/en/tags/media-framework/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>Movie files in Content/Movies stay outside the pak — the two fields that change it</title>
      <link>https://stillcooking.dev/en/topics/unreal-engine/editor-tooling/movies-staged-outside-pak/</link>
      <pubDate>Tue, 04 Aug 2026 00:00:00 +0000</pubDate>
      
      <guid isPermaLink="true">https://stillcooking.dev/en/topics/unreal-engine/editor-tooling/movies-staged-outside-pak/</guid>
      <description>By default, staging copies files from Content/Movies outside the pak as NonUFS, which is why .mp4 files sit loose in the build directory. Turning on bSkipMovies and listing the file under UFSMovies pulls it inside, and playback through UMediaPlayer with FileMediaSource keeps working: WmfMedia on Windows reads through IFileManager, which can access files inside the pak.</description>
      <content:encoded><![CDATA[<p>Package a project, and the <code>.mp4</code> files from <code>Content/Movies</code> end up loose in the build directory, sitting next to the <code>.pak</code> and playable in any video player. That is not a staging oversight. It is the default behavior, written into the staging script. Two fields in Project Settings reverse it, and playback through <code>UMediaPlayer</code> using <code>WmfMedia</code> on Windows keeps working without a single edit to game code.</p>
<h2 id="the-default-is-nonufs-which-means-outside-the-pak">The default is NonUFS, which means outside the pak</h2>
<p>The rule lives in the staging script, not in engine code. <code>Content/Movies</code> is walked recursively: anything that is not a <code>.uasset</code> or a <code>.umap</code> gets staged, and the engine&rsquo;s own movies in <code>Engine/Content/Movies</code> go along with the project&rsquo;s. The staged type is <code>NonUFS</code> in every scenario except when using a file server (<code>CopyBuildToStagingDirectory.Automation.cs:1982-2011</code>). A comment a few dozen lines above leaves no room for interpretation (<code>:1971</code>):</p>
<div class="highlight" data-lang="csharp">
  <button type="button" class="code-copy" data-code-copy data-label="Copy" data-copied="Copied!" aria-label="Copy code to clipboard">Copy</button><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-csharp" data-lang="csharp"><span class="line"><span class="cl"><span class="c1">// NonUFS files are never in pak files and should always be remapped</span></span></span></code></pre></div></div>
<p>A <code>NonUFS</code> file is one that staging copies into the output directory and that the pak knows nothing about. Hence the loose <code>.mp4</code> files in the build. Packing them was always possible; nobody ever told staging to put them inside the pak.</p>
<h2 id="the-two-fields-that-reverse-it">The two fields that reverse it</h2>
<p>With <code>bSkipMovies</code> on, the script takes a different branch (<code>:2013</code>), where two explicit lists of movie names decide the staged type instead. In the editor they sit under Project Settings → Packaging → Advanced.</p>
<figure class="prose-figure prose-figure--medium">
  <img src="/screens/packaging-movies-settings.png" alt="The Project Settings panel in the Packaging → Advanced section, showing the labels of three fields: Exclude movie files when staging, Specific movies to Package, and Specific movies to Copy" loading="lazy" /></figure>
<p>The field names hide what they do:</p>
<div class="table-wrap">
  <table>
    <thead>
      <tr>
        <th>Field in the editor</th>
        <th><code>.ini</code> key</th>
        <th>Effect</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>Exclude movie files when staging</td>
        <td><code>bSkipMovies</code></td>
        <td>switches modes: from “everything as NonUFS” to “only what is listed”</td>
      </tr>
      <tr>
        <td>Specific movies to Package</td>
        <td><code>UFSMovies</code></td>
        <td>the file goes <strong>into the pak</strong></td>
      </tr>
      <tr>
        <td>Specific movies to Copy</td>
        <td><code>NonUFSMovies</code></td>
        <td>the file goes next to the pak, as before</td>
      </tr>
    </tbody>
  </table>
</div>
<p>The description for <code>UFSMovies</code> states this explicitly: <code>will still be added to the .pak file</code> (<code>ProjectPackagingSettings.h:513</code>). In <code>DefaultGame.ini</code> it looks like this:</p>
<div class="highlight" data-lang="ini">
  <button type="button" class="code-copy" data-code-copy data-label="Copy" data-copied="Copied!" aria-label="Copy code to clipboard">Copy</button><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-ini" data-lang="ini"><span class="line"><span class="cl"><span class="k">[/Script/UnrealEd.ProjectPackagingSettings]</span>
</span></span><span class="line"><span class="cl"><span class="na">bSkipMovies</span><span class="o">=</span><span class="s">True</span>
</span></span><span class="line"><span class="cl"><span class="na">+UFSMovies</span><span class="o">=</span><span class="s">Intro</span></span></span></code></pre></div></div>
<h2 id="why-playback-keeps-working">Why playback keeps working</h2>
<p>A movie inside the pak stops being a file the operating system can see. Only code that reads through <code>IPlatformFile</code> can reach it, and the pak is mounted there as another layer of the virtual file system.</p>
<p>Media Framework reads exactly that way. <code>UFileMediaSource</code> hands the path over as a URL with the <code>file://</code> scheme (<code>FileMediaSource.cpp:169</code>). <code>WmfMedia</code>, the player enabled by default on Windows, always opens such a URL through <code>IFileManager</code> and then passes the resulting byte stream to Media Foundation (<code>WmfMediaUtils.cpp:1285-1305</code>, <code>:1341</code>). Nothing in that chain needs the file on disk under its own name.</p>
<p>I checked this in my own build: an <code>.mp4</code> packaged inside the pak through <code>UFSMovies</code> kept playing at runtime through <code>UMediaPlayer</code> with <code>FileMediaSource</code>.</p>
<h2 id="when-this-matters">When this matters</h2>
<p>With one movie, the benefit is a cleaner build directory: the file stops sitting in plain view, and the output directory holds one archive instead of scattered assets alongside it. With a dozen or more it becomes the difference between a build you can scan at a glance and a file list you have to keep track of every time you distribute the build.</p>
<p>Verify this in a packaged build, not in PIE. In the editor every movie sits on disk, so the staging settings have no effect there at all.</p>
]]></content:encoded>
      
    </item>
    
  </channel>
</rss>
