Description: Hi, I'm holding a monthly presentation with Impress for more than three years, containing three mp4 videos. Impress was playing this presentation without problem so far on my Mac Book, until Libreoffice 5.2. with 5.3 and 5.4 it can't play these videos anymore, just shows a gray window with a note symbol. Steps to Reproduce: 1. Have an impress presentation with an mp4 video 2. try to play it 3. get sad Actual Results: Does not show video Expected Results: Should show video Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided. (Please note that the attachment will be public, remove any sensitive information before attaching it. See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Created attachment 137568 [details] Demo video Freshly made empty presentation with just one blank slide with a video, made on Mac OS X with libreoffice 5.4.2.2 on Mac OS X 10.12.6 five minutes ago. Although libreoffice allows me to create this presentation, it does not play it. (I had a presentation with that particular video running with libreoffice for years.) Same file works with the linux edition of libreoffice.
Confirming also with Version: 6.0.0.0.alpha1+ Build ID: 57c5f980835f834f6ea96c6f5ca841b5372aa61d CPU threads: 4; OS: Mac OS X 10.13; UI render: default; Locale: fr-FR (fr_FR.UTF-8); Calc: group
Inserting a MP4 video in Impress in LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4 allows both slideshow playback and preview playback Regression
This problem must be dependent on the version with which the Impress file is made as my test file made with OOo3 can be opened and played in Version: 5.4.2.2 Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4 Threads CPU : 4; OS : Mac OS X 10.13; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Also confirmed in Version: 5.3.6.1 Build ID: 686f202eff87ef707079aeb7f485847613344eb7 Threads CPU : 4; Version de l'OS :Mac OS X 10.13; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR.UTF-8); Calc: group 1) Open Impress 2) Insert MP4 3) Try preview playback, then slideshow - no video playback.
Works correctly in Version: 5.2.7.2 Build ID: 2b7f1e640c46ceb28adf43ee075a6e8b8439ed10 Threads CPU : 4; Version de l'OS :Mac OS X 10.13; UI Render : par défaut; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Also works in Version: 5.3.1.2 Build ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2 Threads CPU : 4; Version de l'OS :Mac OS X 10.13; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Also works in Version: 5.3.4.2 Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3 Threads CPU : 4; Version de l'OS :Mac OS X 10.13; UI Render : par défaut; Moteur de mise en page : nouveau; Locale : fr-FR (fr_FR.UTF-8); Calc: group
Fails to play video or preview in Version: 5.4.0.3 Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c CPU threads: 4; OS: Mac OS X 10.13; UI render: default; Locale: fr-FR (fr_FR.UTF-8); Calc: group
Bibisect is in the range from 5.4 branchoff
Created attachment 137679 [details] bt from console log On MacOs 10.12 with master sources updated some days ago, I could reproduce this. I noticed this log on console: warn:avmedia:11266:8540134:avmedia/source/macavf/framegrabber.mm:66: AVGrabber::create() found no video content! I attached a bt from there.
Reproduced in Version: 5.3.5.1 Build ID: 020db1aa8142e57290f8a21e4df31185392d0e38 CPU Threads: 8; OS Version: Mac OS X 10.13; UI Render: default; Layout Engine: new; Locale: en-US (en_ES.UTF-8); Calc: group but not in Version: 5.3.4.2 Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3 CPU Threads: 8; OS Version: Mac OS X 10.13; UI Render: default; Layout Engine: new; Locale: en-US (en_ES.UTF-8); Calc: group
So a range would be: https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=f82d347ccc0be322489bf7da61d7e4ad13fe2ff3..020db1aa8142e57290f8a21e4df31185392d0e38
Created attachment 137834 [details] Diff of commits between branches 5-3-5 and 5-3-4
Initially I tried to build branch 5-3-5 but i couldn't because I'm using Sierra, so i decided to revert, in master, the commits one by one but I'm not able to find the culprit. Anybody has an idea of what's going on here?
Random scattershot guess: b49779db18fa094f3b2f4166ee93c072d2f117a1 or 4e461f61ac739c6b9ff38c247095ea69b9fb4e21
otherwise, changes to baseline would be another reason - Norbert might know
(In reply to Thorsten Behrens (CIB) from comment #17) > Random scattershot guess: b49779db18fa094f3b2f4166ee93c072d2f117a1 or > 4e461f61ac739c6b9ff38c247095ea69b9fb4e21 I thought b49779db18fa094f3b2f4166ee93c072d2f117a1 was the one too, but I reverted it locally and I got the same problem. Same with the other commit too, sigh!! Regarding the baseline, is there any way to prove it?
I can reproduce it in Version: 5.4.0.2 Build ID: 2b906d450a44f2bbe506dcd22c51b3fa11dc65fd CPU threads: 8; OS: Mac OS X 10.12.6; UI render: default; Locale: en-US (en_ES.UTF-8); Calc: group but not in Version: 5.4.0.1 Build ID: 962a9c4e2f56d1dbdd354b1becda28edd471f4f2 CPU threads: 8; OS: Mac OS X 10.12.6; UI render: default; Locale: en-US (en_ES.UTF-8); Calc: group Since i couldn't compile branch 5.3.5 on Mac, I'm going to try with this branch...
This is the range between 5.4.0.2 and 5.4.0.1 -> https://cgit.freedesktop.org/libreoffice/core/log/?h=libreoffice-5-4&qt=range&q=3cde28795a21f4aef2d5882406a3c53e09e67815 I went through the suspicious commits ( I ignored sw, sc and gpg commits) by reverting them and no luck @Cloph: Do you know if anything changed between 5.4.0.1 and 5.4.0.2 or between 5.3.4.2 and 5.3.5.1 to cause this bug?
My guess would be a4e81b7c313e5cb0e0f23a8605502b4b0b7f599e (Aug 4 2016). Library_avmediaQuickTime is preferred over the Library_avmediaMacAVF. Did we update the build bots to newer Apple SDKs around Jul 30 2017, or even a newer OS? I had a glance at the MacAVF plugin. All this AVPlayer based stuff is supposed to be handled async. My guess is the caching is simply not yet ready, when we try to take a screenshot for the preview image. Actually I don't see any real handling of the async "playable" or other status. Don't have really time to fix this, but a lot should be handled async, and there is just a minimal observer, when playback stops - as I understand the code.
Tor: following last Jan-Marek's comment (comment 22), thought you might be interested in this tracker.
No QuickTime in the 10.12 SDK Finally. It has been documented as deprecated for years, after all. https://cgit.freedesktop.org/libreoffice/core/commit/?id=a4e81b7c313e5cb0e0f23a8605502b4b0b7f599e
The video included in the attached document has file name extension .mp4 and is identified by the file command as "ISO Media, MP4 v2 [ISO 14496-14]" and the actual video data has dimension: 480 × 360, codec: H.264, AAC, duration: 00:24, frame rate: 29.97 fps, size: 1.2 MB. I tried inserting another file that has the extension .mov and is "ISO Media, Apple QuickTime movie, Apple QuickTime (.MOV/QT)" and the video data is 3840 × 1620, H.264, AAC, Timecode, 02:04, 29.97 fps, 724 MB. I.e. the same codec, but MUCH larger. It worked fine. Then I tried a third file, extension .mp4, "ISO Media, MP4 v2 [ISO 14496-14]", 1920 × 1080, H.264, 00:25, 29.97 fps, 64 MB. It did not work. So apparently it indeed is the kind of container that matters, not the codec.
Presumably the problem is in the avmedia/source/macavf code. Its author is not really active in either OpenOffice or LibreOffice any longer, sadly.
Comment #22 sounds correct. Not sure why the current code works for slightly differently encapsulated video file, though.
Hmm, my tests in comment #25 were with a sandboxed build of LO from the 5.4 branch. Now when I tried in a normal master build it doesn't even work for the video file for which it did work in that earlier test. Sad. Oh well, I doubt I personally will be able to spend any more time on this bug now.
I wonder if the currently unused FrameGrabber::create( const ::rtl::OUString& rURL ) function was supposed to be used originally, or perhaps if using that instead of calling the FrameGrabber::create( AVAsset* pMovie ) function from Player::createFrameGrabber() would be relevant in fixing this problem? Ah, inspecting git log shows that 75c804c1be8acf4c3fc9935b81e696918f33fd9d removed the use of that function. The log message also seems to confirm the idea that the code is wrongly structured, and should be re-factored to use the asynchronous APIs properly (waiting for stuff to be ready) see comment #22.
This probably will be fixed by https://gerrit.libreoffice.org/#/c/50390/1 .
As this bug report seems to be more narrow in scope, and definitively matches what I fixed in 1aa5a3874bf716acfbded2a09319dce5d4ce8c0d , let's mark this as resolved then.
It turned out that the alleged lack of proper use of asynchronous (or "lazy") system APIs in avmedia/source/macavf was not an issue after all, at least not for this issue, but the fix was a completely different one... Quoting the commit message: tdf#79546: Make sure temp copy of inserted media file keeps the same extension Inserting videos into Impress presentations with 'Insert>Audio or Video' did not work at all for me. This helps. It seems that the AVFoundation APIs are sadly rather picky about file name extensions. Why we need to make a temporary copy of the media file (which after all can be rather large) at all, when inserting it in a slide, I don't understand. But I am not going to dig into that now.