Not able to use alwaysAvailableFile with mp4 files containing audio (original) (raw)

Which version are you using?

v1.16.0

Which operating system are you using?

Linux amd64 Docker

Describe the issue

When enabling the new alwaysAvailable feature and providing a local video file via alwaysAvailableVideo, the container fails to start with an error. If I disable alwaysAvailable and run the container with the default configuration, everything works as expected.

I tested multiple MP4 files, including this example (1080p):
big_buck_bunny.mp4

Depending on the file, I see different errors at startup, for example:

ERR: invalid 'alwaysAvailableVideo': invalid stsc
or
ERR: invalid 'alwaysAvailableVideo': unexpected box 'tref'

This happens consistently when alwaysAvailable is enabled with a local file containing an audio channel.
I turned up the log level to 'debug' but don't get more information - there is just one single line.

My configuration: mediamtx.20260204.yml

Describe how to replicate the issue

  1. Use the latest MediaMTX Docker image.
  2. Create a configuration that enables alwaysAvailable and points alwaysAvailableVideo to a local MP4 file containing audio.
  3. Mount a local MP4 file into the container (for example big_buck_bunny.mp4).
  4. Start the MediaMTX container.
  5. Observe that the container fails to start and logs an error related to alwaysAvailableVideo.

MediaMTX configuration

... paths: live: source: publisher runOnReadyRestart: yes alwaysAvailable: true alwaysAvailableFile: "/data/intro.mp4" ...

MediaMTX logs

No response

Network dump

No response