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

EmbedThumbnail not working, error received #17

Closed
6 tasks done
WildManiac opened this issue Jan 13, 2021 · 1 comment
Closed
6 tasks done

EmbedThumbnail not working, error received #17

WildManiac opened this issue Jan 13, 2021 · 1 comment

Comments

@WildManiac
Copy link

Checklist

  • I'm reporting a broken site support issue
  • I've verified that I'm running yt-dlp version 2021.01.12
  • I've checked that all provided URLs are alive and playable in a browser
  • I've checked that all URLs and arguments with special characters are properly quoted or escaped
  • I've searched the bugtracker for similar bug reports including closed ones
  • I've read bugs section in FAQ

Verbose log

C:\Users\Glen>youtube-dlc https://www.youtube.com/watch?v=U4lz8MN6MQA -v
[debug] System config: []
[debug] User config: ['-o', 'F:/VideoDownloads/%(extractor_key)s/%(uploader)s/%(title)s-%(id)s.%(ext)s', '--add-metadata', '--embed-thumbnail', '--sub-lang', 'en', '--write-sub', '--embed-sub', '--merge-output-format', 'mp4', '-S', 'res,codec:h264,fps']
[debug] Custom config: []
[debug] Command-line args: ['https://www.youtube.com/watch?v=U4lz8MN6MQA', '-v']
[debug] Loading archive file None
[debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252
[debug] yt-dlp version 2021.01.12
[debug] Python version 3.8.7 (CPython) - Windows-10-10.0.19041-SP0
[debug] exe versions: ffmpeg 2021-01-12-git-ca21cb1e36-essentials_build-www.gyan.dev, ffprobe 2021-01-12-git-ca21cb1e36-essentials_build-www.gyan.dev
[debug] Proxy map: {}
[youtube] U4lz8MN6MQA: Downloading webpage
[debug] Sort order given by user: res,codec:h264,fps
[debug] Formats sorted by: has_video, quality, dimension, vcodec:h264(7), acodec, fps, extractor_preference, language_preference, filesize, filesize_approx, tbr, vbr, abr, asr, protocol, vext, aext, has_audio, source_preference, format_id
[debug] Default format spec: bestvideo*+bestaudio/best
[info] Downloading format(s) 137+251
[info] Writing video subtitles to: F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.en.vtt
[debug] Invoking downloader on 'https://www.youtube.com/api/timedtext?lang=en&v=U4lz8MN6MQA&fmt=vtt&name='
[download] Destination: F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.en.vtt
[download] 100% of 1.60KiB in 00:00
[youtube] U4lz8MN6MQA: Downloading thumbnail ...
[youtube] U4lz8MN6MQA: Writing thumbnail to: F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.webp
[download] F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4 has already been downloaded and merged
[Metadata] Adding metadata to 'F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4" -map 0 -dn -c copy -metadata "title=DOOM CROSSING: Eternal Horizons ■ Music Video feat. Natalia Natchan" -metadata "date=20200415" -metadata "description=🎵 Listen to the EXTENDED VERSION: https://band.link/doomcrossing
➡ Follow us on Spotify: http://spoti.fi/3fgwEt2

We couldn't walk past the most unexpected game crossover of 2020. With \"Animal Crossing: New Horizons\" and \"DOOM Eternal\" released the same day, the adorable duo of Isabelle and Doom Slayer aka Doom Guy has spread across the Internet.
We thought that it may be a good idea to mix the sound of both worlds into one song and animation!

👍 Love the song? SUBSCRIBE for more gaming meme music stuff and LIKE the vid!

Listen to the FULL VERSION:
🎵 Spotify: https://spoti.fi/2VsCcYk
🎵 Apple Music / iTunes: https://apple.co/34FWS3g
🎵 Google Play Music: https://bit.ly/2XC1Zjv
🎵 Deezer: https://www.deezer.com/en/album/141787552
🎵 Amazon Music: https://amzn.to/2RDW0He
🎵 YOUTUBE: https://www.youtube.com/watch?v=QydzTeVCeAA

➡ Buy the song: http://thechalkeaters.bandcamp.com/
➡ Support the team and get cool bonuses: http://patreon.com/thechalkeaters
➡ Tabs and Chords here: https://www.patreon.com/posts/37861444

➡ Follow is on SPOTIFY: https://open.spotify.com/artist/7x7YgBS9WW3rfvfagAlohI
➡ Follow us on Twitter: http://twitter.com/thechalkeaters
➡ Follow us on VK: http://vk.com/thechalkeaters
➡ Follow us on TikTok: http://tiktok.com/@thechalkeaters
➡ Download wallpapers from this video: https://photos.app.goo.gl/XopphQMjdZSuBYCv6

We are The Chalkeaters, the gaming music project based in Saint Petersburg, Russia. We make comedy songs and music videos about video games, gaming industry and related memes.

■■■

Song “Doom Crossing: Eternal Horizons” by
THE CHALKEATERS:

Executive producer / songwriter: Alios [ http://twitter.com/aliospony ]

Composer / arranger: Ergy [ https://www.youtube.com/channel/UC28IhAYaXfk1uYNeAaCCN4w ]

Sound producer, arranger and engineer: Masel [ hire: https://soundbetter.com/profiles/269369-tim-maslov ]

\"Animal Crossing\" artist / cover artist: Pondis [ https://instagram.com/pondis_dant, https://twitter.com/pondis_dant ]

\"DOOM\" artist: Hunternif [ https://www.deviantart.com/hunternif, https://twitter.com/nifigager ]

Character animator: Yumi the Cat [ https://www.youtube.com/YumiTheCat, https://twitter.com/yumithecat08 ]

Motion designer, supporting animator and supporting sound engineer: Lenich [ https://www.youtube.com/user/LenichKirya ]

■■■

Isabelle vocals:
Natalia Natchan aka PiNKII [ https://www.youtube.com/channel/UCWRmOz2SA9MyudIzK5X6gdw ]

\"DOOM\" supporting artist: Fedor Titov [ https://www.deviantart.com/quiet-victories ]
Brutal \"DOOM\" voice: Jonathan Luhmann
Piano: Dmitry Kovzel
Flugelhorn: Kelly O'Donohue

■■■

Special thanks to Mick Gordon and Kazumi Totaka for amazingly beautiful game soundtracks that in many ways inspired this song!" -metadata "comment=🎵 Listen to the EXTENDED VERSION: https://band.link/doomcrossing
➡ Follow us on Spotify: http://spoti.fi/3fgwEt2

We couldn't walk past the most unexpected game crossover of 2020. With \"Animal Crossing: New Horizons\" and \"DOOM Eternal\" released the same day, the adorable duo of Isabelle and Doom Slayer aka Doom Guy has spread across the Internet.
We thought that it may be a good idea to mix the sound of both worlds into one song and animation!

👍 Love the song? SUBSCRIBE for more gaming meme music stuff and LIKE the vid!

Listen to the FULL VERSION:
🎵 Spotify: https://spoti.fi/2VsCcYk
🎵 Apple Music / iTunes: https://apple.co/34FWS3g
🎵 Google Play Music: https://bit.ly/2XC1Zjv
🎵 Deezer: https://www.deezer.com/en/album/141787552
🎵 Amazon Music: https://amzn.to/2RDW0He
🎵 YOUTUBE: https://www.youtube.com/watch?v=QydzTeVCeAA

➡ Buy the song: http://thechalkeaters.bandcamp.com/
➡ Support the team and get cool bonuses: http://patreon.com/thechalkeaters
➡ Tabs and Chords here: https://www.patreon.com/posts/37861444

➡ Follow is on SPOTIFY: https://open.spotify.com/artist/7x7YgBS9WW3rfvfagAlohI
➡ Follow us on Twitter: http://twitter.com/thechalkeaters
➡ Follow us on VK: http://vk.com/thechalkeaters
➡ Follow us on TikTok: http://tiktok.com/@thechalkeaters
➡ Download wallpapers from this video: https://photos.app.goo.gl/XopphQMjdZSuBYCv6

We are The Chalkeaters, the gaming music project based in Saint Petersburg, Russia. We make comedy songs and music videos about video games, gaming industry and related memes.

■■■

Song “Doom Crossing: Eternal Horizons” by
THE CHALKEATERS:

Executive producer / songwriter: Alios [ http://twitter.com/aliospony ]

Composer / arranger: Ergy [ https://www.youtube.com/channel/UC28IhAYaXfk1uYNeAaCCN4w ]

Sound producer, arranger and engineer: Masel [ hire: https://soundbetter.com/profiles/269369-tim-maslov ]

\"Animal Crossing\" artist / cover artist: Pondis [ https://instagram.com/pondis_dant, https://twitter.com/pondis_dant ]

\"DOOM\" artist: Hunternif [ https://www.deviantart.com/hunternif, https://twitter.com/nifigager ]

Character animator: Yumi the Cat [ https://www.youtube.com/YumiTheCat, https://twitter.com/yumithecat08 ]

Motion designer, supporting animator and supporting sound engineer: Lenich [ https://www.youtube.com/user/LenichKirya ]

■■■

Isabelle vocals:
Natalia Natchan aka PiNKII [ https://www.youtube.com/channel/UCWRmOz2SA9MyudIzK5X6gdw ]

\"DOOM\" supporting artist: Fedor Titov [ https://www.deviantart.com/quiet-victories ]
Brutal \"DOOM\" voice: Jonathan Luhmann
Piano: Dmitry Kovzel
Flugelhorn: Kelly O'Donohue

■■■

Special thanks to Mick Gordon and Kazumi Totaka for amazingly beautiful game soundtracks that in many ways inspired this song!" -metadata "purl=https://www.youtube.com/watch?v=U4lz8MN6MQA" -metadata "artist=The Chalkeaters" "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.temp.mp4"
[EmbedSubtitle] Embedding subtitles in 'F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4'
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4" -i "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.en.vtt" -c copy -map 0 -dn -map "-0:s" -map "-0:d" "-c:s" mov_text -map "1:0" "-metadata:s:s:0" "language=eng" "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.temp.mp4"
Deleting original file F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.en.vtt (pass -k to keep)
[EmbedThumbnail] Converting thumbnail "F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.webp" to JPEG
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.webp" "-bsf:v" mjpeg2jpeg "file:F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.jpg"
[EmbedThumbnail] Adding thumbnail to "F:\VideoDownloads\Youtube\The Chalkeaters\DOOM CROSSING - Eternal Horizons ■ Music Video feat. Natalia Natchan-U4lz8MN6MQA.mp4"
ERROR: 'EmbedThumbnailPP' object has no attribute 'verbose_message'
Traceback (most recent call last):
  File "youtube_dlc\YoutubeDL.py", line 888, in wrapper
  File "youtube_dlc\YoutubeDL.py", line 925, in __extract_info
  File "youtube_dlc\YoutubeDL.py", line 963, in process_ie_result
  File "youtube_dlc\YoutubeDL.py", line 1773, in process_video_result
  File "youtube_dlc\YoutubeDL.py", line 2228, in process_info
  File "youtube_dlc\YoutubeDL.py", line 2305, in post_process
  File "youtube_dlc\postprocessor\embedthumbnail.py", line 127, in run
AttributeError: 'EmbedThumbnailPP' object has no attribute 'verbose_message'

Description

Receiving error ERROR: 'EmbedThumbnailPP' object has no attribute 'verbose_message' on every video downloaded. Possibly related to this commit where you standardized some functions.

@pukkandan
Copy link
Member

Sorry, I seem to be making tiny mistakes in my code lately. I should stop making commits in the middle of the night

nswanberg pushed a commit to nswanberg/yt-dlp that referenced this issue Jul 29, 2023
- made code from yt-dlp#17 work with everything.
- db_scripts.py now uses the [sqlite_utils](https://sqlite-utils.datasette.io/en/stable/index.html) library to make tables with fts enabled
- `search_channel()` now uses the following to run an fts search
```python
return list(db["Subtitles"].search(text, where=f"video_id IN (SELECT video_id FROM Videos WHERE channel_id = '{channel_id}')"))
```

I ran some tests using my channel

- Test Channel: https://www.youtube.com/@notjoemartinez4438
- Target Quote: "I started working on a script last year"
- Expected output:
```
Video Title: "Exporting contacts from an iPhone with python - YouTube"

    Quote: "this I started working on a script last"
    Time Stamp: 00:08:52.550
    Link: https://youtu.be/votEAwUz4jo?t=529
```

- It performs extreamly well with incomplete phrases
- It performs poorly keyword when testing partal words compared to `LIKE`

```bash
yt-fts search UCV_E0QWJw1G3kmfifmLIgxA "I stArted WorKing oN a scrip"

yt-fts search UCV_E0QWJw1G3kmfifmLIgxA "I working on script"

yt-fts search UCV_E0QWJw1G3kmfifmLIgxA " i wOrkIng"

yt-fts search UCV_E0QWJw1G3kmfifmLIgxA "I started working on a script last year"
```
- I'm sure theres a way to enable partial words with fts so this is a good start

- Fixed title formatting previous title was actually nested in a tuple
- Added semi colon to title when printing
- Made varable name more discriptive in `search_to_csv()` and `get_quotes()`

- schema of the database with fts:
```sql
CREATE TABLE [Channels] (
   [channel_id] TEXT PRIMARY KEY,
   [channel_name] TEXT NOT NULL,
   [channel_url] TEXT NOT NULL
);
CREATE TABLE [Videos] (
   [video_id] TEXT PRIMARY KEY,
   [video_title] TEXT NOT NULL,
   [video_url] TEXT NOT NULL,
   [channel_id] TEXT REFERENCES [Channels]([channel_id])
);
CREATE TABLE [Subtitles] (
   [subtitle_id] INTEGER PRIMARY KEY,
   [video_id] TEXT REFERENCES [Videos]([video_id]),
   [timestamp] TEXT NOT NULL,
   [text] TEXT NOT NULL
);
CREATE VIRTUAL TABLE [Subtitles_fts] USING FTS5 (
    [text],
    content=[Subtitles]
)
/* Subtitles_fts(text) */;
CREATE TABLE IF NOT EXISTS 'Subtitles_fts_data'(id INTEGER PRIMARY KEY, block BLOB);
CREATE TABLE IF NOT EXISTS 'Subtitles_fts_idx'(segid, term, pgno, PRIMARY KEY(segid, term)) WITHOUT ROWID;
CREATE TABLE IF NOT EXISTS 'Subtitles_fts_docsize'(id INTEGER PRIMARY KEY, sz BLOB);
CREATE TABLE IF NOT EXISTS 'Subtitles_fts_config'(k PRIMARY KEY, v) WITHOUT ROWID;
CREATE TRIGGER [Subtitles_ai] AFTER INSERT ON [Subtitles] BEGIN
  INSERT INTO [Subtitles_fts] (rowid, [text]) VALUES (new.rowid, new.[text]);
END;
CREATE TRIGGER [Subtitles_ad] AFTER DELETE ON [Subtitles] BEGIN
  INSERT INTO [Subtitles_fts] ([Subtitles_fts], rowid, [text]) VALUES('delete', old.rowid, old.[text]);
END;
```
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

2 participants