我正在使用C#语言在Youtube上使用API发布视频。一切都运转良好,视频上传标题,说明,标签,缩略图。但我上传的每个文件都有Raw文件名未知。我正在使用Youtube API v3。 YouTube API中没有原始文件名的文档
我尝试了带视频的fileDetails,但没有用。
这是我正在使用的代码。
var video = new Video();
video.Snippet = new VideoSnippet();
video.Snippet.Title = title;
if (isIncludeTitleInDesc)
desc = desc + " " + title;
video.Snippet.Description = desc;
video.Snippet.Tags = tags;
video.Snippet.CategoryId = categoryId;
video.Status = new VideoStatus();
video.Status.PrivacyStatus = isPublic ? "public" : "private";
video.Snippet.Thumbnails = new ThumbnailDetails();
try
{
var videosInsertRequest = youtube.Videos.Insert(video, "snippet,status", stream, "video/*");
videosInsertRequest.ProgressChanged += insertRequest_ProgressChanged;
videosInsertRequest.ResponseReceived += insertRequest_ResponseReceived;
IUploadProgress result = videosInsertRequest.Upload();
if (result.Status == UploadStatus.Completed)
{
}
}