-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathvideoDetails.py
43 lines (35 loc) · 1.95 KB
/
videoDetails.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
from googleapiclient.http import MediaFileUpload # noqa
class YourEditor:
# Default values (some will be overwritten by the Gui)
fps = 60 # maximum frame peer second, final output video. change to whatever value to desire. the higher rate, the longer it takes to process the video.
# Static directories
raw_video_file = str('./Media/Video/your_video.mp4') # your raw video file
thumbnail_image = str('./Media/Video/sample_thumbnail.jpg') # your YouTube thumbnail image
video_file_out = str(
'./Media/Video/final_clip/your_video_edited.mp4') # final result, just before uploading to your YouTube channel.
video_dir = str('./Media/Video/') # Final video output directory
intro_file_location = str('./Media/Video/intro.mp4') # intro clip
outro_file_location = str('./Media/Video/outro.mp4') # outro clip
youtube_video_patch = str('./Media/Video/final_clip') # this folder will be uploaded into YouTube.
black_image_file = str(
'./Media/Images/black.png') # sets the final output resolution, replace with 4k black picture, if you desire 4k output otherwise your video will be 1080p.
logo_file = str('./Media/Images/logo.gif') # you can use gif animations as logo!
class Video:
static_description = """
This is a test description.
You can insert here whatever you want.
It will be displayed exactly the same way on YouTube.
It will be the rows structure too.
"""
title = 'your_new_title' # up to 100 characters
category = "22"
keywords = 'Tag1, Tag2, Tag3, Tag4, Tag4'
# print(len(keywords)) # remove the hash before print, if you want to check how many characters entered. maximum allowed is 500
privacyStatus = "private"
def insertThumbnail(self, youtube, videoId, thumnailPath): # noqa
request = youtube.thumbnails().set(
videoId=videoId,
media_body=MediaFileUpload(thumnailPath)
)
response = request.execute()
print(response)