Which video / audio codec for best support with LO?

Hello everyone,

I just have a small question related to video support in LibreOffice. I read in the online documentation that media support is realized from the hosting operating system which means on Windows by DirectShow as well as GStreamer on Linux. Out-of-the-box, GSteamer seems to support MP4 files with H264 video codec / AAC audio codec, which seems to be some kind of standard codec for most videos. Still, on Windows it does not work and this question is not intended to be a “why does LO not support MP4 videos”, even though LO could definitely improve its user experience by native support of default multimedia formats, but that’s a different story.

For the moment, I try to find some video / audio codec combination that works by default on Windows and Linux. I suspect that on Windows, the supported codecs without installing an additional codec pack are pretty much the same while on Linux, there might be a larger variation. Therefore I’m looking for a good codec combination to convert my videos with either FFmpeg or VLC. I found this question, but actually the given solution works well on Linux but on Windows 10, the video cannot be imported. I also tested a bit around, still I found nothing that works out-of-the-box on both plattforms.

So my question only is: Which video/audio encoding is the way to go for best out-of-the-box support on Windows and Linux?

Thanks in advance!

1 Like

The Wiki article that you rightfully cited has "What media is supported?
" section, that starts with these words:

The Summary can answer most of your questions!

… which link goes to Summary Wiki page, listing tested formats across different OSes (although obsolete, this seems to address your question).

But yes, the best solution would be built-in support for media formats, which is “a different story”, but very badly wanted.

Thanks for mentioning, simply overlooked this badge. It looks like an advertising banner which is an easy skip while reading the site. Exactly the thing I was looking for.
Still on Windows, the “fullscreen slideshow” column is all-red. Bad story, native support for MP4 (H264 + AAC) as the quasi-standard highly desired…

After Mike’s comment (thanks again), I found a solution which might be helpful for others having the same issue. The best option seems to be wmv encoding and a conversion with FFmpeg is pretty simple:

ffmpeg -i video.mp4 output.wmv

The resulting wmv-file can be imported and runs fine with Impress on both, Windows and Linux, at least according to my tests. By default, the quality might be not the best, so it could be useful to explicitly encode the video with a higher bit rate but also with an increased file size:

ffmpeg -i video.mp4 -b:v 800k output.wmv #bit rate 800 bit / s
ffmpeg -i video.mp4 -b:v 1M    output.wmv #bit rate 1 Mbit / s

Alternatively, the wmv2 video encoder (FFmpeg seems to have a wmv3 decoder but no encoder) could be used as well:

ffmpeg -i video.mp4 -c:v wmv2 output.wmv

Finally, also a video without audio can be created:

ffmpeg -i video.mp4 -an output.wmv

All of these seem to work fine with Impress on Windows and Linux.