How do I know when youtube video content changes using the youtube API?

I have a website that allows users to link videos to YouTube. We check them all for the convenience of the family. However, YouTube video creators can trim the video, which means changing the start and end time of the video, changing the shown. This type of change can reduce the image or can be reverted to lengthen the video or a combination of them, which can lead to a completely different set of video content.

We want to be able to detect such changes and re-check the video if the frames actually displayed have changed. We cannot just look at the changed durations, because the user can cancel the finish, and then redo it exactly the same length, and we would not notice. Also, cropping does not change the publication date of the video.

We use youtube api, for example:

https://www.googleapis.com/youtube/v3/videos?part=snippet%2CcontentDetails%2CrecordingDetails%2Cstatus&id=[videoId]&key=[apiKey] 

This gives us a ton of data, including:

 Duration - this doesn't always change when a video is trimmed (undo trim, trim again) Title Etag - this changes all the time Thumbnails - These don't change when you trim PublishedAt - this doesn't change when you trim 

A change in Etag indicates a change, but it changes too often - anytime the title changes, and many other kinds of changes too. Thus, we will falsely notify us of changes that do not need moderation.

We also thought about capturing random frames and comparing them with time, but there is no public API for this.

So, how can we use the API to detect changes to the content of a video?

I ask here because youtube recommends setting the tags here that I included in this question: https://developers.google.com/youtube/v3/support

Also, note that if this problem cannot be resolved using the existing API, this means that people who submit links to YouTube sites can arbitrarily change the content of the video, without the site being able to report it in a reasonable way . that is, Youtube does not provide consumers with a way to verify that the frames and sound within a given video are not changed.

+6
source share
1 answer

Have you looked if the fileDetails.creationTime property is set? According to the documentation, this means:

Date and time the video was uploaded created.

The recordDetails.recordingDate property may be of interest. If specified, they may change every time a new download is performed ...

0
source

Source: https://habr.com/ru/post/1012962/


All Articles