Powerpoint 2016, export to mp4 with custom frame rate

Lord Brett Sinclair 21 Reputation points
2021-12-28T11:05:29.737+00:00

Good morning.
I use powerpoint for presentations.
I was able to ascertain that Powerpoint exports in mp4 with a framerate of 30.30 per second.
This causes me problems both when I have to edit with other applications (Blender for example) mp4 exported from Powerpoint, and when I have to work on Powerpoint by importing mp4s generated with other applications, with different framerates, for example at 25 frames per second.
I learned on web that there is the possibility of storing a macro that would allow you to customize the framerate before export. This is the syntax I found:
Sub PowerPointVideo ()
If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then
ActivePresentation.CreateVideo FileName: = Environ ("USERPROFILE") & "\ Desktop \ Your PowerPoint Video.mp4", _
UseTimingsAndNarrations: = True, _
VertResolution: = 1080, _
FramesPerSecond: = 25, _
Quality: = 100
Else: MsgBox "There is another conversion to video in progress"
End If
End Sub
However, when I give the "run" command, Powerpoint gives me the following error:
Run-time error '-2147466259 (80004005)':
Method 'CreateVideo'_Presentation' failed
I tried to replace "USERPROFILE" with my username, getting the same result.
I have Microsoft Office Home & Business 2016 on windows 10 pro.
I look forward to suggestions.
Best regards.
Antonio

PowerPoint Management
PowerPoint Management
PowerPoint: A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.Management: The act or process of organizing, handling, directing or controlling something.
224 questions
0 comments No comments
{count} votes

Accepted answer
  1. Emily Hua-MSFT 27,581 Reputation points
    2021-12-29T07:52:07.323+00:00

    Hi @Lord Brett Sinclair

    Welcome to Q&A forum.

    The following macro based on your sharing works normally on my test environment. I deleted some code, please check whether it is helpful to you.

    Sub test()  
    If ActivePresentation.CreateVideoStatus <> ppMediaTaskStatusInProgress Then  
    ActivePresentation.CreateVideo FileName:=Environ("USERPROFILE") & "\Desktop\3.mp4", _  
    UseTimingsAndNarrations:=True, _  
    DefaultSlideDuration:=10, _  
    VertResolution:=1080, _  
    FramesPerSecond:=25, _  
    Quality:=100  
    End If  
    End Sub  
    

    (The username could not be changed.)

    Besides, as the tag of "Office-powerpoint-itpro" focuses on general issue of PowerPoint client, as you have further issues of VBA, I will add the related tag "office-vba-dev".

    Thanks for your understanding.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



1 additional answer

Sort by: Most helpful
  1. Lord Brett Sinclair 21 Reputation points
    2021-12-30T12:42:49.39+00:00

    Hi Emily. Well done. It was a problem of path. I also checked the frame rate per second in the exported file and it is actually 25. Many thanks. Antonio