Bug 451936 - Rendering with chapters
Summary: Rendering with chapters
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-26 16:42 UTC by mau
Modified: 2023-07-28 07:20 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mau 2022-03-26 16:42:44 UTC
As far as I know, there is currently no way to render the final movie with guides as chapters. So I'm forced to follow this workflow:
1. add guides to projects
2. render film to one file (I use mp4 as the output format)
3. use ffmpeg to extract metadata: ffmpeg -i film.mp4 -f ffmetadata FFMETADATAFILE
4. add chapter timestamps to FFMETADATAFILE
5. use ffmpeg to add chapters: ffmpeg -i film.mp4 -i FFMETADATAFILE -map_metadata 1 -codec copy film_meta.mp4
(6. add cover image using ffmpeg... but that's a different story)
Comment 1 Claudius 2023-02-13 21:59:33 UTC
My current workflow is:
Right-Clicking the timeline, exporting the guides as `{{frame}} {{comment}}`

And the next step I do by hand (which is okayish for a handful of chapters).

I turn this list from 

```
0 Name of Chapter 1
1230 Name of Chapter 2
5321 Name of Chapter 3
```

into

```
;FFMETADATA1

[CHAPTER]
TIMEBASE=1/30
START=0
END=1229
title=Name of Chapter 1

[CHAPTER]
TIMEBASE=1/30
START=1230
END=5320
title=Name of Chapter 2

[CHAPTER]
TIMEBASE=1/30
START=5321
END=8000
title=Name of Chapter 3
```

(assuming 30 fps, hence the somewhat uncommon TIMEBASE=1/30)

Which I then integrate with ffmpeg after the fact, (as written by mau in the previous comment)

It would be amazing to have this as a checkable box within the render interface instead.
Comment 2 Claudius 2023-02-13 22:29:12 UTC
As a first step, this export dialog could likely be enhanced to produce the `FFMETADATAFILE` directly: https://invent.kde.org/multimedia/kdenlive/-/blob/master/src/dialogs/exportguidesdialog.cpp
Comment 3 Jean-Baptiste Mardelle 2023-07-28 07:20:42 UTC
Git commit 20107347fcbb25ecfc3eeee8e372bc28b6d1220d by Jean-Baptiste Mardelle.
Committed on 28/07/2023 at 09:20.
Pushed by mardelle into branch 'master'.

Add option to export guides as FFmpeg chapter file

M  +10   -5    src/bin/model/markerlistmodel.cpp
M  +43   -4    src/dialogs/exportguidesdialog.cpp
M  +1    -0    src/dialogs/exportguidesdialog.h
M  +87   -69   src/ui/exportguidesdialog_ui.ui

https://invent.kde.org/multimedia/kdenlive/-/commit/20107347fcbb25ecfc3eeee8e372bc28b6d1220d