site  contact  subhomenews

Fixed Kdenlive project setup

May 27, 2023 — BarryK

The intention is to create videos for YouTube. Say that I wanted to film an unboxing and assembly of a product. The way that I envisaged recording this is record a video, then in a video editor cut it into pieces and create the video as intended to be uploaded to YouTube. Then in the video editor, play the video and record my voice, giving commentary.

I looked at the free open-source video editors available for Linux, OpenShot, ShotCut, Pitivi, etc., but surprisingly only Kdenlive allowed direct audio recording from a microphone (as far as I could determine). All of the others required to use an external app, such as gWaveEdit or Audacity, to record the audio, then import the audio file into the video editor.

Here is how it is done in Kdenlive, easy-peasy:

https://www.youtube.com/watch?v=_6zOPgtSjds

A bit more reading, some reviewers claiming Kdenlive is superior to the others. OK, have settled on using Kdenlive.

I updated the AppImage Installer (Appi) to install the latest version of Kdenlive:

https://github.com/bkauler/woofq/commit/467020caa587d3f649db125d644a58d0382d39e7

When an AppImage or Flatpak is installed, folder /files/apps/<app name> is created, a convenient place for keeping project files. Convenient, because /files is a link to /mnt/wkg/files in the working-partition, not in the current-session-in-ram, so whatever is created under /files is permanently saved.

However, encountered a couple of problems. I was following the quick-start guide here:

https://docs.kdenlive.org/en/getting_started/quickstart.html#quickstart

Kdenlive is running as user "kdenlive", with home folder /home/kdenlive, but with read-write permission under /files. The installer, Appi or Flapi, creates /files/apps/kdenlive, so this is where I created the project, or rather tried to.

For a start, the 'apps' folder is supposed to have permissions "770" and ownership "root:filesgrp", but somehow it had become "root:root" -- that is, belonged to the "root" group instead of "filesgrp". Don't know how that happened, but I do a lot of messing around. So fixed it:

# chown root:filesgrp /files/apps

I created folders and some video files for the quick-start, under /files/apps/kdenlive/quickstart-tutorial, but this is where ran into trouble. In Puppy, we usually do not have to be concerned with folder and file permissions, but now it has become a problem.

I created that "quickstart-tutorial" as the administrator (root user) and it has permissions 755, meaning that Kdenlive can see it but is unable to write into it. To get around this problem, added this check:

https://github.com/bkauler/woofq/commit/e3c5740172e9cd8af8854558d970a97e37343677

Which can also be done manually:

# chown -h -R kdenlive:kdenlive /files/apps/kdenlive

The fix will be automatic if create the project folder and any sub-folders before starting Kdenlive. Otherwise, have to run the above command.

It is an annoyance, but have to live with it. I suppose could create a daemon that waits for any folder changes under files/apps and runs the chown, but that is probably an overkill.

Note, the problem is only for folders created by the administrator. If the administrator copies video and audio files into /files/apps/kdenlive/quickstart-tutorial, no problem. The files have permissions 755 and Kdenlive is able to read them, which is all that is required.

EDIT:
Hey, I'm dumb sometimes! In Kdenlive, "File -> Open", the dialog window allows creation of folders, and those folders will have "kdenlive:kdenlive" ownership.

Problem solved. if create those project folders as the administrator, do it before starting Kdenlive, then the automatic fix will kick in. Otherwise, create whatever folders are needed from the Open dialog.

EDIT 2023-05-28:
Have had a rethink, come up with a better solution. See next blog post:

https://bkhome.org/news/202305/setting-up-permissions-under-files-take-2.html     

Tags: easy