Bug 105168 - MPEG-2 Video (H.262) wont displayed in Impress on Windows
Summary: MPEG-2 Video (H.262) wont displayed in Impress on Windows
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Media-Playback
  Show dependency treegraph
 
Reported: 2017-01-07 11:12 UTC by bordfeldt
Modified: 2024-01-23 14:38 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
the affected odp (8.72 MB, application/vnd.oasis.opendocument.presentation)
2017-01-07 11:13 UTC, bordfeldt
Details
the affected video (8.71 MB, video/mpeg)
2017-01-07 11:14 UTC, bordfeldt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bordfeldt 2017-01-07 11:12:58 UTC
Description:
Mpg-video inserted in an impress-slideshow is not displayed anymore. Only a dark grey rectangle is shown. Sound is played. This video was correctly displayed in 4.4.1.2 (see bug 89762).

Steps to Reproduce:
1. Create a new impress document.
2. Change the first empty slide to a slide with title and content.
3. Load the (attached) video in the content field.
4. Click on the video, so the media-playback-toolbar opens.
5. Click on the play-button.
6. Sound is to hear. Video is not displayed.

Actual Results:  
Video is not displayed.

Expected Results:
Video should be displayed correctly.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Comment 1 bordfeldt 2017-01-07 11:13:34 UTC
Created attachment 130233 [details]
the affected odp
Comment 2 bordfeldt 2017-01-07 11:14:08 UTC
Created attachment 130234 [details]
the affected video
Comment 3 Xisco Faulí 2017-01-11 21:32:45 UTC
I can't reproduce it in

Version: 5.4.0.0.alpha0+
Build ID: 9a30cb2161506e003f14592d83075ab9d30516c1
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

Which OS are you using? is OpenCL enabled? have you tried to reset the profile?
Comment 4 bordfeldt 2017-01-13 15:29:36 UTC
OS: Windows 10 Pro
OpenCL options:
allow use of software interpreter: enabled -> disabling this options hat no effect on the problem
allow use of OpenCL: disabled
resetting the user profile didn't solve the problem
Comment 5 Buovjaga 2017-01-23 15:34:34 UTC
I think Xisco meant OpenGL. In any case, it is always best to copy & paste the contents of your Help - About, so we know what is going on in your system.

What do you use for video codecs? Do you use this highly respected thing: https://github.com/Nevcairiel/LAVFilters/releases
Comment 6 bordfeldt 2017-01-23 19:02:04 UTC
here my help -> about:
Version: 5.2.4.2
Build ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
Locale: de-DE (de_DE); Calc: group

openGL is disabled
Comment 7 Buovjaga 2017-01-24 05:17:42 UTC Comment hidden (obsolete)
Comment 8 bordfeldt 2017-01-25 06:55:29 UTC
I installed LAVFilters 0.69, but the problem still exists.
Comment 9 bordfeldt 2017-02-13 18:20:37 UTC
problem still exists in 5.3.0.3
Comment 10 Carlos 2017-03-29 19:37:57 UTC
I can confirm that the bug is present in
Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group
Comment 11 LibreTraining 2017-03-30 00:56:26 UTC
Tested on:

Version: 5.3.1.2 (x64)
Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group

Version: 5.3.2.1 RC2
Build ID: 7f6693c08cc110b9721245fc4bd4f1712e0c086c
CPU Threads: 4; OS Version: Windows 6.1; UI Render: default; Layout Engine: new; 
Locale: en-US (en_US); Calc: group

Version: 5.4.0.0.alpha0+
Build ID: 8681bd32d778585fc0da8f42a77aeb58cbae4308
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-03-29_02:52:19
Locale: en-US (en_US); Calc: group

All three work fine (on Windows 7 x64).


Generally when a media file plays, but you can only see the video OR hear the audio the problem is a codec issue.
If it were a media player issue the media would not play at all.
Since the media plays and you can hear the sound I suspect a codec issue on your computer.

It appears that LibreOffice tries to determine which codecs are supported on each OS.
But it does not always get it right, and some format/codec combinations do not work.
Each OS does not support all codecs which are allowed in a particular format (MP4, MPEG, WEBM, etc.)

So issue may be a codec issue on your particular computer, and/or a LibreOffice format/codec combo support guessing issue.


I tested your original file and some recoded different format/codec combinations.

- Original MPG - MPEG-2, MP2  
  (MPG format, MPEG-2 video codec, MP2 audio codec) 
  Works fine for me in LO
  Also tested in Windows Media Player - works fine

- MP4 - MPEG-2, MP2  
  (I direct-copied the streams into an MP4 container, not recoded)
  Video stream plays, audio stream does not play in LO
  Also tested in Windows Media Player - no sound, video plays
  So my Win7 does not support MP2 audio in an MP4 container.

- MP4 - AVC-x264, AAC 
  (recoded into MP4 container, AVC-x264 video codec, AAC audio codec)
  Plays fine in LO
  Plays fine in Windows Media Player

- WEBM - VP8, OPUS 
  LO says "The format of the selected file is not supported."
  Win7 does not support this natively.

- WEBM - VP8, Vorbis 
  LO says "The format of the selected file is not supported."
  Win7 does not support this natively.

- WMV - WMV2, WMA2 
  (Windows Media Video format, WMV2(8) video codec, WMA2(8) audio codec)
  Plays fine in LO
  Plays fine in Windows Media Player

If you want I can attach some of the test files.


There was another Win10 user in the Ask LO forum with a similar issue.
He had a video stop playing in LO on one Win10 machine, 
and still played fine on a different Win10 machine.
He fixed it with a codec repair tool.
So something damaged his codec configuration.
Encoding applications, media players, media editors, etc. - all may install codecs.

There are now two testers with no issues, and two testers with playback issues.

The fix may be related to codecs on your machine.
Does the original video play in Windows Media Player on your machine?

Another option may be to use a more popular format/codec combination.
Comment 12 Aron Budea 2017-08-17 22:21:54 UTC Comment hidden (obsolete)
Comment 13 Aron Budea 2017-11-27 02:30:03 UTC
Bug 89762 is Linux-specific, while this bug report is for Windows. For me (Win 7) it isn't displayed in any version back to 3.3.0, or in 6.0beta1. Sound is fine.
Comment 14 Yousuf Philips (jay) (retired) 2017-11-27 12:56:36 UTC
Yes the video in this particular mpg file wont play, though the audio will, even with KLite 13.6.0 (LAV 0.70.2.79) installed. This file is using the MPEG Video version 2 format (mpeg2 codec), while other mpgs using the MPEG Video version 1 format (mpeg1 codec), play just fine. e.g. < https://archive.org/download/test-mpeg/test-mpeg.mpg > 

https://en.wikipedia.org/wiki/MPEG_program_stream#Coding_structure

Windows 8.1
Version: 6.0.0.0.alpha0+
Build ID: 7315f325ff7ada3d6bd85a471058fdaeaff8cdb0
CPU threads: 4; OS: Windows 6.29; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2017-09-17_05:38:00
Locale: en-US (en_US); Calc: group

Media Info data
--------------------------------
Format                      : MPEG-PS
File size                   : 8.71 MiB
Duration                    : 18 s 720 ms
Overall bit rate mode       : Variable
Overall bit rate            : 3 901 kb/s

Video
ID                          : 224 (0xE0)
Format                      : MPEG Video
Commercial name             : HDV 720p
Format version              : Version 2
Format profile              : Main@High 1440
Format settings             : BVOP
Format settings, BVOP       : Yes
Format settings, Matrix     : Default
Format settings, GOP        : Variable
Duration                    : 18 s 720 ms
Bit rate mode               : Variable
Bit rate                    : 3 567 kb/s
Width                       : 1 280 pixels
Height                      : 720 pixels
Display aspect ratio        : 16:9
Frame rate                  : 25.000 FPS
Color space                 : YUV
Chroma subsampling          : 4:2:0
Bit depth                   : 8 bits
Scan type                   : Progressive
Compression mode            : Lossy
Bits/(Pixel*Frame)          : 0.155
Time code of first frame    : 00:00:00:00
Time code source            : Group of pictures header
GOP, Open/Closed            : Open
Stream size                 : 7.96 MiB (91%)

Audio
ID                          : 192 (0xC0)
Format                      : MPEG Audio
Format version              : Version 1
Format profile              : Layer 2
Duration                    : 18 s 720 ms
Bit rate mode               : Constant
Bit rate                    : 256 kb/s
Channel(s)                  : 2 channels
Sampling rate               : 48.0 kHz
Compression mode            : Lossy
Stream size                 : 585 KiB (7%)
Comment 15 LibreTraining 2017-11-30 00:26:42 UTC
 
It appears that a standard Windows installation does not support MPG-2.

"... Because Microsoft Windows operating systems provide only an MPEG-1 video decoder, Windows Media Player cannot play MPEG-2 program streams without an additional MPEG-2 video decoder ... "

Info found here:
https://support.microsoft.com/en-us/help/316992/file-types-supported-by-windows-media-player


I also found why it does work on my Windows 7 x64 machine.
Using the free GSpot Codec Information Appliance application I determined that playback was using a MainConcept codec which is installed with their encoding application.
It could also be played using a Ulead codec installed with my free Toshiba DVD app.


So regarding MPEG-2 Video playback in Impress on Windows:
- Default Windows installations will not play MPG-2 video streams
- DVD applications will install a codec which will work 
- Microsoft has (or had) a DVD decoder pack which will install the needed codec


Note: I assume you should use the free GSpot Codec Information Appliance application to confirm that you have no working decoder path available for that video and that this is the issue.
And then install a DVD application or an advanced encoding application to see if it starts working as expected.

Also, GSpot can be used to see which codecs are currently installed on your system.
Comment 16 Yousuf Philips (jay) (retired) 2017-11-30 10:38:15 UTC
Guess i should have been clearer about this in comment 14, KLite provides ffmpeg/LAV codecs, including a MPEG-2 video decoder which is able to playback the video of attachment 130234 [details] just fine in a media player, so not sure why LO is having a problem playing it back.

Microsoft has a MPEG-2 video decoder according to the link below, but dont know how you'd get it
https://msdn.microsoft.com/en-us/library/windows/desktop/dd390679(v=vs.85).aspx
Comment 17 LibreTraining 2017-12-01 01:55:28 UTC
(In reply to Yousuf Philips (jay) from comment #16)
> ...
> playback the video of attachment 130234 [details] just fine in a media
> player ...

... "a media player" ... ?

Which media player?
Many media players have their own built-in codecs.
DirectShow is not involved in that case.
So using many players to test is not going to give useful results.

I test with Windows Media Player (WMP).
WMP is going to use the same codecs and splitters available to the operating system.
If it plays in WMP, it should play in LibreOffice.

Have you tested with Windows Media Player?


Also I would like to see if you installing the same MainConcept encoding app that I have installed would solve the issue on your test system.
I can upload it somewhere (~65MB) if you would like to test.
Comment 18 Yousuf Philips (jay) (retired) 2017-12-02 12:13:40 UTC
(In reply to LibreTraining from comment #17)
> Which media player?

Zoom media player.

> Many media players have their own built-in codecs.
> DirectShow is not involved in that case.
> So using many players to test is not going to give useful results.

Most media players dont bundle their own codecs, but yes if it did bundle its own codecs, like VLC, then it wouldnt be relevant in this case, but Zoom media player doesnt.

> I test with Windows Media Player (WMP).
> WMP is going to use the same codecs and splitters available to the operating
> system.
> If it plays in WMP, it should play in LibreOffice.
> 
> Have you tested with Windows Media Player?

Didnt test with WMP as it doesnt solely rely on DirectShow to playback videos.

> Also I would like to see if you installing the same MainConcept encoding app
> that I have installed would solve the issue on your test system.
> I can upload it somewhere (~65MB) if you would like to test.

No dont have the MainConcept encoding app installed, but if you can point me to where i could download it, i'd gladly test it.
Comment 19 Telesto 2017-12-02 13:51:58 UTC Comment hidden (off-topic)
Comment 20 Buovjaga 2017-12-02 14:50:26 UTC Comment hidden (off-topic)
Comment 21 Yousuf Philips (jay) (retired) 2017-12-02 22:48:38 UTC Comment hidden (off-topic)
Comment 22 LibreTraining 2017-12-03 02:11:32 UTC
(In reply to Yousuf Philips (jay) from comment #18)
> (In reply to LibreTraining from comment #17)
> > 
> > Have you tested with Windows Media Player?
> 
> Didnt test with WMP as it doesnt solely rely on DirectShow to playback
> videos.
Regardless, if it plays in Windows Media Player it should play in LibreOffice.
That test tells us that Windows knows how to play this file.
On my system it plays in WMP and in LO.
If this is not a valid test, I would like to know.
I would expect your WMP to not play the file.
If it does, that tells us something useful.
 
FYI, Zoomplayer installs many of the same all-in-one codec packages that are included in VLC and other players. 
If I remember correctly, all-in-one codec packages like FFDShow, etc. do not work with WMP, and similarly with Windows OS itself.
It will take about 1 minute.
Please test with Windows Media Player.


> > Also I would like to see if you installing the same MainConcept encoding app
> > that I have installed would solve the issue on your test system.
> > I can upload it somewhere (~65MB) if you would like to test.
> 
> No dont have the MainConcept encoding app installed, but if you can point me
> to where i could download it, i'd gladly test it.
OK, I will upload it and post a link.
If your WMP works after that it tells us something.
If your LO works after that it tells us something.
Comment 23 Yousuf Philips (jay) (retired) 2017-12-03 10:52:47 UTC
(In reply to LibreTraining from comment #22)
> Regardless, if it plays in Windows Media Player it should play in
> LibreOffice.
> That test tells us that Windows knows how to play this file.
> On my system it plays in WMP and in LO.
> If this is not a valid test, I would like to know.
> I would expect your WMP to not play the file.
> If it does, that tells us something useful.

As mentioned in 62408 comment 39: 'LO only supports playback through DirectShow filters, while "Windows Media Player supports the Media Foundation framework besides DirectShow".'

> FYI, Zoomplayer installs many of the same all-in-one codec packages that are
> included in VLC and other players. 

Yes i'm aware of the install center which installs the codecs to the system.

> If I remember correctly, all-in-one codec packages like FFDShow, etc. do not
> work with WMP, and similarly with Windows OS itself.
> It will take about 1 minute.
> Please test with Windows Media Player.

All the codec packs bundle LAV Filters.

> OK, I will upload it and post a link.
> If your WMP works after that it tells us something.
> If your LO works after that it tells us something.

Tested the file on WMP, and it shows it just like LO, gray frame during playback. So i tested it in Zoomplayer again and noticed the same gray frame, but it appears for a split second at the beginning, so it i possible that the sample file is corrupted at the beginning, as the mpeg-2 sample files here[1] all play file in WMP and LO. One difference that i did see in MediaInfo is that attachment 130234 [details] is using the mpeg-ps container.

[1] http://hubblesource.stsci.edu/sources/video/clips/
Comment 24 bordfeldt 2018-02-04 14:35:17 UTC Comment hidden (obsolete)
Comment 25 Buovjaga 2018-02-24 18:03:26 UTC
(In reply to bordfeldt from comment #24)
> Bug is still present in 6.0.0.3 on Windows 10.

I tested with https://github.com/Nevcairiel/LAVFilters/releases latest release. Grey frame is shown, but when I click play from the sidebar, the video is shown. Video also plays when starting slideshow.

Version: 6.0.1.1 (x64)
Build ID: 60bfb1526849283ce2491346ed2aa51c465abfe6
CPU threads: 4; OS: Windows 10.0; UI render: default; 
Locale: fi-FI (fi_FI); Calc: group
Comment 26 QA Administrators 2019-02-25 03:46:46 UTC Comment hidden (obsolete)
Comment 27 Timur 2020-10-05 10:39:09 UTC
Repro in Windows LO 7.1+ grey rectangle, also cannot play from the sidebar.
Comment 28 skidberna+documentfoundation 2020-10-14 20:22:36 UTC
Still having the same issue as the other posters in v6.4.6.2. Audio  plays, but video image does not. I tried insalling k-lite and LAVfilters. Is there a way to change the setting to enable vlc support on windows? I read about a google summer of code for that, but I can't seem to find any info on how to use it.
Comment 30 QA Administrators 2022-10-16 03:46:49 UTC Comment hidden (obsolete)
Comment 31 Matt K 2024-01-23 14:34:20 UTC
(In reply to skidberna+documentfoundation from comment #29)
> https://wiki.documentfoundation.org/Development/GSoC/
> Successfully_Implemented_Ideas#VLC_integration

I have VLC installed and LO doesn't support .mp4 files on Windows by default.  Please let me know if this should work somehow.
Comment 32 Buovjaga 2024-01-23 14:38:58 UTC
(In reply to Matt K from comment #31)
> (In reply to skidberna+documentfoundation from comment #29)
> > https://wiki.documentfoundation.org/Development/GSoC/
> > Successfully_Implemented_Ideas#VLC_integration
> 
> I have VLC installed and LO doesn't support .mp4 files on Windows by
> default.  Please let me know if this should work somehow.

The VLC support was never finalised properly and it was removed in 747856aa3dbe9d3a438a3b01fa631124ee057ae8