VBA从Powerpoint演示导出嵌入式视频 [英] VBA Export embedded video from Powerpoint presentation

查看:253
本文介绍了VBA从Powerpoint演示导出嵌入式视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将整个演示文稿转换为HTML,解压所有嵌入式内容等。我有文字,音频,叙述等都可以正常工作,但无法找出如何导出视频内容。

I'm trying to convert an entire presentation to HTML, extracting all the embedded content etc along the way. I've got text, audio, narrations etc all working fine but am having trouble finding out how to export video content.

我循环播放演示文稿中的所有幻灯片,然后幻灯片上的所有形状,寻找类型为 msoMedia 的形状。如果我找到一个,那我检查它是 MediaType 。如果它是 ppMediaTypeMovie ,那么我可以使用 Shape.LinkFormat.SourceFullName 找到外部链接的视频文件的源文件,但是我无法为我的生活找出如何访问EMBEDDED的内容。

Im looping through all slides in the presentation, then all shapes on the slide, looking for shapes of type msoMedia. If I find one, then I check it's MediaType. If it's ppMediaTypeMovie, then I can find the source file of an externally linked video file using Shape.LinkFormat.SourceFullName, but I can't for the life of me find out how to access EMBEDDED content.

如果我找到一个 MediaType ppMediaTypeSound 然后我可以使用 Shape.SoundFormat.Export 导出音频。有人知道VIDEO形状的等价物吗? (没有 Shape.VideoFormat )我花了几天时间查看每个可能的数据成员,但无效。

If I find a shape with a MediaType of ppMediaTypeSound then I can use Shape.SoundFormat.Export to export the audio. Does anybody know of an equivalent for VIDEO shapes? (There's no Shape.VideoFormat) I've spent days looking through every possible data member I can but to no avail.

推荐答案

无论如何,微软将媒体文件的内容解压缩到临时文件夹,嵌入式视频仍然为提取的视频提供了LinkFormat.SourceFullName:

It appears Microsoft extract the contents of the media file to a temporary folder anyway, and embedded videos still provide a LinkFormat.SourceFullName to the extracted video:

?oshape.LinkFormat.SourceFullName

C: \Users\Alex\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.MSO\F26FF1D0.m4v

所有我需要做的是通过ffmpeg触发这个文件,并且我有我的视频,我想要的格式

All that I need to do is fire this file through ffmpeg and I've got my video, in the format I want!

感谢您的帮助:)

这篇关于VBA从Powerpoint演示导出嵌入式视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆