当我将电影上传到 youtube 然后从给定的链接下载它时,它是同一部电影,但文件片段被改变了......有没有办法撤消 youtube 编码,所以我上传的文件和我下载的文件将是100%一样??
我正在使用 python pytube 下载
谢谢
from pytube import YouTube
import defines
# not necessary, just for demo purposes.
from pprint import pprint
yt = YouTube(defines.url)
# Once set, you can see all the codec and quality options YouTube has made
# available for the perticular video by printing videos.
pprint(yt.get_videos())
# [<Video: MPEG-4 Visual (.3gp) - 144p>,
# <Video: MPEG-4 Visual (.3gp) - 240p>,
# <Video: Sorenson H.263 (.flv) - 240p>,
# <Video: H.264 (.flv) - 360p>,
# <Video: H.264 (.flv) - 480p>,
# <Video: H.264 (.mp4) - 360p>,
# <Video: H.264 (.mp4) - 720p>,
# <Video: VP8 (.webm) - 360p>,
# <Video: VP8 (.webm) - 480p>]
# The filename is automatically generated based on the video title. You
# can override this by manually setting the filename.
# view the auto generated filename:
print(yt.filename)
# Pulp Fiction - Dancing Scene [HD]
# set the filename:
# yt.set_filename('Dancing Scene from Pulp Fiction')
# You can also filter the criteria by filetype.
pprint(yt.filter('flv'))
print(yt.filter('mp4')[-1])
# <Video: H.264 (.mp4) - 720p>
# You can also get all videos for a given resolution
pprint(yt.filter(resolution='480p'))
# [<Video: H.264 (.flv) - 480p>,
# <Video: VP8 (.webm) - 480p>]
video = yt.get('3gp', '240p')
# NOTE: get() can only be used if and only if one object matches your criteria.
# for example:
pprint(yt.videos)
video = yt.get('webm')
video.download('here1.webm')