Windows LibreOffice don't support MP4 and newer formats, Replace Legacy Direct Show framework

Decade old problem has been reported on 62408 – MP4 videos aren't handled in Windows (without additional codecs)


Hello, today had seen a post where a Reddit user was not able to import a video file into Impress 7.6. I could not believe at first that LO could not play MP4, a video format from 2001, but after testing with a Windows 10 22H2 could confirm it was true.

If you want to test, open Impress and add a Video to your slides, if you are on Windows, you will receive “Video is not supported”

Does Linux and MacOS face the same problem?

Only tested with MacOS, but I believe both support newer technology as GStreamer and AVFoundation (QuickTime was discontinued) are still being updated and are the standard video framework on their respective system (MacOS, not sure on Linux)

Why does Windows have this problem

LO Windows build uses Direct Show which was replaced by Media Foundation

Which Windows versions does Media Foundation support

Windows Vista, 7, 8, 8.1, 10, 11

What about Windows XP users

LibreOffice last supported version for XP users was 5.4 released in 2014, there isn’t much we can do about for them (if they still exist)
Documentation/System Requirements - The Document Foundation Wiki

Why is this a concern?

MP4 is now a universal standard on most cameras and voice recording apps, if you are taking a video or recording, you likely will receive a MP4 format. The same way how PNG is the default on cameras, and we can import PNG in our presentations

Open Source media frameworks which can be implemented on all OS

Extra

Docs fragmentation

Audio or Video This link is outdated/not complete, I believe “help” should be mirrored/replaced by LO Wiki which has more volunteer work → more up-to-date content and translations, and decreases documentation fragmentation as we have Wiki, Help, and Manual as different websites (Manual being the PDF)

Even thought LO uses Diátaxis approach, this fragmentation makes the user to give up the docs (or even LO for another office alternative) and seek Forum and third party communities (Reddit) for help

See how different are the other’s website with the Diátaxis method

Why wikis, where Docs in this post?

I’m posting wikis instead of docs because it is easier for a non-programmer to understand.

This post is in the wrong category

I’m not sure if this is the place to post, as the tags indicates this is about Docs, would be great a Suggestions, Bug report categories

If you read Michael Stahl’s comment in the decade-old report, many things already become clear.

MP4 is not a video format. It is a container format for various types of video and audio streams. These video and audio streams can be encoded with various codecs. The reason LibreOffice can not ship many older and still widely-used codecs is that they are a patent minefield.

MP4 files open just fine, if you have a media splitter & decoder installed. I typically recommend that Windows users install LAV Filters. It is working OK with LibreOffice in my Windows 11 virtual machine.

Bug 62408 should probably be closed and if there is some concrete proposal on using modern APIs, a new report should be created. I don’t know about the implementation details, but I can’t find any mention of DirectShow in the LibreOffice source code.

Matt pointed out in the dev chat that he is able to reproduce a hang related to DirectShow methods that don’t work:
https://opengrok.libreoffice.org/xref/core/avmedia/source/win/player.cxx?r=c0e51660#94

116643 – Crash when playing PPTX slide with MP4 video (comment 7) (no new comment added yet)

Matt struck gold with this find: Codec Objects - Win32 apps | Microsoft Learn
Apparently we could get support for many codecs for free on Windows just by switching the API!

1 Like