1
votes

I'm just barely getting started with ooxml, working off of someone else's code (in F# which I'm only tangentially familiar with), and on a deadline so forgive me if this is a dumb question.

I have a pptx powerpoint file with two items on it. An embedded image, and an embedded video.

As best as I can tell, when using the OpenXml SDK to parse the file, both videos and images appear as DocumentFormat.OpenXml.Presentation.Picture.

How do I differentiate which is actually a video?

1
This might be a clue? stackoverflow.com/questions/12504010/… Unfortunately, my understanding of ooxml is so bare that I don't quite know what this is talking about at the momentGeorge Mauer

1 Answers

1
votes

Look inside the PPTX itself for a direct look at what the SDK is interpreting and passing back to you.

If you add JUST a video to an otherwise blank presentation, there'll be both the video file and an image in the \media folder of the PPTX. The image is something PPT creates from the video ... it's the posterframe, what PPT shows you when the video isn't running.

I'm not positive but suspect that if there's a media[x].wmv file there, the poster image will be image[x].png (possibly a different extension, but same number [x], I think.

You can also look in:

\ppt\slides\_rels\slide[x].xml.rels



    <?xml version="1.0" encoding="UTF-8" standalone="true"?>

    -<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Target="../slideLayouts/slideLayout1.xml" 
Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout" Id="rId3"/>

<Relationship Target="../media/media1.wmv" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/video" Id="rId2"/>

<Relationship Target="../media/media1.wmv" Type="http://schemas.microsoft.com/office/2007/relationships/media" Id="rId1"/>

<Relationship Target="../media/image1.png" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/image" Id="rId4"/></Relationships>

Notice that images and videos/media have different Type="xxx" info.