Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
PowerPoint-based maintainable lecture videos command-line tool
Simple and effective.
If you are afraid of using the command-line, this is not for you.
pomalevi
isPowerPoint allows recording slide shows with narration and even a webcam insert with its SlideShow⟶RecordSlideShow function. The media files are stored within the PPT file on a per-slide basis. This can be turned into a video via "File⟶SaveAs⟶*.wmv"
pomalevi converts such a video file (or any other) as follows:
splitlogo
appears in the videostoplogo
appears in the video,
so that the audience can ponder a question.pomalevi
existsI have previously used Camtasia to record lecture videos with Camtasia's PowerPoint plugin. I have inserted the stops I wanted (after I'd asked the viewers a question) manually in the Camtasia Editor and then cut the video into the five-or-so pieces (of 10-20 minutes each) I want and exported ("produced") each piece individually using the Batch Production feature.
This gives nice results, but is a lot of manual work. It is acceptable for a one-time process, but what if I want to modify two of the slides next year? Or modify my narration? Aw!
PowerPoint's "Record" function is a good answer to this: Each slide can be re-recorded individually. Then just re-export the whole video.
But I did not want to give up my chopping-into-five-parts and even less so the automated stops that Camtasia's SmartPlayer allows. That's when the idea of pomalevi was born: Let's combine the strengths of PowerPoint's slidewise recording with fully automated postprocessing. A couple of couples of hours later here we go.
Pro:
Con:
In my case, it is typically about 1.5x the video play time, the bigger part of which is needed by the Powerpoint video export.
pomalevi
pomalevi is tested on Windows, but should also work on WSL or Linux proper. It is a command-line application, so you need to work in cmd.exe or Powershell.
python
and pip
must end up on your PATH
.pip install pomalevi
pomalevi
.Caveats:
pip
as shown (you should be!),
pip install --user pomalevi
instead to install to your
personal directory insteadpip show pomalevi
to see (in the "Location:" entry)
where it ended up, e.g.
c:\Users\<name>\AppData\Roaming\Python\Python310\site-packages
Scripts
directory in your Path
, e.g.
c:\Users\<name>\AppData\Roaming\Python\Scripts
.Path
, use the Windows key, search for "environment"`,
and call "Edit environment variables for your account" (not "for system").
If your Windows is not running in English, the name will be different,
but the English search term should still work.)
Pomalevi should now work like after the original procedure.pipx
instead of pip
, which installs a
package in an isolated environment.
To do that,
pipx
by pip install pipx
pipx install pomalevi
pipx
into your PATH
pomalevi
Find the pomalevi install directory tree in the
directory ending in site-packages
which is shown when you execute
python -c "import sys; print(sys.path)"
.
From the pomalevi install directory tree,
copy ppt/demo.pptx
to any of your own directories.
Open the copy with Powerpoint,
choose "Powerpoint⟶Slide Show",
check the boxes for "Play Narrations" and "Use Timings",
start the slide show.
View it, end it. Imagine this was your own presentation which you want
to publish as several videos in pomalevi style.
To do that, "File⟶Save as" this file,
select file format "Windows Media Video (*.wmv)",
and save it as myslides.wmv
.
This file you can use as the myslides.wmv
in the subsequent examples.
pomalevi mydir/myslides.wmv
The output is a directory mydir/myslides/
with several files.
You can either use mydir/myslides/index.html
to get the pomalevi player or
just the video itself: mydir/myslides/v1.mp4
.
-stop-at
stoplogo.png
.pomalevi --stop-at ll:stoplogo.png mydir/myslides.wmv
ll
stands for "lower left")ul
, ur
, ll
, lr
in the --stop-at
specification, meaning
upper left, upper right, lower left, lower right, respectively.--stop-at x=900..1000,y=500..600:stoplogo.png
would look for the logo (specifically: the upper-left corner of the logo)
in that region of the video (near the middle).v1.mp4
file is not helpful,
because it knows nothing about the stops.mydir/myslides/index.html
, which calls
the pomalevi player and feeds it the proper list of stop times.--stop-at
has friendly defaults:
--stop-at ll:stoplogo.png
will be assumed by default,
but if stoplogo.png
is not found, no stoplogo search will be performed../stoplogo.png
, in the local directorymydir/stoplogo.png
, in the input file directorymydir/../stoplogo.png
, in the parent of the input file directorymydir/toc/stoplogo.png
, in the toc
subdirectory of the input file
directory (see the description of --toc
below).--split-at
The output of pomalevi appears a bit silly unless you let pomalevi split your video into several parts.
splitlogo.png
, andpomalevi --split-at ll:splitlogo.png input.wmv
v1.mp4
, v2.mp4
, etc.mydir/myslides/index.html
provides navigation between those videos.--stop-at
.--toc
All you get so far for navigation in the HTML file are generic section
titles "part 1", "part 2", etc. that are hyperlinks which load the respective
part of the video.
You can get a text to the right of each number that describes the
content of that video part and also get a meaningful title
for the HTML page by using the --toc filename
option (table of contents):
The file given must be a UTF-8-encoded plain-text file
with a paragraph structure.
Use any text editor (for instance MS Windows' notepad
)
to produce them.
Paragraphs are separated simply by an empty line.
The first paragraph (paragraph 0) provides the title of the
index.html
page.
Subsequent paragraphs 1..N provide the content description for
video parts 1..N.
Example:
This is the title
This is the description of video part 1. It is a longer one that
takes multiple lines. Those lines will be rendered as a flowing
paragraph of text on the HTML page.
This is the description of the second video part, number 2.
Like most pomalevi options, --toc
has friendly defaults:
--toc myslides-toc.txt
will be assumed by default,
but if myslides-toc.txt
is not found, the generic toc will be produced instead../myslides-toc.txt
, in the local directorymydir/myslides-toc.txt
, in the input file directorymydir/toc/stoplogo.png
, in the toc
subdirectory of the input file
directory.--out
So far, we have always used the friendly default to tell
pomalevi where we want the output to end up:
If the input file is mydir/myslides.wmv
, the output will go to
mydir/myslides/*
.
If you don't want this, specifiy a target directory with --out
:
pomalevi --out outputdir mydir/myslides.wmv
.
Taking all of the above together, the explicit pomalevi call could be:
pomalevi --split-at ll:splitlogo.png --stop-at ll:stoplogo.png --toc mydir/myslides-toc.txt --out mydir/myslides mydir/myslides.wmv
but the following is equivalent, courtesy of the defaults:
pomalevi mydir/myslides.wmv
--format
pomalevi can produce either
*.mp4
video files
(encoded with H.264 video and AAC audio) or
*.webm
video files
(encoded with VP8 video and Opus audio).
webm
encoding currently uses rather naive settings and is not recommended.
mp4
encoding is available with four different sets of settings, called
q1 to q4, that produce different quality levels and file sizes.
q1 creates the smallest files with the lowest audio and video quality,
q4 creates the largest files with the highest quality.
These are selected using
--format mp4q1
--format mp4q2
--format mp4q3
--format mp4q4
--format webm
mp4q3
is the default.
pomalevi uses ffmpeg's find_rect
filter
to find all frames that contain the respective logo PNG content.
It uses the time information of these frames to drive the splitting
into parts and to feed the pomalevi player with the stop times
for each part.
find_rect
cannot cope with scaling or rotation of the target image,
works only with a rectangular image,
and it considers only a grayscale version of it with no alpha channel.
If you use a logo file mylogo.png
,
its grayscale derivative mylogo.pgm
will appear
in the output directory during encoding (and then disappear again).
On my machine, the MP4 files produced by PowerPoint's "Export" function
are always broken: After a slide transition, when the new slide is already
visible, the old one shortly reappears for varying lengths of time from
a single frame to several tenths of a second.
So I use "Save as" with target format WMV instead.
That's sort of silly (because WMV is the inferior format) but at least it works.
Because of how pomalevi works (see above), the search for stop logo or split logo may fail if the background of the logo is colored. There must be enough contrast between the logo color(s) and the background color when converted to grayscale.
Because of how it works (see above), the search for stop logo or split logo
may fail if the logo has transparent parts and is placed onto other
material. The logo match is fuzzy, but expects at least an 80% match.
Unless you place your logo precisely in the corner, fine details in the logo will make the match worse. Prefer simple logos.
Improvements waiting to be made:
encode
, compress
, patch
, get-logos
, get-demo
.--ffmpeg-a
, --ffmpeg-v
to submit encoding optionspomalevi.css
mobile-ready--favicon file
: Name of a 32x32 pixel PNG file to be used as the favicon.--split-at
, --stop-at
, --toc
, --out
.static-ffmpeg
Python package, no longer the system's ffmpegpomalevi.exe
--format
ppt/demo.pptx
FAQs
Powerpoint-based maintainable lecture videos
We found that pomalevi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.