Error publishing file to YouTube

Hi. Please tell me how to fix this error. I’ve tried everything, but the file was created using FFMPEG and is on the disk. I specify the mime type when receiving it, but YouTube still sees it as an application, not a video.

Does your ffmpeg produces a standard MP4 or you are later converting to MP4 ?
It seems that your ffmpeg is generating the file with MIME type as application/mp4 instead of video/mp4. Can you check that.

The file properties indicate that it is an MP4 video. When loading the file from disk, it also indicates that the file is a video\MP4.

The problem you have with YouTube API usually has two main causes, first make sure the OAuth credentials you created in Google Cloud Console have the correct scopes especially youtube.upload because without it you can’t upload videos. Second thing, the video size or format might be the issue, YouTube accepts specific formats and there’s a maximum file size depending on your account type. Try uploading a small video first just to test. Also make sure you’re using resumable upload because simple upload doesn’t work with large files, you need to send the file in stages not all at once. Check the exact error message because usually YouTube API gives you a clear error code that points to the problem whether it’s in authentication or in the file itself or in quota limits. If quota is the issue unfortunately you have to wait until the next day because YouTube has a daily limit for uploads through the API.

Everything worked without any issues. It grants all the required permissions and isn’t picky about access. It does give an error about the file type. Incidentally, the same video can be manually uploaded to the site without any problems. The issue arose with the version update before 2.0.

:six: Possible cause: a bug in n8n v1.122.4+
If you’re using this version, it’s a known bug, and the solution is:

Upgrade to the new version: npm install -g n8n@latest

OR wait for a patch release instead of using HTTP Request

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.