Use original YouTube thumbnails on your YouTube video imports

I wrote up a script to easily update an entire Video group full of YouTube videos in order to apply the original YouTube thumbnail to them. It written in Ruby, but could be easily ported to anything else.

This is a script to process YouTube videos on Channels DVR Server to apply a nicer thumbnail.

This assumes the YouTube ID and Original Date is in the EpisodeTitle of the video. IE, Name of Video_(2022-01-06)_[akZxhhcwkR4]. This should be the case if the filename is Name of Video_(2022-01-06)_[akZxhhcwkR4].EXT in order to derive the video title from the filename when importing.

When running this script, it will process every video in the video group. It will:

  1. Pull the YouTube id from the title
  2. Pull the Publishing date from the title
  3. Use it to generate the thumbnail url
  4. Use the new thumbnail url for the video
  5. Use the Original Air Date from the title to set the date in its metadata
  6. Update the EpisodeTitle to remove the YouTube ID and Date

You can find it here

6 Likes

I've updated the script to support pulling the publishing date from the video. This requires the filename have it in there of course.

2 Likes

Published date in the filename is now optional

1 Like

Thank you

@maddox what do you use to download YouTube videos?

yt-dlp works well, but TubeSync will do auto downloads.

3 Likes
1 Like

Sorry, I don't mean to be a party pooper but isn't it against YouTube's terms of service to download videos from YouTube?

The following restrictions apply to your use of the Service. You are not allowed to:

  1. access, reproduce, download, distribute, transmit, broadcast, display, sell, license, alter, modify or otherwise use any part of the Service or any Content except: (a) as expressly authorized by the Service; or (b) with prior written permission from YouTube and, if applicable, the respective rights holders;

This is just my understanding but I could be wrong, I'm not a lawyer.
I don't really care, I'm just saying. :wink:

If I'm completely misunderstanding this, I'll be happy to be corrected, and I'll go to bed a little bit less stupid tonight. :laughing:

If you're concerned then you should talk to your lawyer. No one here can offer legal advice.

Some reading:

https://news.ycombinator.com/item?id=24872911

Sony Corp. of America v. Universal City Studios, Inc. - Wikipedia.

4 Likes

Thanks for the interesting reading, @tmm1.
No worries, I am not concerned at all, I'm not losing sleep over this. :laughing:

Sorry for the distraction. Please carry on. :slight_smile:

This is wonderful. In the process of figuring out how to make it work, I am now in possession of a new tool to clean up lots of stuff in the metadata in batch. Although for me, this is kinda like giving a sharp object to a toddler, but I figure worse case I delete the source and start over.

Anyway, what I would love to do is to have the thumbnail show up in the guide (and on-now/later) detail section vs. the generic show image. It would just much better for all of these videos. Don't even know if this is possible but have a question.

What is the relationship/difference in use of the Airing:Image and Airing:Thumbnail? Each airing/episode seams to inherit the Image from the show, and then that is used exclusively in the guide details.

I will certainly understand if the recommendation is to "put down the knife and go play outside".
Thanks
Charles

tvOS and iOS are sort of in the process of this. Where a video would show its thumbnail, like a TV Show episode, it will show the overrided thumbnail instead.

tvOS and iOS have gone a little further and are using the thumbnail in the modal when you select the video, as it's a bit more descriptive. This all needs to be ported over to Android.

There's no plans to use this thumbnail in things like Virtual Channels, as those are set to use the Airing image, which is the branded image for the video in its Video Group.

Excellent. I am pretty much all apple on the client side so should be in good shape, although I am a big fan/user of virtual channels if you ever re-visit that one. All good for now because I just found another squirrel to chase! I just discovered the option to download all the metadata for the videos with tubesync. Now I can also load the full description and whatever else is interesting for a given video.

Youtube is a bit of an undiscovered country, only because it is an unorganized mess. But there is a ton of content there that is at least entertaining if not quality.

I was able to set this up last night for a bunch of YT channels I like to follow. I updated my naming syntax for downloads to filename_(date)_[youtubeID].ext and got the workflow into place.

Very slick. Thanks for this!

Is there any way to get more metadata, say into the Summary or Full Summary fields? Maybe the first few lines from the YouTube video's description?

1 Like

package = {Thumbnail: yt_thumbnail_url, Airing: {EpisodeTitle: new_title, Summary: new_summary, FullSummary: new_full_summary}}

You can always use web dev tools in the web admin to see more.

again, THIS IS UNOFFICIAL AND NOT SUPPORTED :wink:

1 Like

Understood, and THANKS AGAIN for sharing this greatness... I'll tinker some later when I get home.

1 Like

Using the actual youtube thumbs really makes things look nicer.

2 Likes

Very much so! Each video group is now consistent with the branding of the YT channel that feeds it. Makes it easier to differentiate between these channels, and livens up the DVR library interface a lot too. Thanks for making this possible!

1 Like

FWIW I pay for YouTube Premium and appreciate the platform. But their app's interface, while it's gotten a bit better recently, still kinda sucks. So this unofficial and unsupported YouTube integration is great!

Along with Channels' new RSS feed, that helps us keep tabs on automated video imports, the actual consumption of curated YT content has never felt more elegant. I'm now using News Explorer which has notifications and widgets, as well as apps for AppleTV and Apple Watch (!)

For now I set up a Collection in Channels DVR that has some of our favorite subscriptions, sorted by most recently updated, so they're easier to browse through. The ability to mix and match these imports via playlists, smart or otherwise, would be great to see one day.

2 Likes

Thank you @Maddox for this script. Works great.