Blog

Creating video with KDEnlive on FreeBSD

Importing and renaming raw video clips with creating time on FreeBSD.

Import or copy the raw video clips from the camera and store them on a temporary local fast file system. Rename the raw video clips, so the filename contains the time stamp. This will become convenient later, when listing and loading them. The following csh script uses the stat utility to get the file creation time stamp and then renames the video clips accordingly.

$ cat rename-mp4
#!/bin/csh
foreach file (*.MP4)
  set newname = `stat -f '%SB' -t '%y%m%d-%H%M%S' "$file"`
  mv "$file" "${newname}-${file}"
end

An example of the manual approach, for the same result, would be the following commands.

$ mv MGR103.MP4 240314-213544-MGR103.MP4
$ mv MGP101.MP4 240314-213535-MGP101.MP4

Creating a new project and profile preset in KDEnlive.

Launch KDEnlive and create a new project. KDEnlive will ask you to select a profile preset. In the settings, select or create a profile preset, that matches the raw video clips from the camera and the main format, you will be targetting. If you will be creating a new profile preset, find a general profile preset and I recommend using a naming convention, that reflects the resolution and frame rate.

  • Action cameras, such as the legendary GoPro Hero 3 Black, produces high resolution frames in more narrow aspect ratio and high frame rate, such as 1920×1080@60 (16:9).
  • Cam corders, such as the legendary Sony FDR AX43, produces high resolution frames in traditional film aspect ratio and frame rate, such as 3840×2160@25 (16:9) or 1920×1080@25 (19:6).
  • Mobile phoes, such as Samsung Galaxy A series, produces moderate resolution frames, such as 1920×1080@25 (16:9) or 1080×1920@25 (9:16).

Editing video and audio on the timeline i KDEnlive.

Adding effects i KDEnlive.

If you want to add a watermark, also known as an overlay, you will need an image with your logo or watermark. If the watermark is transparent, it will most likely be in PNG format. Add a track on top of the video in the timeline and place the watermark in it. Stretch it, so it matches the full length of the video. You can now place the watermark, where you want it to be, by opening the effects window, finding the transformation effects and selecting the Crop, Scale and Tilt effect. Adjust the scale and tilt values as necessary. If the video is 1080 pixels wide and the watermark is 200 pixels wide, you might want to scale to 20 and 20 and tilt to 953 and 1779.

Exporting video clips for other use.

If you will be exporting video clips for other use, then use the input and output markers to export those at this point and before any formatting and watermarking. Use a naming convention, that keeps the clips in chronological order, such as a time based prefix and a descriptive tekst. Such clips can later be formatted and watermarked with KDEnlive or FFmpeg for sharing or use on social media.

X and GNOME for FreeBSD

Xrandr.

If you just attached a monitor to your computer, such an external monitor or TV via HDMI, you can activate it in GNOME with Xrandr. Just run the utility. If you want to configure it in GNOME, then go to GNOME settings and Display.

% xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
eDP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 276mm x 155mm
   1920x1080     60.05*+  60.01    59.97    59.96    59.93  
DP-1 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
DP-2 disconnected (normal left inverted right x axis y axis)
HDMI-2 connected (normal left inverted right x axis y axis)
   3840x2160     30.00 +  25.00    24.00    29.97    23.98  

GNOME Tweaks.

Go to Appearance and change Applications from Adwaita to Adwaita-dark. This will make non-GTK applications, such as third party applications, dark mode as well as the GNOME applications.

% gnome-tweaks

Night Time Indoor Snapshot Flash Photography

What is night time indoor snapshot flash photography?

The purpose of night time indoor snapshot flash photography is to have a light weight hand-held camera gear, that can quickly be switched on and framed to capture snapshots of individuals, groups and even take selfies, while also capturing colorful background ambient light in the club or private party. This type of photography is also known as event photography.

This can be achieved with a digital camera, a wide angle lens and an external speedlight flash. The shooting proces should be swift and automatic, so natural, creative expressions are captured, while also having fun with it. There will not be time for fumbling aound with settings and cumbersome gear.

Configure camera and flash for capturing low light snapshots.

  1. Use a lens, that spans a wider viewing angle around 50°, such as the well known Canon EF-S 24mm f/2.8 STM lens.
  2. Set the camera mode to manual and dial in the camera exposure to 1/8s, f/2.8 and ISO 100. This will be the default go-to exposure setting. This should give you a good captura of the ambient background. If this is too bright or too dark for your application, or you have a much different lens, you will want to adjust the aperture, shutter speed and ISO in that order until the best ambient background is achieved.
  3. Set image review to hold. Subjects will almost always want to see the image, so it might as well be ready for them. Set white balance to daylight. The flash, changing lighting and and mixed light sources will not work well for the automatic white balance. Set light meter to evaluative mode.
  4. Attach the white diffuser to the flash for a slight more soft lighting. Attach the flash to the camera and point it directly at subject. It will usually not be possible to bounce light off walls and there will usually not be time to experiment with bounced light neither. Set flash mode to TTL mode.
  5. If your camera has live preview, your might want to use this. This will usually enable automatic eye tracking and make it easier to compose some shoots. The downside of this is decreased battery life.

Photograph individuals, groups and even selfies, while also capturing colorful background lights.

You can now grab your camera and walk around and do night time indoor snapshot flash photography. You can quickly capture and photograph individuals, groups and even selfies, while also capturing colorful background lights. The camera immediately holds the image, so you can show it. Just press the shutter to continue shooting.

You might want to adjust flash exposure and aperture as necessary.

  1. Adjust flash exposure compensation as necessary. If people are much brigher than grey, the flash might need more power. If people are much darker than grey, the flash might need less power. The reason is, that the camera will try to power each scene grey, so this should be compensated for. You might also prefer a lighter or darker appearance for effect. You will usually want to adjust flash exposure compensation in 1/3 stops, such as 0.3, 0.7 and 1.0.
  2. Adjust aperture as necessary. If you will be photographing groups, you might want more depth of field. This is done by adjusting the aperture and ISO in the same amount of stops, so the camera exposure remains the same. If you want 1 stop from f/2.8, then change to f/4.0 and ISO 200. If you want 2 stops from f/2.8, then change to f/5.6 and ISO 400. The aperture dial usually moves in 1/3 stops, but remember to turn the ISO dial the same amount, so the camera exposure remains the same.

How to configure SPF policy record in BIND DNS

What is SPF?

SPF is short for Sender Policy Framework and is an internet standard, that ensures, that email is in fact sent from authorized mail servers. SPF is also known as an SPF policy or an SPF record. SPF is a special TXT resource record (RR) for the domain in DNS. The TXT RR contains a list of mail servers, that is authorized to send email on behalf on the domain. You can configure an SPF policy record in BIND DNS.

Continue reading “How to configure SPF policy record in BIND DNS”

How to install OpenDKIM for Sendmail on FreeBSD

What is DKIM?

DKIM is short for Domain Keys Identified Mail and is an internet standard, that ensures, that an email is in fact authorized by the owner of the domain, and, that its content is authentic and has not been modified. DKIM is available for FreeBSD as the OpenDKIM package or port. OpenDKIM is a milter for Sendmail, which is the default mail server in FreeBSD.

Continue reading “How to install OpenDKIM for Sendmail on FreeBSD”