Free Support Forum - aspose.com

Media object upgrade in Video insertion in PPT

Hi Mudassir,

We have incorporated Aspose in our product and we ares still waiting for heap error to get resolved.


Anyways I want to ask today something else.When we insert a video using addVideoFrame can we insert a frame with “new media type object” supported in Office 2010 and 2013 which also support “media player controls bar” along with the video.Please look at screenshot below to get what do I mean.

http://i39.tinypic.com/15yvu35.jpg

I am using MS Office 2010 and windows 7.

In current Aspose functionality, the control bar below the video file only appears after someone double click the video file and then a message for “media object upgrade” appears and someone clicks upgrade.

Can we have this control bar without user interaction ? I mean an updated video frame object which Aspose still doesn’t support(Or may be I am unaware if it) ?


Any info Mudassir ?

Hi Mohit,

I have observed the requirement shared by you and like to share that when embedding videos using Aspose.Slides for Java in presentation, I am able to observe the media player controls. Please visit this documentation link for your kind reference. You can also observe from attached image in the link that controls are available.

Many Thanks,

Hi Mudassir,

Apologies for not clear enough earlier.

Visibility of Control doesn’t depend on the fact whether videos are embedded or not.You can yourself check this fact by inserting a linked video in Office 2010 and controls will appear instantly.

What we are looking for is a way to make these controls available on linked videos using Aspose API.By default when a linked video is created using Aspose API it doesn’t contain control.Although when user double clicks the video controls then appear after a dialog box pops up saying “Media Object upgrade”.This is not the default behavior when we create the Video slide manually using PowerPoint interface.All the videos whether linked or embedded get the controls bar instantly as soon as the video is inserted without any “Media Object Upgrade” message.

In my opinion(I could be wrong), PowerPoint uses two types of Video frame.One video frame which Aspose uses in addVideoframe method appears to be the older one.As soon as user double clicks the Video on the slide, a dialog box pops up saying “Media Object upgrade” which contains an OK button,when this OK button is clicked the newer video frame which contains the control bar by default takes the place of older video frame.

On the other hand if we uses PowerPoint interface, it directly uses the newer video frame without any conversion process and hence the control bar appears instantly without any dialog box.

Thanks and Regards
Mohit Garg

Hi Mohit,

I may need to investigate the requirement shared by you and will share the feedback with you as soon as I will complete my investigation. I am not sure of internal implementation of video frames and our development team may share their comment in this regard.

Many Thanks,


Thanks Mudassir, we are waiting eagerly for your response with solution.

Hi Mohit,

I have investigated the issue on my end and have observed the attached image issue. An issue with ID
SLIDESJAVA-34071 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be automatically notified once the issue will be resolved.

Many Thanks,

The issues you have found earlier (filed as SLIDESJAVA-34071) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

I am facing the same issue with .Net API while Embedding an audio (wav file ) into a slide

@mohsin298,

I have observed the issue shared and request you to please share the sample project along with source files and generated output. We will be able to help you further in this regard on provision of requested information.

Actually I have tried ways to embedd my audio in slide

 using (Presentation _Presentation = new Presentation("Presentation.pptx"))
 {
   //First way
   IAudio iAudio = _Presentation.Audios.AddAudio(new FileStream(AudioFileName, FileMode.Open), LoadingStreamBehavior.ReadStreamAndRelease);
   IAudioFrame audioFrame = _Presentation.Slides[1].Shapes.InsertAudioFrameEmbedded(1, 1, 1, 1, 1, iAudio);
   audioFrame.AlternativeTextTitle = "*!";
   audioFrame.Name = "length";
   audioFrame.CustomData.Tags.Add("1", Path.GetFileName(AudioFileName));

    //Second way
    IAudioFrame audioFrame = _Presentation.Slides[1].Shapes.AddAudioFrameEmbedded(1, 1, 1, 1, File.Open(AudioFileName, FileMode.Open));
    audioFrame.AlternativeTextTitle = "*!";
    audioFrame.Name = "length";
    audioFrame.CustomData.Tags.Add("1", Path.GetFileName(AudioFileName));
      
    //Third way
    FileStream fstr = new FileStream(AudioFileName, FileMode.Open, FileAccess.Read);
    IAudioFrame af = _Presentation.Slides[1].Shapes.AddAudioFrameEmbedded(50, 150, 100, 100, fstr);
    af.AlternativeTextTitle = "*!";
    af.Name = "length";
    af.CustomData.Tags.Add("1", Path.GetFileName(AudioFileName));

   //Saving Presentation
   _Presentation.Save(Path.Combine(PresentationPath, "_"+PresentationName), Aspose.Slides.Export.SaveFormat.Pptx);
   _Presentation.Dispose();
 }

I have tried these methods one by one but the result was same
There are two observations regarding above methods

  1. When I open the “EmbeddedPresentation.pptx” in PowerPoint and click on the audio icon it show following dialog and when I click on the OK, it shows the player control to play etc
    However if I insert audio using Power Point it doesn’t show this dialog and when I click on the audio icon it shows player controls immediately.

Issue.JPG (13.3 KB)

  1. when I embedd the audio I set AlternativeTextTitle of audioFrame object but when I try to read these attributes value is empty, while other values are set.

     using (Presentation _Presentation = new Presentation(Path.Combine(PresentationPath, "_" + PresentationName)))
     {
         IShapeCollection shapeCollection = _Presentation.Slides[1].Shapes;
         foreach (var shape in shapeCollection)
         {
             AudioFrame af = shape as AudioFrame;
             if (af != null)
             {
                Debug.WriteLine(
                             "af.AlternativeTextTitle:" + af.AlternativeTextTitle + Environment.NewLine +                       
                             "af.Name:" + af.Name + Environment.NewLine +
                             "af.Tag[1]:"+af.CustomData.Tags["1"]
                             );
              }
          }
      }
    

The out put is as below:

af.AlternativeTextTitle:
af.Name:length
af.Tag[1]:1.wav

@mohsin298,

I have observed the sample code and image shared by you. I request you to please share the source files and generated presentation reproducing the issue on your end.

I have shared the code above

@mohsin298,

Please share the requested information.