Creating a video from photos with uniform audio in C#.

soprano

Client
Регистрация
25.08.2011
Сообщения
875
Благодарностей
956
Баллы
93
Hello, everyone.

I'm sharing a template on the suggested topic:
"Creating a video for YouTube from your own photos with various transitions, voice-over, and evenly timed frame display based on the length of the audio track."

To work with the template, you need to place your photos in .jpg format in the /images folder.

In the /audio folder, place the file text.mp3.

After launching the template, it resizes the photos to a uniform size, renames them, applies effects and text, calculates how long each image should be displayed based on the audio file's length, then stitches the images into a video matching the audio's length and merges the audio and video together.

FFMPEG is used for video generation (https://ffmpeg.org/download.html#build-windows, add in the project Directory).

Original image files:
118638


Processed images:
118639


Video from images:
118640


Video with sound:
118641


The following libraries need to be downloaded from nuget.org and installed in the GAC:
using Microsoft.WindowsAPICodePack;
using Microsoft.VisualBasic.FileIO;
using ImageProcessor;
using System.Speech;
using Microsoft.Office.Core;

There are no input settings.

I am attaching files for reference - images before processing, images after processing, video from images without sound, video with sound, and audio for the voice-over.

Happy generating!
 

Вложения

  • Спасибо
Реакции: cesario678

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18
Hello, everyone.

I'm sharing a template on the suggested topic:
"Creating a video for YouTube from your own photos with various transitions, voice-over, and evenly timed frame display based on the length of the audio track."

To work with the template, you need to place your photos in .jpg format in the /images folder.

In the /audio folder, place the file text.mp3.

After launching the template, it resizes the photos to a uniform size, renames them, applies effects and text, calculates how long each image should be displayed based on the audio file's length, then stitches the images into a video matching the audio's length and merges the audio and video together.

FFMPEG is used for video generation (https://ffmpeg.org/download.html#build-windows, add in the project Directory).

Original image files:
Посмотреть вложение 118638

Processed images:
Посмотреть вложение 118639

Video from images:
Посмотреть вложение 118640

Video with sound:
Посмотреть вложение 118641

The following libraries need to be downloaded from nuget.org and installed in the GAC:
using Microsoft.WindowsAPICodePack;
using Microsoft.VisualBasic.FileIO;
using ImageProcessor;
using System.Speech;
using Microsoft.Office.Core;

There are no input settings.

I am attaching files for reference - images before processing, images after processing, video from images without sound, video with sound, and audio for the voice-over.

Happy generating!
Thank you for the template. Could you help me? Every time I log in, I receive this message, and the bot never runs. I have already installed the latest .NET Framework and downloaded System.IO in the GAC, but it still doesn’t work.
 

Вложения

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18
I installed the latest version of .NET Framework, reinstalled ZennoPoster, updated and installed Visual +++, and installed in the GAC the add-ons you recommended, yet the error persists.
 

soprano

Client
Регистрация
25.08.2011
Сообщения
875
Благодарностей
956
Баллы
93
check your dll
 

cesario678

Client
Регистрация
10.03.2022
Сообщения
194
Благодарностей
13
Баллы
18

soprano

Client
Регистрация
25.08.2011
Сообщения
875
Благодарностей
956
Баллы
93
I can’t help anything else, at the time of the release of the article, the template worked.
I am no longer engaged in this topic.
 

Кто просматривает тему: (Всего: 2, Пользователи: 0, Гости: 2)