Where to Discuss?

Local Group

Table of Content

I have been following tutorial from Nick Saporito.

And I have a few ideas for myself. One of them is making animation based on this progress ring.


Dark

Unified Graphic Material

Go straight to the point.

The inkscape source file is here:

Or this

And the result is here:

Progress Ring: Dark

DeviantArt

I also put a link in DeviantArt, with downloadable SVGs.

Extracting Frame

I have already made some layers, one of the named cut-frame, so you can select the object and export each frame easily.

Progress Ring: Select Frame

You can see when you export PNG on selection, it is already has target file to /home/epsi/Documents/progress-ring/progress-095.png.

Exports and Layers

XML

But how do I do that?

You can utilize XML editor in Inkscape to edit the id.

XML Editor

Or even easier to do it with text editor directly. With text editor, you can find-and-replace the dpi right away. Or you can change the target filename easily. Especially for replacing multiple objects.

    <rect
       inkscape:export-filename="/home/epsi/Documents/progress-ring/progress-095.png"
       inkscape:export-ydpi="640"
       inkscape:export-xdpi="640"
       ...
       id="95%"
       ...
       />

Editing SVG in Text Editor

Extracted Files

Select each object frame for all progress ring, then export, and you will have yourself frames in your file manager.

File Manager: Each Frames

GIMP Animation

My first attempt is GIMP animation. After exporting to GIF, I realize that I lost some colors. The result is not smooth.

Progress Ring: GIF Animation

FFMPEG

I need a smooth one. The solution is ffmpeg.

Go straight to the point.

The command is here:

$ ffmpeg \
    -framerate 4 \
    -pattern_type glob -i '*.png' \
    -c:v libx264 -profile:v baseline \
    -level 3.0 \
    -pix_fmt yuv420p \
    progress-dark.mp4

And the result is here:

Caveat

I still don’t know how to set different delay for each frame with ffmpeg. Setting delay for each frame is pretty easy with gimp animation. But of course, video is based on framerate rather than delay.


Bright

Unified Graphic Material

Go straight to the point.

The inkscape source file is here:

And the result is here:

Progress Ring: Bright

Extracting Frame

The same steps as dark above.

Progress Ring: Select Frame

Extracted Files

Select each progress, then export, and you will have yourself frames in your file manager.

File Manager: Each Frames

FFMPEG

Go straight to the point.

The command is here:

$ ffmpeg \
    -framerate 4 \
    -pattern_type glob -i '*.png' \
    -c:v libx264 -profile:v baseline \
    -level 3.0 \
    -pix_fmt yuv420p \
    progress-bright.mp4

And the result is here:


Smooth

Unified Graphic Material

All frames can be shown here.

Progress Ring: Bright

Arch Smoothing Process

But How?

I put an overlay arc on top of the normal arc.

Normal Arc

The normal bright arc is shown as below figure.

Normal Arc

Overlay Arc

A translucent overlay arc should be put on top of normal arc.

Overlay Arc

Smooth Bright

And the final result looks better.

Smooth Arc

The Overlay Arc

Start with solid, end with translucency.

It utilize gradient as usual, all RGBA with three stroke color arrangements.

Overlay Arc: Gradient

  • top node: free, as it won’t be shown anyway.

  • middle node: the same as background, such as #f5f5f5ff.

  • bottom node: the same as bottom gradient of the normal arc, such as #ffeb3bff. Except the alpha should be set to zero, so we have the final result as #ffeb3b00.

Fix Outline

In case you did not notice in this arc, there is an annoying outline like looks. It happened because there is bottom object with color.

Overlay Arc: Annoying Outline

You can fix this by add very slight length to the arc. By altering sodipodi:start, from 0 to -0.01. You can do it directly by using XML editor.

Overlay Arc: Change start XML Editor

Of course you have to change the top gradient node to the same stroke color with background, such as #f5f5f5ff.

Now you have yourself a smooth arc.

Overlay Arc: Fix Outline

FFMPEG

The result is here:

Not pretty useful. But I feel happy that I tried. I will use it for my presentation someday in about 2020


Kdenlive

You can utilize transparency for use with kdenlive, to create watermark.

Timeline

It is pretty easy to add a bunch of images as frames in kdenlive timeline.

Transparent Watermark in Video using Kdenlive

The issue comes when you have to do repetitive task such as edit duration.

XML

If you think, that editing duration is cumbersome, you can also edit *.kdenlive file artefact in text editor. And then replace all occurence of the length property, from five second to one second. Or to be exact from 00:00:05.000 to 00:00:01.000.

 <producer id="producer2" in="00:00:00.000" out="00:00:00.960">
  <property name="length">00:00:01.000</property>
  <property name="eof">pause</property>
  <property name="resource">/home/epsi/Documents/progress-ring/progress-005.png</property>
  ...
 </producer>

Editing Kdenlive in Text Editor

FFMPEG

The render result from kdenlive is big. I can reduce the size using ffmpeg.

$ ffmpeg -i test-bengkel-shadow.mp4 \
    -vf "scale=iw/4:ih/4" \
    -an \
    test-bengkel-fourth-shadow.mp4

MP4 Result


I think that’s all for now.

Thank you for visiting.