Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chapter markers to the video file does not work properly in ffmpeg-master-latest-win64 #48

Closed
candrapersada opened this issue Oct 20, 2023 · 7 comments

Comments

@candrapersada
Copy link

candrapersada commented Oct 20, 2023

why Title of the chapter not work properly in ffmpeg-master-latest-win64-gpl.zip

--embed-chapters                Add chapter markers to the video file
                                             (Alias: --add-chapters)
@bashonly
Copy link
Member

bashonly commented Oct 20, 2023

It's an upstream ffmpeg bug: https://trac.ffmpeg.org/ticket/10482

Workaround for now: use the n6.0 build instead of master

@bashonly
Copy link
Member

If we want to patch this ourselves instead of waiting for upstream, I think we could do this for master and this for release/6.0

nihil-admirari added a commit that referenced this issue Oct 21, 2023
nihil-admirari added a commit that referenced this issue Oct 21, 2023
@nihil-admirari
Copy link
Collaborator

nihil-admirari commented Oct 21, 2023

3c7dd5ed37da6d2de06c4850de5a319ca9cdd47f is not revertable:

2023-10-21T20:08:12.7518961Z fftools/ffmpeg_mux_init.c: In function 'copy_metadata':
2023-10-21T20:08:12.7531661Z fftools/ffmpeg_mux_init.c:1827:14: error: 'OptionsContext' has no member named 'metadata_global_manual'
2023-10-21T20:08:12.7532675Z  1827 |             o->metadata_global_manual = 1;
2023-10-21T20:08:12.7533200Z       |              ^~

@bashonly
Copy link
Member

bashonly commented Oct 21, 2023

Ah my bad. Looks like at some point after the initial bad commit, the o struct var was replaced by metadata_global_manual, metadata_streams_manual, metadata_chapters_manual int vars

I think the o-> needs to be replaced with * on each of those lines. So it would need a proper patch instead of git reverts

nihil-admirari added a commit that referenced this issue Oct 21, 2023
@nihil-admirari
Copy link
Collaborator

Replaced o->metadata_global_manual with *metadata_global_manual in 8bbf4dc.

If the build https://github.com/yt-dlp/FFmpeg-Builds/actions/runs/6599732180 succeeds and FFmpeg is tested as working the issue can be closed.

nihil-admirari added a commit that referenced this issue Oct 22, 2023
@nihil-admirari
Copy link
Collaborator

I've fixed the release patch. Please test.

@bashonly
Copy link
Member

bashonly commented Oct 22, 2023

Tested and confirmed fixed:

$ yt-dlp --print chapters M4gD1WSo5mA
[{'start_time': 0, 'end_time': 525.0, 'title': '<Untitled Chapter 1>'}, {'start_time': 525.0, 'title': 'Choreography', 'end_time': 560.0}, {'start_time': 560.0, 'title': 'What Underlies the Fixation Requirement', 'end_time': 662.0}, {'start_time': 662.0, 'title': 'Conventional Justification of the Fixation Requirement in Copyright Law', 'end_time': 721}]
Logs for ffmpeg-N-112499-ga76b409dd0
[debug] Command-line config: ['-v', '-f', '22', 'M4gD1WSo5mA', '--embed-chapters', '--ffmpeg-location', '/home/user/git/ffmpeg-build/ffmpeg-master-latest-linux64-gpl/bin']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version stable@2023.10.13 [b634ba742]
[debug] Lazy loading extractors is disabled
[debug] Python 3.9.2 (CPython x86_64 64bit) - Linux-5.10.0-26-amd64-x86_64-with-glibc2.31 (OpenSSL 1.1.1w  11 Sep 2023, glibc 2.31)
[debug] exe versions: ffmpeg N-112499-ga76b409dd0-20231022 (setts), ffprobe N-112499-ga76b409dd0-20231022
[debug] Optional libraries: Cryptodome-3.9.7, brotli-1.0.9, certifi-2020.06.20, sqlite3-3.34.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1890 extractors
[youtube] Extracting URL: M4gD1WSo5mA
[youtube] M4gD1WSo5mA: Downloading webpage
[youtube] M4gD1WSo5mA: Downloading ios player API JSON
[youtube] M4gD1WSo5mA: Downloading android player API JSON
[youtube] M4gD1WSo5mA: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] M4gD1WSo5mA: Downloading 1 format(s): 22
[debug] Invoking http downloader on "https://rr1---sn-vgqsknlz.googlevideo.com/videoplayback?expire=1698031051&ei=a5E1ZfCtMqyQ2_gPv-KK4A8&ip=x.x.x.x&id=o-AIneOBhAfwvwqOYllZYqdPGCia6Kdv3abaUmW7APEVqs&itag=22&source=youtube&requiressl=yes&mh=U1&mm=31%2C26&mn=sn-vgqsknlz%2Csn-p5qddn7d&ms=au%2Conr&mv=m&mvi=1&pl=18&initcwndbps=1147500&spc=UWF9f8c4nd24yA5vrO8yJ_l0Sr7uLbw&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=720.747&lmt=1472271864631848&mt=1698009183&fvip=1&fexp=24007246&beids=24350018&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AGM4YrMwRAIgbJLL8NHAk6-6uIIiF1iqgRyF3sYVnQrtRgu0CLkaSGgCICDYLRZRO7KFDCNZ4GaOnm_YBwlkwseTqflWsCJJZCnK&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AK1ks_kwRAIgEQc5OskA8Lg7a-Fmp2CYGL3FfBl-fYZH9JN7kzhbsNICICTzCwvy0f8m6nZ5f1B4Hjc6HgHKMN_4DTx_T8kMdNOg"
[download] Destination: William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4
[download] 100% of   62.68MiB in 00:00:05 at 10.45MiB/s  
[Metadata] Adding metadata to "William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4"
[debug] ffmpeg command line: /home/user/git/ffmpeg-build/ffmpeg-master-latest-linux64-gpl/bin/ffmpeg -y -loglevel repeat+info -i 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4' -i 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].meta' -map 0 -dn -ignore_unknown -c copy -map_metadata 1 -movflags +faststart 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].temp.mp4'

ffprobe:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.15.100
  Duration: 00:12:01.00, start: 0.000000, bitrate: 731 kb/s
    Chapter #0:0: start 0.000000, end 525.000000
    Metadata:
      title           : <Untitled Chapter 1>
    Chapter #0:1: start 525.000000, end 560.000000
    Metadata:
      title           : Choreography
    Chapter #0:2: start 560.000000, end 662.000000
    Metadata:
      title           : What Underlies the Fixation Requirement
    Chapter #0:3: start 662.000000, end 721.000000
    Metadata:
      title           : Conventional Justification of the Fixation Requirement in Copyright Law
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 599 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler
Logs for ffmpeg-n6.0-36-gc5039e158d
[debug] Command-line config: ['-v', '-f', '22', 'M4gD1WSo5mA', '--embed-chapters', '--ffmpeg-location', '/home/user/git/ffmpeg-build/ffmpeg-n6.0-latest-linux64-gpl-6.0/bin']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8 (No ANSI), error utf-8 (No ANSI), screen utf-8 (No ANSI)
[debug] yt-dlp version stable@2023.10.13 [b634ba742]
[debug] Lazy loading extractors is disabled
[debug] Python 3.9.2 (CPython x86_64 64bit) - Linux-5.10.0-26-amd64-x86_64-with-glibc2.31 (OpenSSL 1.1.1w  11 Sep 2023, glibc 2.31)
[debug] exe versions: ffmpeg n6.0-36-gc5039e158d-20231022 (setts), ffprobe n6.0-36-gc5039e158d-20231022
[debug] Optional libraries: Cryptodome-3.9.7, brotli-1.0.9, certifi-2020.06.20, sqlite3-3.34.1
[debug] Proxy map: {}
[debug] Request Handlers: urllib
[debug] Loaded 1890 extractors
[youtube] Extracting URL: M4gD1WSo5mA
[youtube] M4gD1WSo5mA: Downloading webpage
[youtube] M4gD1WSo5mA: Downloading ios player API JSON
[youtube] M4gD1WSo5mA: Downloading android player API JSON
[youtube] M4gD1WSo5mA: Downloading m3u8 information
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, size, br, asr, vext, aext, hasaud, id
[info] M4gD1WSo5mA: Downloading 1 format(s): 22
[debug] Invoking http downloader on "https://rr3---sn-vgqsrn67.googlevideo.com/videoplayback?expire=1698030969&ei=GZE1ZersKJKO2_gPvL6MmAI&ip=x.x.x.x&id=o-APpF1QabWG4ihxSXn4RJwyVb3RiRvgDHRqTU-46Ahkqm&itag=22&source=youtube&requiressl=yes&mh=U1&mm=31%2C29&mn=sn-vgqsrn67%2Csn-vgqsknlz&ms=au%2Crdu&mv=m&mvi=3&pl=18&initcwndbps=1115000&spc=UWF9fwBxpORYPiqslTkrwcZGBb7bPyY&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=720.747&lmt=1472271864631848&mt=1698008940&fvip=1&fexp=24007246&beids=24350018&c=ANDROID&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AGM4YrMwRQIhAJkiO8iz1GggPOEEwRTZnDDQN8kLcU80xa0mNcHbpHtYAiBnKTReNQQVewsrf0HF74yBURUqQXOFuVR06Qu2ajrZqQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AK1ks_kwRgIhALeZ5bV_gv6BqQtsh5caI3DjNcWIyNEn_5IzgLsAu-sjAiEAuWLnBAUmE7SCzWgTd_c0PG6INhGciRWfatfQRdE5v8I%3D"
[download] Destination: William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4
[download] 100% of   62.68MiB in 00:00:05 at 10.63MiB/s  
[Metadata] Adding metadata to "William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4"
[debug] ffmpeg command line: /home/user/git/ffmpeg-build/ffmpeg-n6.0-latest-linux64-gpl-6.0/bin/ffmpeg -y -loglevel repeat+info -i 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4' -i 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].meta' -map 0 -dn -ignore_unknown -c copy -map_metadata 1 -movflags +faststart 'file:William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].temp.mp4'

ffprobe:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'William Fisher, CopyrightX: Lecture 3.2, The Subject Matter of Copyright: Drama and choreography [M4gD1WSo5mA].mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf60.3.100
  Duration: 00:12:01.00, start: 0.000000, bitrate: 731 kb/s
    Chapter #0:0: start 0.000000, end 525.000000
    Metadata:
      title           : <Untitled Chapter 1>
    Chapter #0:1: start 525.000000, end 560.000000
    Metadata:
      title           : Choreography
    Chapter #0:2: start 560.000000, end 662.000000
    Metadata:
      title           : What Underlies the Fixation Requirement
    Chapter #0:3: start 662.000000, end 721.000000
    Metadata:
      title           : Conventional Justification of the Fixation Requirement in Copyright Law
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 599 kb/s, 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 125 kb/s (default)
    Metadata:
      handler_name    : ISO Media file produced by Google Inc.
    Stream #0:2(eng): Data: bin_data (text / 0x74786574), 0 kb/s
    Metadata:
      handler_name    : SubtitleHandler

Thanks @nihil-admirari for finessing and implementing these patches! and, of course, for maintaining this repo

github-actions bot pushed a commit that referenced this issue Oct 24, 2023
github-actions bot pushed a commit that referenced this issue Nov 12, 2023
github-actions bot pushed a commit that referenced this issue Nov 16, 2023
github-actions bot pushed a commit that referenced this issue Nov 30, 2023
github-actions bot pushed a commit that referenced this issue Dec 20, 2023
nihil-admirari added a commit that referenced this issue Dec 22, 2023
github-actions bot pushed a commit that referenced this issue Dec 26, 2023
github-actions bot pushed a commit that referenced this issue Jan 8, 2024
github-actions bot pushed a commit that referenced this issue Jan 27, 2024
nihil-admirari added a commit that referenced this issue Feb 25, 2024
github-actions bot pushed a commit that referenced this issue Mar 4, 2024
github-actions bot pushed a commit that referenced this issue Mar 9, 2024
github-actions bot pushed a commit that referenced this issue Mar 10, 2024
nihil-admirari added a commit that referenced this issue Mar 17, 2024
nihil-admirari added a commit that referenced this issue Mar 28, 2024
github-actions bot pushed a commit that referenced this issue Mar 30, 2024
github-actions bot pushed a commit that referenced this issue Apr 1, 2024
nihil-admirari added a commit that referenced this issue Apr 5, 2024
github-actions bot pushed a commit that referenced this issue Apr 6, 2024
github-actions bot pushed a commit that referenced this issue Apr 16, 2024
github-actions bot pushed a commit that referenced this issue May 3, 2024
nihil-admirari added a commit that referenced this issue May 12, 2024
nihil-admirari added a commit that referenced this issue May 29, 2024
nihil-admirari added a commit that referenced this issue Jun 3, 2024
github-actions bot pushed a commit that referenced this issue Jun 4, 2024
github-actions bot pushed a commit that referenced this issue Jun 10, 2024
github-actions bot pushed a commit that referenced this issue Jun 24, 2024
github-actions bot pushed a commit that referenced this issue Jun 28, 2024
github-actions bot pushed a commit that referenced this issue Jul 20, 2024
github-actions bot pushed a commit that referenced this issue Jul 31, 2024
github-actions bot pushed a commit that referenced this issue Aug 4, 2024
github-actions bot pushed a commit that referenced this issue Aug 10, 2024
github-actions bot pushed a commit that referenced this issue Aug 11, 2024
github-actions bot pushed a commit that referenced this issue Aug 21, 2024
github-actions bot pushed a commit that referenced this issue Aug 25, 2024
nihil-admirari added a commit that referenced this issue Aug 31, 2024
github-actions bot pushed a commit that referenced this issue Sep 4, 2024
github-actions bot pushed a commit that referenced this issue Sep 5, 2024
github-actions bot pushed a commit that referenced this issue Sep 11, 2024
nihil-admirari added a commit that referenced this issue Oct 3, 2024
github-actions bot pushed a commit that referenced this issue Oct 6, 2024
github-actions bot pushed a commit that referenced this issue Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants