mcjSlideshowVideoMaker

Introduction


mcjSlideshowVideoMaker is a  script for Daz Studio  that helps you create slideshow videos from a collection of images. 

It can also make Standard videos from  collections of images.

You can also use mcjSlideshowVideoMaker to mount one or many images in decorative frame-layouts.

The frames-layouts in question must be created by mcjFrameMaker

https://sites.google.com/site/mcasualsdazscripts10/mcjframemaker 

The script relies on ffmpeg to render the videos. 

The frame mounting operation is done by Daz Studio and doesn't require ffmpeg. 

An audio track of your choice can be inserted in your videos.


HISTORY

February 7th 2023 - This is an exact copy of the Jan 4th version, but the sort order of the images in the images list is now alphabetical instead of by creation time, so it will work fine for numbered image filenames ( as long as they are zero-padded like what Daz Studio makes. also 30 minutes later i added the ffmpeg switch 

pix_fmt yuv420p to the command line sent to ffmpeg, because some older players ( even on windows 11 ! ) need it.


January ‎4, ‎2023 - The version i've been improving and using for a few weeks, notably the image list management


Nov 22, 2022 Fixed the creation of the batch file for Standard Videos, sorry i waited 3 days to give you this version!


November 9, 2022 01:58 AM fixed the path to the makeSlideshowVideo which was getting stuck to the location of the first makeSlideshowVideo.bat path and filename that you created. Though doing a factory reset was a workaround


‎November ‎7, ‎2022, ‏‎6:07:28 PM Fixed the [Run MakeVideo.bat] buttom


‎November ‎5, ‎2022, ‏‎7:18:59 PM Released

How to Install mcjSlideshowVideoMaker on your computer


The mcjSlideshowVideoMakerBasic.zip  package is found at the bottom of this page

unzip it in your daz content folder,

typically :

C:\Users\USERNAME\Documents\DAZ 3D\Studio\My Library

once installed The Daz Script will be found in  My Library / Scripts / mcasual


How to get Ffmpeg on your computer


The script relies on Ffmpeg to render the video.


"FFmpeg. A complete, cross-platform solution to record, convert and stream audio and video."


In our case we want the compiled executable version of Ffmpeg. 

It's also available as 'source code' but that's for programmers, so we wont download the 'source code' packages


Note that many apps on your computer may include a copy of ffmpeg.exe, so we could use those with mcjSlideshowVideoMaker 


This is the official download page for Ffmpeg is https://ffmpeg.org/download.html

The executables also known as 'binaries' are in the "Get packages & executable files" section

We download the windows version from https://www.gyan.dev/ffmpeg/builds/ 

We go in gyan's release builds section

and get the ffmpeg-release-essentials.zip file, it's only 79MB

We unzip/extract it in F:\ffmpeg

We must remember this path because mcjSlideshowVideoMaker will need the location of ffmpeg.exe

In my case ffmpeg.exe ended in F:\ffmpeg\ffmpeg-5.1.2-essentials_build\bin

This ffmpeg.exe is dated August 2021 and is 80MB

I could leave it there, but i moved the content of F:\ffmpeg\ffmpeg-5.1.2-essentials_build  to  F:\ffmpeg 

so the full path to ffmpeg.exe is now F:\ffmpeg\bin\ffmpeg.exe


Using mcjSlideshowVideoMaker

This is how mcjSlideshowVideoMaker should like when you start it for the first time

Using mcjSlideshowVideoMaker

First Run

The first time you run mcjSlideshowVideoMaker  you must tell it where ffmpeg is located

so click on the 'browse' button in the 'path to ffmpeg' section and select your ffmpeg

in my case F:\ffmpeg\bin\ffmpeg.exe

if you did not install ffmpeg yet, you still have access to the frame-mounting function.

The Special frame-layouts for use in mcjSlideshowVideoMaker

mcjFrameMaker must be used to create the frame-layouts that mcjSlideshowVideoMaker  expects

https://sites.google.com/site/mcasualsdazscripts10/mcjframemaker

mcjImageMaker creates both the frame image and a companion text file which contains a full description of the frame's layout. Most notably the positions and sizes of the black rectangles in which images will be fitted. The layout file has the same filename as the frame image but with a .txt extension.

When you select a frame image in mcjSlideshowVideoMaker, the companion text file must still reside in the same folder as the frame image.

Our first example: a 58 seconds long Slideshow video

we have a frame-layout that can show three 16x9 images at once.

we have 30 splendid images to present to The World


click on the [Browse] button of the |Path to images| section and select one of the splendid images on disk.

immediately you will see in the |images List| section the list of all images in that folder, sorted alphabetically. 


click on the [Browse] button of the |Path to Frame image| section and select the frame image that was created using mcjImageMaker.

In the attachments at the bottom of this page you will find a few blank frame images and their companion .txt layout files. By blank i mean no text at the top and bottom of the images. As long as you dont modify the filename of the frame images you could add titles and credits "by hand" using a paint program.

click on the [Preview One Slide] button to see what the first slide of mounted images looks like

Our 58 seconds Slideshow video (continued)

Notice that if you selected a valid frame, the Log textbox shows the layout specifications for this frame


We want a musical audio track for our slideshow, so click on the [Browse] button on the |Path to Audio File| section and select a 58 seconds mp3 file. 


next, checkmark the [include audio in the video] checkbox


The Youtube Audio Library has CC-Licensed audio files of that length. 

https://studio.youtube.com/channel/UCaZUbnoQhRMoSb_ShW81ONw/music


Make sure the [Type of Video You Are Producing] section has the [Slideshow Video (with cross-fading] option selected


click on the [Get Some Info]  button under the Log textbox

you will see something like

================= INFO =================

There are 30 images in your image list

You specified you want a Slideshow Video

With a slide duration of 5 seconds.

The slideshow duration will be 150 seconds.

Warning:

Your source images don't seem to be mounted

Usually but not necessarily slideshow slides

are images mounted in your frame-layout.

You current layout-frame has 1 col(s) and 3 row(s).

There would be 10 slides if you mounted these images.

With a slide duration of 5 seconds, your video would then be 50 seconds long

To get a 58 s. slideshow of mounted images you would need to set the slide duration to 5.8 seconds

so we change the Slide-Duration to 5.8 seconds for our YT-Short 

the cross-fading duration of 0.4 seconds with a 25 fps frame rate will give us a 10-video-frames cross-fading effect

Our 58 seconds Slideshow video (continued)

We did say we want a mounted-images slideshow. 

Click on the [Montage Images in Frame]. This operation will take a few seconds and you can interrupt it if you realise you selected had 1800 images in your collection of images. mcjSlideshowVideoMaker  created a folder and placed the mounted slides in a sub-folder of your images collection. The name of this folder is the word 'mounted' plus the date and time of its creation. In my case mounted2022_11_04_20_14_51_699


And there you have it. We have our 10 slides. in the mountedBlaBlaBla folder


But mcjSlideshowVideoMaker still thinks we want to make a 30 non-mounted images slideshow

So, either use the  [Browse] button of the |Path to Frame image| section and select one of the mounted slides or click the [Set Mounted Images as Source] button and mcjSlideshowVideoMaker will do it for you.

Our 58 seconds Slideshow video (continued)

Lets check with the [Get Some Info] button if we're ready to produce our slideshow video


================= INFO =================

There are 10 images in your image list

You specified you want a Slideshow Video

With a slide duration of 5.8 seconds.

The slideshow duration will be 58 seconds.

Seems all right.


Producing the slideshow video with the help of ffmpeg


mcjSlideshowVideoMaker has 2 buttons to convert your slides into a video

1 - [Write makeVideo.bat] which will create a command file named makeSlideshowVideo.bat in the same folder as our 10 slides. You can run this process now or later by double-left-clicking on makeSlideshowVideo.bat. ffmpeg will do the work. and produce a video file named 

2 - [RUN MakeVideo.bat] which will remotely launch a command file named makeSlideshowVideo.bat located in the same folder as our 10 slides. The ffmpeg warnings, errors and progress messages will be displayed in the Log textbox. You can stop the process using the [RUN] button which is now labeled [STOP Makevideo.bat].


Making a Standard Video from a collection of images.

Please read the Slideshow-making section above before reading further

When the [Standard Video] option of the [Type of Video You Are Producing] section is selected, mcjSlideshowVideoMaker  will only take into consideration the frame rate and the images in your list of images. Also there will be no cross-fading effect between frames.

So with our 30 images and a frame rate of 25fps, we'd get a 1.2 seconds video. If we mount the images in a frame we'd get a 0.4 seconds video. 

Although low frame rates like [5 seconds/frame] are not advisable for Slideshows, they seem to work fine in video-players and ffmpeg acepts them. So you could make a 50 seconds video from 10 framed images and a frame rate of 5 seconds per frame.

This option (added lately) is intended for cases where you rendered a 1800 frames animation as 1800 .png or .jpg images and you want to quickly convert them into a 60 seconds .mp4/.mov video with an audio track. 

Framing your 1800 renders would require much patience and should be done with a Video Editor.

here's what the [Get Some Info] button tells us


================= INFO =================

There are 1800 images in your image list

You specified you want a Standard Video

With a frame-rate of 25 fps

So the video duration will be 72 seconds.


Odds and Ends

The list of images has 4 buttons to View, remove, move  up or move down images. Which let's remember are sorted alphabetically initially. This was mainly to allow the first slide of the slideshow to be moved at the top of the list even if its name is ZZorg.png or the TheEnd image to be moved to the bottom.


Warning: i think that mixing .jpg and .png images will be refused by ffmpeg.


The [Rename Images To Date + Time] button will rename all the image files in your list of images to their creation Date and time. Unless your images were created in under 1 millisecond there should not be any problem. If those images are very precious, you may want to create a backup to calm your fears :). There's also the fact that you will lose the original filenames. Another option is to not use the  [Rename Images To Date + Time] button and duct-tape the button.

the [Defaults] button will clear the list of images and return the paths to ffmpeg, images, frame and audio to [Not Set]. All checkboxes, radio buttons, and numeric values will return to factory defaults.

( i'm not a factory i'm Human! )


The [Web Help] button will open your browser at https://sites.google.com/site/mcasualsdazscripts10/mcjslideshowvideomaker

where you can check if the User manual and/or the script was updated de-bugged.


The [Help] button displays the short offline version of the User Manual