gpt4 book ai didi

facebook - 视频和照片的图形 API 上传大小限制

转载 作者:行者123 更新时间:2023-11-30 05:25:47 25 4
gpt4 key购买 nike

我正在开发一个脚本,允许用户将照片上传到之前从他们的帐户中选择的相册。到目前为止一切正常,但我一直在尝试找出图像文件大小方面的 API 限制。我想事先说明用户没有尝试上传 Facebook 无法/不想处理的照片。有什么估计吗?

既然我已经问过并且正在考虑允许用户上传视频,那么视频大小限制是多少?

提前致谢

最佳答案

看起来 Facebook 的图片上传限制更多地与上传图片的宽度和高度有关,而不是纯粹以 kb 或 mb 为单位的文件大小。我从这个 article 获得了以下信息并做了几个实验。

This is the maximum size of the image you can upload.

Width: 2048px Height: 2048px

Pinned post picture size

This is the size of the picture of your pinned post. It will not be scaled down, Facebook will take the center of the image and cut it out accordingly.

Width: 403px Height: 403px

Pictures displayed in Facebook Albums

This is the maximum size of the image as shown in slide show or album.

Width: 960px Height: 720px

在我的实验中,我尝试通过 API 的 {album_id}/photos 端点以 2048px 宽度和 960px 宽度将相同的 2 张图像上传到新创建的相册,但实际上只有 960 像素宽度的照片上传到 facebook .

为了安全起见,建议您的用户将他们上传的照片的宽度限制为最大 960 像素和最大高度 720 像素。

我相信视频也是如此。看这个help center article

The easiest way to optimize the quality of your videos is to upload HD video.

If you're exporting your video from editing software (ex: Final Cut Pro, Avid, iMovie) we recommend these custom settings:

  • H.264 video with AAC audio in MOV or MP4 format

  • An aspect ratio no larger than 1280px wide and divisible by 16px

  • A frame rate at, or below, 30fps Stereo audio with a sample rate of 44,100hz

Keep in mind that videos must be less than 20 minutes long. The longer your video is, the larger its file size will be. This may affect the quality of the video.

我不得不自己对此进行一些挖掘。希望这对您有所帮助!

关于facebook - 视频和照片的图形 API 上传大小限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9079376/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com