さまざまな理由から、PPT をビデオに変換しようとする人がよくいます。 PowerPoint をビデオに変換すると、非常に簡単に共有したり開いたりできるメディア ファイル (mp4 など) が得られます。共有の機会が増えるだけでなく、結果として得られるビデオ形式により、一般的に視聴者にとってより魅力的な方法でプレゼンテーションのコンテンツを使用できるようになります。
PowerPoint PPTをオンラインでビデオに変換
PowerPoint アプリにはスライドを動画に変換する機能が備わっていますが、動画の作成プロセスは決して簡単ではありません。 Aspose の PowerPoint to Video Web アプリなどのシンプルなオンライン ツールを使用すると、さらにメリットが得られる場合があります。この記事を読み終える頃には、オンライン コンバーターを使用し、C#、Java、および C++ でコードを実行して、PowerPoint PPT をビデオに変換する方法を習得していることになります。
オンラインPPTからMP4へのコンバーター
- Aspose Online PPT to MP4 Converter ページに移動します。
- 「ファイルをドロップまたはアップロード」をクリックします。
- MP4 ビデオに変換する PowerPoint プレゼンテーションをアップロードします。
- 「変換」をクリックします。
オンライン PPT から MP4 コンバーターは、次のことを可能にするパラメーターを提供します。
- ビデオで使用するプレゼンテーションのスライドを指定します。
- 魅力的なトランジションを追加し、
- ビデオ内で各スライドを表示する時間を指定します。
- ビデオにサウンドや音楽を追加し、
- 好みのビデオ品質を選択してください。
PowerPoint PPT から MP4 へ - よくある質問
オンラインで PPT を MP4 ビデオに変換するにはどうすればよいですか?
オンライン PowerPoint to MP4 ビデオ コンバーターを使用して、PPT プレゼンテーションをビデオ ファイルに変換します。プレゼンテーションをアップロードし、希望のパラメーターまたはオプションを指定して、「変換」をクリックします。
結果のビデオはどのような形式になりますか?
MP4 は、結果として得られるビデオの形式です。
PowerPoint をビデオに変換するにはどれくらい時間がかかりますか?
通常、数分かかります。 PowerPoint からビデオへの変換に必要な時間は、関連するスライドの数、選択したトランジション、選択したビデオの品質、および操作に影響するその他のパラメータによって異なります。
スマートフォンで PowerPoint PPT をビデオに変換できますか?
はい。携帯電話で Aspose PowerPoint to Video Web アプリを使用できます。コンバータは、モバイル デバイスでもコンピュータと同じように機能します。
コードを使用して PPT をビデオに変換する
Aspose API を使用すると、開発者とアプリケーションは、PowerPoint スライド (ビデオに変換可能) に基づいてフレームを作成したり、プレゼンテーションを他のファイルに変換したり、プレゼンテーションを編集および操作したりすることができます。
C# で PPT を MP4 ビデオに変換
- dotnet add package コマンドを使用して、Aspose.Slides と FFMpegCore をプロジェクトに追加します。
- 「dotnet add package Aspose.Slides.NET –version 22.11.0」を実行します。
- 「dotnet add package FFMpegCore –version 4.8.0」を実行します。
- ffmpeg を こちら からダウンロードします。
- FFMpegCore では、ダウンロードした ffmpeg (たとえば、「C:\tools\ffmpeg」に抽出) へのパスを指定する必要があります。
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = @"c:\tools\ffmpeg\bin",} );
- PowerPoint PPT をビデオに変換するには、次の C# コードを実行します。
using System.Collections.Generic;
using Aspose.Slides;
using FFMpegCore; // Will use FFmpeg binaries we extracted to "c:\tools\ffmpeg" before
using Aspose.Slides.Animation;
using (Presentation presentation = new Presentation())
{
// 笑顔の形を追加してアニメーション化します
IAutoShape smile = presentation.Slides[0].Shapes.AddAutoShape(ShapeType.SmileyFace, 110, 20, 500, 500);
IEffect effectIn = presentation.Slides[0].Timeline.MainSequence.AddEffect(smile, EffectType.Fly, EffectSubtype.TopLeft, EffectTriggerType.AfterPrevious);
IEffect effectOut = presentation.Slides[0].Timeline.MainSequence.AddEffect(smile, EffectType.Fly, EffectSubtype.BottomRight, EffectTriggerType.AfterPrevious);
effectIn.Timing.Duration = 2f;
effectOut.PresetClassType = EffectPresetClassType.Exit;
const int Fps = 33;
List<string> frames = new List<string>();
using (var animationsGenerator = new PresentationAnimationsGenerator(presentation))
using (var player = new PresentationPlayer(animationsGenerator, Fps))
{
player.FrameTick += (sender, args) =>
{
string frame = $"frame_{(sender.FrameIndex):D4}.png";
args.GetFrame().Save(frame);
frames.Add(frame);
};
animationsGenerator.Run(presentation.Slides);
}
// ffmpegバイナリフォルダを設定します。このページを参照してください: https://github.com/rosenbjerg/FFMpegCore#installation
GlobalFFOptions.Configure(new FFOptions { BinaryFolder = @"c:\tools\ffmpeg\bin", });
// フレームを WebM ビデオに変換します
FFMpeg.JoinImageSequence("smile.webm", Fps, frames.Select(frame => ImageInfo.FromPath(frame)).ToArray());
}
PowerPoint からビデオへの変換に関して、Aspose.Slides for .NET 機能 について詳しく知りたい場合は、PowerPoint PPT の変換 をお読みください。ビデオへ の記事。
Java で PPT を MP4 に変換
<dependency>
<groupId>net.bramp.ffmpeg</groupId>
<artifactId>ffmpeg</artifactId>
<version>0.7.0</version>
</dependency>
- 次の Java コードを実行して、PowerPoint PPT から MP4 ビデオを生成します。
Presentation presentation = new Presentation();
try {
// 笑顔の形を追加してアニメーション化します
IAutoShape smile = presentation.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.SmileyFace, 110, 20, 500, 500);
ISequence mainSequence = presentation.getSlides().get_Item(0).getTimeline().getMainSequence();
IEffect effectIn = mainSequence.addEffect(smile, EffectType.Fly, EffectSubtype.TopLeft, EffectTriggerType.AfterPrevious);
IEffect effectOut = mainSequence.addEffect(smile, EffectType.Fly, EffectSubtype.BottomRight, EffectTriggerType.AfterPrevious);
effectIn.getTiming().setDuration(2f);
effectOut.setPresetClassType(EffectPresetClassType.Exit);
final int fps = 33;
ArrayList<String> frames = new ArrayList<String>();
PresentationAnimationsGenerator animationsGenerator = new PresentationAnimationsGenerator(presentation);
try
{
PresentationPlayer player = new PresentationPlayer(animationsGenerator, fps);
try {
player.setFrameTick((sender, arguments) ->
{
try {
String frame = String.format("frame_%04d.png", sender.getFrameIndex());
ImageIO.write(arguments.getFrame(), "PNG", new java.io.File(frame));
frames.add(frame);
} catch (IOException e) {
throw new RuntimeException(e);
}
});
animationsGenerator.run(presentation.getSlides());
} finally {
if (player != null) player.dispose();
}
} finally {
if (animationsGenerator != null) animationsGenerator.dispose();
}
// ffmpegバイナリフォルダを設定します。このページを参照してください: https://github.com/rosenbjerg/FFMpegCore#installation
FFmpeg ffmpeg = new FFmpeg("path/to/ffmpeg");
FFprobe ffprobe = new FFprobe("path/to/ffprobe");
FFmpegBuilder builder = new FFmpegBuilder()
.addExtraArgs("-start_number", "1")
.setInput("frame_%04d.png")
.addOutput("output.avi")
.setVideoFrameRate(FFmpeg.FPS_24)
.setFormat("avi")
.done();
FFmpegExecutor executor = new FFmpegExecutor(ffmpeg, ffprobe);
executor.createJob(builder).run();
} catch (IOException e) {
e.printStackTrace();
}
PowerPoint からビデオへの変換に関して Aspose.Slides for Java の 機能 について詳しく知りたい場合は、PowerPoint を MP4 に変換する をお読みください。ビデオ] の記事。
C++ で PPT からビデオを生成する
- こちら の手順に従って、Aspose.Slides をインストールします。
- ffmpeg を こちら からダウンロードします。
ffmpeg.exe
へのパスを環境変数PATH
に追加します。- PPT から MP4 への変換には、次の C++ コードを実行します。
void OnFrameTick(System::SharedPtr<PresentationPlayer> sender, System::SharedPtr<FrameTickEventArgs> args)
{
System::String fileName = System::String::Format(u"frame_{0}.png", sender->get_FrameIndex());
args->GetFrame()->Save(fileName);
}
void Run()
{
auto presentation = System::MakeObject<Presentation>();
auto slide = presentation->get_Slide(0);
// 笑顔の形を追加してアニメーション化します
System::SharedPtr<IAutoShape> smile = slide->get_Shapes()->AddAutoShape(ShapeType::SmileyFace, 110.0f, 20.0f, 500.0f, 500.0f);
auto sequence = slide->get_Timeline()->get_MainSequence();
System::SharedPtr<IEffect> effectIn = sequence->AddEffect(smile, EffectType::Fly, EffectSubtype::TopLeft, EffectTriggerType::AfterPrevious);
System::SharedPtr<IEffect> effectOut = sequence->AddEffect(smile, EffectType::Fly, EffectSubtype::BottomRight, EffectTriggerType::AfterPrevious);
effectIn->get_Timing()->set_Duration(2.0f);
effectOut->set_PresetClassType(EffectPresetClassType::Exit);
const int32_t fps = 33;
auto animationsGenerator = System::MakeObject<PresentationAnimationsGenerator>(presentation);
auto player = System::MakeObject<PresentationPlayer>(animationsGenerator, fps);
player->FrameTick += OnFrameTick;
animationsGenerator->Run(presentation->get_Slides());
const System::String ffmpegParameters = System::String::Format(
u"-loglevel {0} -framerate {1} -i {2} -y -c:v {3} -pix_fmt {4} {5}",
u"warning", m_fps, "frame_%d.png", u"libx264", u"yuv420p", "video.mp4");
auto ffmpegProcess = System::Diagnostics::Process::Start(u"ffmpeg", ffmpegParameters);
ffmpegProcess->WaitForExit();
}
詳細については、PowerPoint ファイルをビデオに変換する を参照してください。
クラウド API を探索する
オンプレミス API に加えて、Aspose は クラウド製品 を提供しており、PowerPoint をビデオまたは他のファイルに変換したり、プレゼンテーションを編集および操作したり、他のドキュメントをプレゼンテーションにインポートしたりすることができます。 、など。
結論
この記事では、無料の PPT ビデオ コンバーターを使用して、PowerPoint PPT をオンラインでビデオ クリップに変換する方法を学びました。さらに、さまざまなプログラミング言語でプログラム的に PPT からビデオへの変換を実行する方法についても説明しました。