https://bugs.kde.org/show_bug.cgi?id=499812

--- Comment #2 from Molly Messner <obs...@obskyr.io> ---
Eventually, it would be nice to have a separate set of commands – having to
create an intermediate file is slightly fraught (of course, on Linux, you can
generally create an in-memory pseudo-file, but that isnʼt available on all
operating systems), and itʼs easier to manually work with a direct command-line
flow (as an example, Iʼve never ever written an `FFMETADATA` file manually,
since itʼs just too darn much faff – though that *is* a particularly faffy
syntax).  Additionally, itʼs hard to imagine a text file syntax that supports
all the different properties for chapters in various metadata formats without
being annoying… unless one makes it a JSON file or somesuch, but then the user
certainly wouldnʼt want to type it out manually. Iʼm imagining something akin
to:

* `chapters list`: Would list the existing chapters in a way thstʼs both
readable to humans and easily machine-parsable.
* `chapters insert 0:58:39.606 1:21:01.567 "Title Here"`: Would insert the
specified chapter after the time-wise preceding chapter. Would also take a
switch. `--index`, in case the user wants to insert it at a particular
position. More switches could be added for more obscure properties only found
in certain metadata formats – say, for chapter images, or all of Matroskaʼs
heaps of features. The end time would be ignored for VorbisComment.
* `chapters delete 3`: Would delete the chapter with index #3. Matroska may
require extra syntax due to its potential for *nested chapters*(! What!) – say,
`chapters delete 3.2`
* `chapters edit 3 * * "New Title"`: Would allow editing an existing chapter.
* `chapters sort`: Would sort the chapters by start time if theyʼre out of
order.
* `chapters clear`: Would remove all chapter-related tags from the file.

Implementing those without any special options would be enough for 95% of cases
– and then itʼd be extensible, should those extra features be desired.

For formats with multiple different chapter formats, one could add a switch:
`chapters insert 0 43.3 "Title Here" --format nero`, for example, for MP4. (I
donʼt believe Kid3 supports Nero chapters – the `chpl` atom – at present, but
hey, if it should ever.) Matroska might require the additional switch
`--edition 1` (though itʼd default to the default edition) and a command for
adding/deleting/editing editions, but… that feels like a decidedly “cross that
bridge when one comes to it” sort of problem. Same goes for Matroska chapter
menu features, which it doesnʼt feel like Kid3 has to be able to edit… at least
certainly not as part of CLI chapter editing support as a feature in itself.

All that said, implementing a new set of commands is a good bit more work, so
if itʼs relatively trivial to add the file import solution, it *would* be nice!

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to