UE 5.4 Media Player not looping for specific file

Hello, I need help finding the right encoding settings for my video. I can get it to play. However, it will not loop. When I try targeting a different media file, it will play and loop.

Attached below is the media file that is having trouble and will not loop. I’m using Davinci resolve. Here’s my question: What can I do to fix the encoding? What tools could I use to analyze the encoding and identify problems with it?

I would love to upload the correctly working media file, but it’s a part of a paid asset. I don’t want to upload something I don’t own. If there are tools to analyze that file, I could report the stats here.

Thank you!

As an update, I’ve found that MP4s that feature these two fields will not loop. You can view the Codec data by using VLC. Load the video and do Tools > Codec Information.

An mp4 that excludes these fields does loop.

However, I do not yet know how to strip those two fields from MP4s.

I was able to strip the color metadata fields using ffmpeg.

ffmpeg -i GliderTutorial.mp4 -map_metadata -1 -c copy GliderTutorial2.mp4

However, despite the video stream matching the mp4 that works correctly, this did not cause the video to loop.

Okay! I think I finally got it. I had to switch to the Electra player to finally get it to loop!

To summarize:

  1. Render your video from Davinci Resolve to your Movies folder
  2. Open a console and cd to the Movies folder
  3. Run:
ffmpeg -i Movie.mp4 -map_metadata -1 -c copy Movie-fixed.mp4

3a. You can confirm the color metadata was stripped by running the following command. It should report that each field is unknown.

ffprobe -v error -select_streams v:0 -show_entries stream=color_primaries,color_trc,color_space -of default=noprint_wrappers=1 Movie-fixed.mp4
  1. Enable the Electra Player plugin if not already.

Also, here is the command in batch format in case you want to skip opening a terminal. You can just drag and drop your video file onto the .bat file, and it will automatically copy and fix it for you. Easy!

@echo off
setlocal

:: Check if a file was dragged onto the .bat file
if "%~1"=="" (
    echo Please drag and drop an MP4 file onto this script.
    pause
    exit /b
)

:: Get the full input file path
set "input=%~1"

:: Get the file name without extension
set "filename=%~n1"

:: Get the file extension (in case you want to check it's actually .mp4)
set "ext=%~x1"

:: Build the output file name: {NAME}-Fixed.mp4
set "output=%~dp1%filename%-Fixed.mp4"

:: Run ffmpeg command
ffmpeg -i "%input%" -map_metadata -1 -c copy "%output%"

echo Done.
pause