Jump to content

Kdenlive/Development/File format: Difference between revisions

From KDE Community Wiki
Camillem (talk | contribs)
Precising the version of the file format
Jlskuz (talk | contribs)
Move information from www.kdenlive.org
Line 1: Line 1:
Kdenlive's project files (<code>.kdenlive</code> files) use an XML format, based on MLT's format.
Kdenlive's project files (<code>.kdenlive</code> files) use an XML format, based on MLT's format to describe the source media used in a project, as well as the use of that media as in the timeline. For most media, such as video, audio, and images, Kdenlive stores only a reference in a project, but not the media itself. Only some media gets stored directly inside Kdenlive’s project files, most notably Kdenlive title and color clips.
There is currently three file formats to be distinguised depending on the version of Kdenlive you're using, as explained in
 
There are different file format generations depending on the version of Kdenlive you're using.
 
The amount of Kdenlive project data considers considerably between gen-1 and gen-2 projects.
 
[https://kdenlive.org/en/project/kdenlive-projects/ "Kdenlive Projects" article on the Website]
[https://kdenlive.org/en/project/kdenlive-projects/ "Kdenlive Projects" article on the Website]


== Kdenlive/KF5 ("Generation 2")Project File Format==
== Generation 1 ==
Generation 1 (gen-1) projects were created and edited the last time using Kdenlive up to 0.9.10. These are the Kdenlive versions developed for KDE 4.x. (While this isn’t strictly true, we won’t go into discussions about the early KDE 3.x versions of Kdenlive.)


With the KF5/Qt5 version of Kdenlive, we now store all Kdenlive data through MLT's xml module.
The gen-1 projects contain a lot of project data that needs to be duplicated into the outer MLT XML data in order to MLT understanding what it needs to do. As an unfortunate consequence of this data duplicity, gen-1 projects had the habit of getting the outer MLT data out of sync with the inner Kdenlive project data. For instance, sometimes the effects as rendered got out of sync with the effect parameters as set in the Kdenlive user interface. As the proper remedy for this situation, the Kdenlive developers switched to Generation 2 as part of their porting Kdenlive to the KDE Frameworks 5 (or “KF5” for short).
This means that all information must be stored in MLT objects like Tractor, Playlist, Producer, etc.
 
== Generation 2: KF5 ==
Generation 2 projects are those created or last edited using Kdenlive 15.04 or later, up to 17.08 stable.
 
With the KF5/Qt5 version of Kdenlive, we now store all Kdenlive data through MLT's xml module to remove the data duplicity from the Kdenlive project file structure.
This fixed project data model results in much more stable Kdenlive project behavior. As another positive side effect, it’s now much easier to manually edit or create Kdenlive XML project files from outside Kdenlive.
We avoid storing any inner Kdenlive project data that’s already present in the outer MLT data layer, this means that all information must be stored in MLT objects like Tractor, Playlist, Producer, etc.


To separate these properties from other MLT properties, we prefix them with "kdenlive:".
To separate these properties from other MLT properties, we prefix them with "kdenlive:".
Line 24: Line 35:


*'''kdenlive:folder.xxx.yyy'''<br />This property stores the names of folders created in the Project Bin. xxx is the id of the parent folder (-1 for root) and yyy is the id for this folder. The value of this property is the name of the folder.
*'''kdenlive:folder.xxx.yyy'''<br />This property stores the names of folders created in the Project Bin. xxx is the id of the parent folder (-1 for root) and yyy is the id for this folder. The value of this property is the name of the folder.
== Generation 3: Timeline 2 ==
Generation 3 projects are those projects created or edited using Kdenlive versions with the new Timeline 2 engine.
== Generation 4 ==
TODO
== Further Reading ==
* [https://kdenlive.org/en/project/kdenlive-project-file-format/ Kdenlive Project Format] gives more insight into the general structure of Kdenlive gen-2 project files.
* The [https://thediveo-e.blogspot.de/2016/07/inside-kdenlive-projects-analyzer.html Kdenlive Project Analyzer] is kind of a (crazy) simple Kdenlive doctor, showing some statistics and details when given a Kdenlive gen-2 project file. You can even try the Kdenlive Project Analyzer [https://thediveo.github.io/kdenlive-project-analyzer/kdenlive-project-analyzer.html online] using Chrome/Chromium or Firefox. [https://github.com/TheDiveO/kdenlive-project-analyzer Sources are available on GitHub.]

Revision as of 14:29, 1 May 2021

Kdenlive's project files (.kdenlive files) use an XML format, based on MLT's format to describe the source media used in a project, as well as the use of that media as in the timeline. For most media, such as video, audio, and images, Kdenlive stores only a reference in a project, but not the media itself. Only some media gets stored directly inside Kdenlive’s project files, most notably Kdenlive title and color clips.

There are different file format generations depending on the version of Kdenlive you're using.

The amount of Kdenlive project data considers considerably between gen-1 and gen-2 projects.

"Kdenlive Projects" article on the Website

Generation 1

Generation 1 (gen-1) projects were created and edited the last time using Kdenlive up to 0.9.10. These are the Kdenlive versions developed for KDE 4.x. (While this isn’t strictly true, we won’t go into discussions about the early KDE 3.x versions of Kdenlive.)

The gen-1 projects contain a lot of project data that needs to be duplicated into the outer MLT XML data in order to MLT understanding what it needs to do. As an unfortunate consequence of this data duplicity, gen-1 projects had the habit of getting the outer MLT data out of sync with the inner Kdenlive project data. For instance, sometimes the effects as rendered got out of sync with the effect parameters as set in the Kdenlive user interface. As the proper remedy for this situation, the Kdenlive developers switched to Generation 2 as part of their porting Kdenlive to the KDE Frameworks 5 (or “KF5” for short).

Generation 2: KF5

Generation 2 projects are those created or last edited using Kdenlive 15.04 or later, up to 17.08 stable.

With the KF5/Qt5 version of Kdenlive, we now store all Kdenlive data through MLT's xml module to remove the data duplicity from the Kdenlive project file structure. This fixed project data model results in much more stable Kdenlive project behavior. As another positive side effect, it’s now much easier to manually edit or create Kdenlive XML project files from outside Kdenlive. We avoid storing any inner Kdenlive project data that’s already present in the outer MLT data layer, this means that all information must be stored in MLT objects like Tractor, Playlist, Producer, etc.

To separate these properties from other MLT properties, we prefix them with "kdenlive:". This page lists the properties that we use in this new file format.

Properties applied to project clips (MLT Producer object)

  • kdenlive:clipname
    Stores the name that will be displayed for this clip in the Project Bin
  • kdenlive:folderid
    Stores a string containing the id of the folder where this clip is (empty if clip is in the root folder).
  • kdenlive:zone_in
    Stores the "in" point for the play zone defined for this clip
  • kdenlive:zone_out
    Stores the "out" point for the play zone defined for this clip
  • kdenlive:originalurl
    Stores the clip's original url. Useful to retrieve original url when a clip was proxied.
  • kdenlive:proxy
    Stores the url for the proxy clip, or "-" if no proxy should be used for this clip.


Properties applied to the Bin PLaylist (MLT Playlist object "main bin")

  • kdenlive:folder.xxx.yyy
    This property stores the names of folders created in the Project Bin. xxx is the id of the parent folder (-1 for root) and yyy is the id for this folder. The value of this property is the name of the folder.

Generation 3: Timeline 2

Generation 3 projects are those projects created or edited using Kdenlive versions with the new Timeline 2 engine.

Generation 4

TODO

Further Reading