Video Is Not Showing when Adding It to a PowerPoint Presentation by Link in Python

Why isn’t the video showing? please help me track down the error.

def add_video_from_youyube(pres, videoId): #add videoFrame 
    link = "" + videoId;
    thumbnail_uri = "" + videoId + "/hqdefault.jpg" 
    f = urlopen(thumbnail_uri) 
    with urlopen(link) as videofile: 
        videoContent = 
        video = pres.videos.add_video(videoContent) # Add the Video Frame inside the slide 
        videoFrm = pres.slides[5].shapes.add_video_frame(50, 150, 300, 350, link) #Insert the MP$ video inside the Video Frame 
        videoFrm.embedded_video = video # Set the options of play mode and volume of the video 
        videoFrm.play_mode = slides.VideoPlayModePreset.AUTO 
        videoFrm.volume = slides.AudioVolumeMode.LOUD
        videoFrm.picture_format.picture.image = pres.images.add_image(
add_video_from_youyube(presentation, "FbzsPHJskcg")

Thank you for contacting support. I am working on the issue and will get back to you as soon as possible.

With Aspose.Slides for Python 23.8, I was unable to reproduce the problem. The video is showing.
My output presentation: (105.2 KB)
We need more details on how to reproduce the problem and help you.

Not working on android(microsoft 365, andr open office)/web

I’ve reproduced the problem you described. But I’ve also added the video to a presentation using PowerPoint manually by the link and found that the video also is not played in Office 365 on Android. It looks like videos added by links are showing only in Slide Show mode.

Is it possible to make the video appear directly in the presentation? In slide show mode it gives me a YouTube shortcut to the video

Could you please share a sample presentation where a video behaves as you expected?

Thank you for the presentation file. I will get back to you as soon as possible.

In the presentation you provided, the video was added from a local file (not by a link). This can be done like this:

slide.shapes.add_video_frame(20, 20, 300, 150, "sample.avi")

More details:

API Reference: VideoFrame class