I found an alternative solution for finding the right place via chapters #1

Open
opened 2023-05-27 17:48:11 +02:00 by kalliope7.4 · 2 comments

You can write chapters into the metadata of video and audio files with ffmpeg:

copy metadata:

ffmpeg -i FRIDAY_JAMS_WITH_ariathome_\[v1830087678\].mp4 -f ffmetadata meta.txt

add the following:

[CHAPTER]
TIMEBASE=1/1
START=1929
#chapter ends at 0:32:09
END=2910
title=\#1: First Song
[CHAPTER]
TIMEBASE=1/1
START=2910
END=4660
title=\#2: Second Song

Write metadata to file:

ffmpeg -i FRIDAY_JAMS_WITH_ariathome_\[v1830087678\].mp4 -i meta.txt -map_metadata 1 -map_chapters 1 -codec copy FRIDAY_JAMS_WITH_ariathome_\[v1830087678\]_chaps.mp4

Result:

image

Those markings are the chapters and you can jump between them, list them with title and all.

You can write chapters into the metadata of video and audio files with ffmpeg: copy metadata: `ffmpeg -i FRIDAY_JAMS_WITH_ariathome_\[v1830087678\].mp4 -f ffmetadata meta.txt` add the following: ``` [CHAPTER] TIMEBASE=1/1 START=1929 #chapter ends at 0:32:09 END=2910 title=\#1: First Song [CHAPTER] TIMEBASE=1/1 START=2910 END=4660 title=\#2: Second Song ``` Write metadata to file: `ffmpeg -i FRIDAY_JAMS_WITH_ariathome_\[v1830087678\].mp4 -i meta.txt -map_metadata 1 -map_chapters 1 -codec copy FRIDAY_JAMS_WITH_ariathome_\[v1830087678\]_chaps.mp4` Result: ![image](/attachments/11b3dc17-cc38-4000-b943-3de747a6f178) Those markings are the chapters and you can jump between them, list them with title and all.
kalliope7.4 changed title from I found a alternative solution for finding the right place via chapters to I found an alternative solution for finding the right place via chapters 2023-05-27 17:50:18 +02:00
Author

I chose a timebase (resolution) of 1s. (TIMEBASE=1/1)

It is also possible to use milliseconds: TIMEBASE=1/1000 and START=1929000...

I chose a timebase (resolution) of 1s. (`TIMEBASE=1/1`) It is also possible to use milliseconds: `TIMEBASE=1/1000` and `START=1929000`...
Owner

Nice way! Because I prefer to have smaller files, one can create an option to save chapters as tags. I want to keep chapterfiles as default.

Feel free to create a pull request!

Nice way! Because I prefer to have smaller files, one can create an option to save chapters as tags. I want to keep chapterfiles as default. Feel free to create a pull request!
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: beat/hpmor_split#1
No description provided.