Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

first frame for videos in next slides? #262

Open
ousia opened this issue Dec 28, 2022 · 9 comments
Open

first frame for videos in next slides? #262

ousia opened this issue Dec 28, 2022 · 9 comments

Comments

@ousia
Copy link
Contributor

ousia commented Dec 28, 2022

@Cimbali,

this PDF document contains a video on the second slide.

When the slide isn’t being the current one, there is no indication that the slide contains a video:

next-slide-fs8

Only when in current, video is played:

video-playing-fs8

Would it be possible that when slides contain videos the first frame could be displayed as next slides?

Many thanks for your help.

@ousia
Copy link
Contributor Author

ousia commented Dec 28, 2022

I have just noticed that slides may embed audio in slides with text and/or images.

This uncompressed PDF document with audio on second slide gives the following:

una-now-fs8

Maybe a way to do this would be to add a play sign:

uncomp-audio-fs8

Just in case it might help (it could be a workaround for video too).

Many thanks for your help.

@ousia
Copy link
Contributor Author

ousia commented Dec 28, 2022

To test the button, you may use this PDF.

@ousia
Copy link
Contributor Author

ousia commented Dec 28, 2022

The new button is here:

media-play

I think it is a visible option for most of the color combinations (I have tested 😅).

Many thanks for your help.

@Cimbali
Copy link
Owner

Cimbali commented Mar 9, 2023

Thanks for your input @ousia !

Would it be possible that when slides contain videos the first frame could be displayed as next slides?

I have just noticed that slides may embed audio in slides with text and/or images.

So on this, I think it depends on whether the video is specifying:

  1. a placeholder (e.g. an image or something),
  2. the first frame of the video (typically done with a video started and immediately paused)
  3. nothing

I think it’s probably not great to add anything in situation 1., and in situation 2. we can reasonably only do this in the current slide, so adding a frame looking like a play button like you propose would be reasonable on the next-slides. In situation 3. I’m not entirely sure, the question is what the use case is: do people just not bother to put a placeholder but want one? Or do people intentionally want a transparent video frame that can then overlay other content? Anything we do in this latest case has to be presenter-side only and not content-side. Maybe if the overlay is very transparent (like 20%?) we can add it anyway?

@ousia
Copy link
Contributor Author

ousia commented Mar 9, 2023

Many thanks for your reply, @Cimbali.

Maybe if the overlay is very transparent (like 20%?) we can add it anyway?

Well, I proposed #646464bf (75% opacity), #64646432 (20% opacity) would be hardly visible in most cases.

I see your point about not adding extra elements to the slides, but I think it might make sense in some situations.

Embedded audio doesn’t really have anything to display (but just to play), such as in this PDF document.

In that document, the screen annotation has a zero-size /Rect [ 86.61913 5.551174 86.61913 5.551174 ].

For those cases, having an image such as the one above (with #646464bf) could be fine

When you have video (such as in this PDF document), the screen annotation needs a visible rectangle to display the image.

In the document with video, it includes /Rect [ 10.36114 10.36114 435.5541 435.5541 ].

At least in the video sample, autoplay is enabled and no icon is included (for what it should be a pushbutton, according to the spec).

Just in case it might help.

@Cimbali
Copy link
Owner

Cimbali commented Mar 9, 2023

You’re right, I haven’t looked at the spec to figure out if there’s something defined there. However it doesn’t look like annotations’ appearance characteristics dictionaries (the MK field in Screen annotations) are accessible currently through Poppler. I’m already having a hard time getting additional action info merged even by writing it all out myself… I think for now we have to figure out a sensible default that does not rely on extracting more info from the PDF, unfortunately. That should include what the default values are in the spec.

Basically, I’m worried about people intentionally setting an intentionally-transparent playable annotation on top of other content. Is it OK, or too annoying, to set an overlay on top like you propose (on the presenter side only)? This also should take into account that we currently don’t implement “poster” or “first frame” display.

Also zero-sized rects are kind of annoying -- if you don’t have autoplay, then there’s no way of activating that annotation, as there is no real area on which to click. Even with the button you propose, I thought of imagined it being on the area defined by the annotation rect. Otherwise it gets really messy as soon as you have e.g. 2 sounds on the same page.

Starting from #273 we no longer get a black rectangle on annotations playing audio files, does that mean (if you’re generating these PDFs yourself) that you could now have these annotations have a non-zero area?

@ousia
Copy link
Contributor Author

ousia commented Mar 11, 2023

@Cimbali,

many thanks for your reply.

Zero sized rects might make sense when there is nothing to be displayed and any media contained in them is auto-played (otherwise, I agree, such rects would be pure nonsense).

I realize I forgot to explicitly tell the most important feature of my proposal: it should be added only in next slides that contain media, the current slide should always be displayed with no additions (to anyone, including the presenter) .

I intend the overlaid media logo to be a warning for the presenter, such as “next slide x contains media”.

I hope it is clearer now and it might make more sense to adapt it.

@Cimbali
Copy link
Owner

Cimbali commented Mar 13, 2023

I intend the overlaid media logo to be a warning for the presenter

I understand, but I still would prefer to only add something on the annotation area.

@ousia
Copy link
Contributor Author

ousia commented Mar 13, 2023

I intend the overlaid media logo to be a warning for the presenter

I understand, but I still would prefer to only add something on the annotation area.

Fine for me, but I think this could be problematic for the people who use that area to write annotations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants