Bug 157440 - Impress slide images, group exported by HTML are different than single slide export, causing transition bleed through / transparency in Shotcut.
Summary: Impress slide images, group exported by HTML are different than single slide ...
Status: CLOSED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL: https://forum.shotcut.org/t/dissolve-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-25 13:55 UTC by Charlie
Modified: 2024-01-25 05:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Video clip showing the background video showing through the slide (3.70 MB, video/mp4)
2023-10-11 17:22 UTC, Charlie
Details
One of the slides that shows through (205.30 KB, image/jpeg)
2023-10-11 17:28 UTC, Charlie
Details
Slide without the problem, exported as single slide (269.61 KB, image/jpeg)
2023-10-11 17:34 UTC, Charlie
Details
Sample of presentation that made the slides. (851.09 KB, application/vnd.oasis.opendocument.presentation)
2023-10-12 09:28 UTC, Charlie
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charlie 2023-09-25 13:55:34 UTC
Description:
    I've been making presentation videos for a speaker, adding the slides from a PowerPoint presentation over the video of the speaker at the appropriate time for over a year.  I'd import the PowerPoint presentation into Impress, reformat them to a size that fit the video dimensions and output the slides for the video. It seems the only way to do a group export is outputting the presentation to an html by following the help article "Export LibreOffice Impress Slides as Images," getting img0, img1, ..., and deleting all the extra file types.  But those slide/images are not the same .jpg or .png as I would get if I exported them one at a time. This shows up in Shotcut when I transition from one slide to the next (like when adding a bullet point). During the dissolve the speaker shows up as a background ghost. (Shotcut notes. These slides are on V2 above V1 so I can move the slides backwards and forward to time the transitions with the speaker's voice.) This doesn't happen if the slides are output from Impress as single slides. I did not have this problem the start of last spring but I'm not sure what I might have been doing differently or what versions I was running. There are often 40-60 slides to a presentation so I'm sure I didn't export them all one at a time. 

Steps to Reproduce:
1.Output presentation as HTML (or as singles for comparison). I've output jpg and png with same results
2. Pull them into shotcut. place them on V2 track, and slide to overlap them for a transition. 
3.

Actual Results:
 If either one of the 2 images were put out as html the image below bleeds through. 

Expected Results:
 If neither were made by html export then they transition fully opaque as they should. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Found it with LibreOffice 7.5.3.2 (x86_64), Shotcut 23.07.23, Win10 Pro 64bit on a Dell Optiplex 7040. 
  This behavior is the same in LibreOffice 7.6.1.
  Opening the "see through" image in Gimp and exporting it to the same or another file type, edited or unedited, did not fix the problem. 
  I've done over 40 presentations using Impress, but had taken the summer off and  this problem was there when I started late Aug and I just figured out it wasn't Shotcuts problem.
Comment 1 Stéphane Guillou (stragu) 2023-10-11 13:50:50 UTC
Thank you for the report, Charlie.

I just tested with some sample slides and could not reproduce in:

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_AU.UTF-8); UI: en-US
Calc: threaded

The resulting PNG files in the HTML export directory all had the default opaque white background.

Could you please:
- check what background the slides in the presentation are using?
- attach an example file to this report, that shows the problem when exported as HTML?
- also attach a sample exported picture that has the issue, as well as a single-slide export that does not have the issue
- paste here the full version information from Help > About LibreOffice

As a temporary workaround, can I suggest trying to export as SVG? (You would have to select all the slides in the left-hand-slide slide picker beforehand.)

And I assume you used this article for instructions? https://www.libreofficehelp.com/export-libreoffice-impress-slides-images/
Comment 2 Charlie 2023-10-11 17:22:31 UTC
Created attachment 190152 [details]
Video clip showing the background video showing through the slide
Comment 3 Charlie 2023-10-11 17:28:16 UTC
Created attachment 190153 [details]
One of the slides that shows through

This is one of the slides output as HTML. High or low resolution didn't change the problem of the background video showing through on transition.
Comment 4 Charlie 2023-10-11 17:34:14 UTC
Created attachment 190154 [details]
Slide without the problem, exported as single slide

Even if only one of the 2 transition slides has the show though problem, the video behind shows though. But if both were exported to jpeg or png there wasn't a show through problem.
Comment 5 Charlie 2023-10-11 17:40:43 UTC
The backgrounds are imported with the original .pptx which I change to 16:9 in Impress to fit the video.
Comment 6 QA Administrators 2023-10-12 03:17:33 UTC Comment hidden (obsolete)
Comment 7 Stéphane Guillou (stragu) 2023-10-12 05:27:49 UTC
Thanks for the files.

I can see in Shotcut that the two different JPG you provide will behave differently when they have some overlap. Both of them will have the "Dissolve" transition applied automatically on the overlap, but for the HTML-exported pictures, the background becomes visible during the transition, like in your video.

So I can confirm your issue with the files your provided, but I am unsure if it needs solving on LO's end or on Shotcut's end.

I tried getting the same kind of exports on my end but I couldn't: I get the same as the "good" single-slide export for the two methods.

Version: 7.5.7.1 (X86_64) / LibreOffice Community
Build ID: 47eb0cf7efbacdee9b19ae25d6752381ede23126
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

I even tried with a build at 26a8966b07f6335450ddbf4b0f5d5206db43bcbf to have a similar version to yours.

ImageMagick identify between the provided pictures:
- single slide export: JPEG 1821x1024 1821x1024+0+0 8-bit sRGB 276082B 0.000u 0:00.000
- HTML export: JPEG 1920x1079 1920x1079+0+0 8-bit sRGB 210232B 0.000u 0:00.000

... so I have no idea what the difference between the two files actually is.

Can you also send a sample of the presentation file itself? (ODP)

My version of Shotcut is 23.09.29.
Comment 8 Charlie 2023-10-12 09:28:03 UTC
Created attachment 190164 [details]
Sample of presentation that made the slides.

  While it's possible the problem is Shotcut's, I spent a lot of time trying to find where something was set in Shotcut, or what order or how I loaded things that might be the problem, but couldn't and the problem seemed to stop from time to time. Then I found consistently it was the slides from Impress that were different somehow. Google slides doesn't export or save to html and I don't have other video editing software that can export a presentation to html. Of course, being able to group export to images in Impress would be a big help since these presentations have over 50 slides. I tried a Shotcut version from the spring with no change. and tried updating to current LibreOffice version, Windows 10, after I finally found the problem but nothing improved.  
   My latest workaround, I tried uploading the Impress file to Google Slides and downloading each page as an image. Fewer keystrokes/clicks than Impress export, but the font and/or text box size changes slightly on the upload causing last letters to often wrap to a new line so kind of a toss up in which is more work.  In the not-your-problem department, outputing the whole thing as a pdf looks fine but when using Acrobat Pro 2022 to export the pages as images, the slides squeeze back to 4:3 format (distorting the fonts, or images etc.). Google Slides output to pdf, even if it never touched Impress, uploading the Powerpoint did the same thing, looked find until trying to get single pages out as images.
  I gave a quick try of SVG output. It put all the slides in a single file and saving the page to get single images was not fewer keystrokes and each image was 6mb and wouldn't work in Shotcut.  I might have missed something of course.
Comment 9 Stéphane Guillou (stragu) 2023-10-12 10:56:17 UTC
Thank you for the sample file, I will have another look.

Regarding supporting image export of all slides at once, there already is an enhancement request in bug 48015.
As a temporary workaround, you can try this extension: https://extensions.libreoffice.org/en/extensions/show/export-as-images
Comment 10 Stéphane Guillou (stragu) 2023-10-26 11:29:23 UTC
I could reproduce the same issue with your example slides, exporting them myself with the two different methods.
I found the behaviour to be the same with OOo 3.3, so it is not something new.

However, I have found that the issue probably originates from a Shotcut change, see this thread: https://forum.shotcut.org/t/dissolve-transition-in-images-over-a-video-have-a-weird-transparency-effect/26390
Although there is talk there that it does not affect jpg because it relates to differing alpha channels. In our case, even transitioning between two copies of the _same_ picture shows the issue, so it must be something different, but I haven't been able to find out what it is (I tested different filenames, JPG qualities, sizes, single-colour background...).

I would recommend reporting the JPG issue on their forum, providing the two picture samples for them to investigate, and mentioning the other post I've linked above. Report it here: https://forum.shotcut.org/c/bug/
And please link the post here once it is reported.

Thank you!
Comment 11 Dan Dennedy 2023-10-27 20:06:11 UTC
What an interesting bug that appeared to me in my "Shotcut" Google Alert. I found the problem and a workaround. The problem occurs when the aspect ratio of the image does not match the video project - 16:9 in this case. In fact, neither JPEG is exactly 16:9, but the `img0 single slide export.jpeg`is close enough while `img0 group export as HTML.jpg` is not. When the aspect ratio does not match, Shotcut pads the source image with transparent black before any transition mixing or track compositing/blending.

Both the transition mixer and track compositor are sensitive to the alpha channel. This is how one can transition between two pieces of text or images with transparent parts over a video track below. There is some behavior difference when the transition receives an image with or without an alpha channel. In the single slide export case, the transition does not receive an alpha channel and in the HTML export case it does due to this padding from a mismatching aspect ratio.

I am not certain this is a bug for either project. It is somewhat an artifact of something that is paper document oriented such as Impress (Slide Properties) mismatching the video/screen paradigm, although that concept for a presentation program is dated. Maybe one can workaround this problem in Impress by slightly changing the dimension in slide properties, but I cannot tell you how. But in Shotcut, the workaround is to add to each transition the **Alpha Channel: Adjust** video filter and set its **Mode** to **Threshold**. This makes the transition's output opaque.