Closed superbonaci closed 3 months ago
Chapters are working perfectly fine
You have to add upper clamp to chapters offset as well:
This is what looks like 8de54ef:
$ ffprobe -hide_banner -i clip.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Finishing Bread & Fred with @limealicious | !newvid !supps (2065608792)
artist : bao
date : 2024
encoder : Lavf60.16.100
comment : Originally aired: 2024-02-17 18:05:48Z
: Video id: 2065608792
: Views: 49014
Duration: 00:18:09.00, start: 0.000000, bitrate: 1258 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 100.000000
Metadata:
title : Bread & Fred
Chapter #0:1: start 100.000000, end 1089.000000
Metadata:
title : Just Chatting
Chapter #0:2: start 1089.000000, end 1089.000333
Metadata:
title : Palworld
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 852x480 [SAR 1:1 DAR 71:40], 1197 kb/s, 30 fps, 30 tbr, 90k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 53 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2[0x3](eng): Data: bin_data (text / 0x74786574)
Metadata:
handler_name : SubtitleHandler
Unsupported codec with id 98314 for input stream 2
This is what it should look like:
$ ffprobe -hide_banner -i clip.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'clip.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
title : Finishing Bread & Fred with @limealicious | !newvid !supps (2065608792)
artist : bao
date : 2024
encoder : Lavf60.16.100
comment : Originally aired: 2024-02-17 18:05:48Z
: Video id: 2065608792
: Views: 49014
Duration: 00:18:09.00, start: 0.000000, bitrate: 1258 kb/s
Chapters:
Chapter #0:0: start 0.000000, end 100.000000
Metadata:
title : Bread & Fred
Chapter #0:1: start 100.000000, end 1089.000000
Metadata:
title : Just Chatting
Stream #0:0[0x1](und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 852x480 [SAR 1:1 DAR 71:40], 1197 kb/s, 30 fps, 30 tbr, 90k tbn (default)
Metadata:
handler_name : VideoHandler
vendor_id : [0][0][0][0]
Stream #0:1[0x2](und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 53 kb/s (default)
Metadata:
handler_name : SoundHandler
vendor_id : [0][0][0][0]
Stream #0:2[0x3](eng): Data: bin_data (text / 0x74786574)
Metadata:
handler_name : SubtitleHandler
Unsupported codec with id 98314 for input stream 2
I would argue this is technically not our problem, but its fixed anyways.
It's not properly fixed because adds chapters with negative time.
FFmpeg discards the negative chapters.
But not the positive, at least the last time I tried.
Checklist
Edition
Unsure
Describe your issue here
This is
metadata.txt
for the entire ID:This is how it looks like by current commit 79eab7f when downloading part of the ID:
This is how the trimmed metadata should look like:
All chapters that fall within the output timestamp must be included and their START and END shifted and trimmed accordingly.
Add any related files or extra information here
No response