Bug 157997 - LibreOffice Impress can't play audio files on Linux
Summary: LibreOffice Impress can't play audio files on Linux
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.5.7.1 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-31 04:11 UTC by David Morrison
Modified: 2023-11-04 07:11 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing the 00:00:00/00:00:00 data for the audio file (14.14 KB, image/png)
2023-10-31 04:11 UTC, David Morrison
Details
Screenshot showing the 00:00:00/00:00:00 data for the audio file in the sidebar (11.56 KB, image/png)
2023-10-31 04:12 UTC, David Morrison
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Morrison 2023-10-31 04:11:03 UTC
Description:
The LibreOffice Impress application fails to play any media files (at least) on Linux.  I've tried to play OGG, MP3, and WAV files.  I have confirmed as best as I can that I have all the correct plugins and the like installed.  The application fails both when there is embedded audio in the slide, as well as when trying to load a file from the Media Viewer.  In both cases, the audio file is displayed as 00:00:00/00:00:00, which seems to indicate that something is not loading and parsing the file (see the attached screenshots).

When running the nightly build and looking at the logs with the following invocation:

`SAL_LOG="+INFO-INFO.vcl-INFO.sal-INFO.drawinglayer" ./simpress &> log`

we see the following log entries:

```
create player, URL: file:///path/to/wav/file.wav
<snip>
No implementation for com.sun.star.uri.UriSchemeParser_file
No implementation for com.sun.star.uri.UriSchemeParser_file
No implementation for com.sun.star.uri.UriSchemeParser_file
No implementation for com.sun.star.uri.UriSchemeParser_file
No implementation for com.sun.star.uri.UriSchemeParser_file
...
```

As far as I can tell, UriSchemeParser_file is not actually a real thing that exists based on Google searching.  From a cursory look through the code, it seems like what is happening is that something in the [preparePlaybin](https://github.com/LibreOffice/core/blob/63a44ac83f0dbc792f71881e862c57e8037c84ae/avmedia/source/gstreamer/gstplayer.cxx#L592) function is deciding that the file:/// prefix is a URL and then dynamically loading a plugin to handle that particular scheme -- which, since it doesn't exist, fails, resulting in no audio being played.

I couldn't trace through the code enough to figure out a fix, though :(

Steps to Reproduce:
1. Open a new document
2. Insert -> Audio or Video -> pick a random audio file of your choosing
3. Try to play the audio file

Alternately,

1. Tools -> Media Player
2. Open button -> pick an audio file of your choosing
3. Try to play the audio file

Actual Results:
Nothing happens

Expected Results:
I should hear sound


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 50(Build:1)
CPU threads: 16; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
7.5.7-3
Calc: threaded
Comment 1 David Morrison 2023-10-31 04:11:49 UTC
Created attachment 190525 [details]
Screenshot showing the 00:00:00/00:00:00 data for the audio file
Comment 2 David Morrison 2023-10-31 04:12:30 UTC
Created attachment 190526 [details]
Screenshot showing the 00:00:00/00:00:00 data for the audio file in the sidebar
Comment 3 Buovjaga 2023-11-03 15:53:47 UTC
It works for me with a WAV file with gtk3 and kf5 UIs.

The only annoying thing is that the seeking bar in Sidebar Properties view is not updated when the sound plays. The seeking bar is updated when using the separate media player dialog from Tools.

Which Linux distribution are you using?
Which gstreamer packages do you have installed?

Arch Linux 64-bit, X11
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
7.6.2-3
Calc: threaded
Comment 4 David Morrison 2023-11-03 23:22:42 UTC
Oh hell.

I'm on arch linux.  I just (re-?) installed gst-plugins-good, and now magically everything is working.  I swear I tried this before and it didn't work.  Anyways, we can close this now.  Sorry for wasting your time :(
Comment 5 QA Administrators 2023-11-04 03:15:16 UTC Comment hidden (obsolete)