PowerPoint cannot embed video in selected file - solution

When creating a presentation using PowerPoint, you may encounter the problem of not being able to embed a video into the selected file. This may prevent you from displaying your video content, but don’t worry, we’re going to provide some solutions to fix this.

Here are some possible causes and solutions for this issue:

  1. File format not supported: PowerPoint only supports specific video file formats, such as AVI, WMV, MP4, etc. If the video file you choose is not in one of these formats, PowerPoint will not be able to embed it. You can try converting the video to a supported format for embedding in PowerPoint.

    ' 使用VBA转换视频格式示例
    Sub ConvertVideoFormat()
        Dim videoPath As String
        videoPath = "C:\路径\至\视频文件.mp4"
        
        ' 创建Shell对象
        Dim shell As Object
        Set shell = CreateObject("WScript.Shell")
        
        ' 执行命令行转换
        shell.Run "ffmpeg -i " & videoPath & " -c:v wmv2 -b:v 2M -c:a wmav2 -b:a 192k " & Replace(videoPath, ".mp4", ".wmv")
    End Sub
    ```
    
    以上示例代码使用FFmpeg进行视频格式转换。您需要安装FFmpeg,并将其路径添加到系统环境变量中。
    
    
  2. Missing video codec: If your computer lacks the appropriate video codec, PowerPoint will not be able to embed the video. You can try to install an appropriate codec to enable PowerPoint to read and embed video files correctly.

Guess you like

Origin blog.csdn.net/HackWhisper/article/details/133483880