Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting error while uploading Video using Instagram API

I am trying to upload the video to Instagram via API. I am getting the below error. Please Advice Uploading image via this method is successful.

Reference: https://developers.facebook.com/docs/instagram-api/reference/ig-user/media_publish#creating

Request1:
https://graph.facebook.com/xxxxxxx/media?media_type=VIDEO&video_url=/Users/vijayaraghavandevaraj/Downloads/Drops.mp4&access_token={{token}} - Success

Response:

{
    "id": "xxxxxxxxxxxx"
}

Request2: Post https://graph.facebook.com/xxxxxxxxxx/media_publish?creation_id=xxxxxxx&access_token={{token}} - Failed

Response:

{
    "error": {
        "message": "The video file you selected is in a format that we don't support.",
        "type": "OAuthException",
        "code": 352,
        "error_subcode": 2207026,
        "is_transient": false,
        "error_user_title": "Unsupported format",
        "error_user_msg": "The video format is not supported. Please check the specs for the supported streams format",
        "fbtrace_id": "AA3qcWZCmMsp0OfEE_m1cLJ"
    }
}
like image 916
vijayaraghavan Devaraj Avatar asked May 07 '26 23:05

vijayaraghavan Devaraj


2 Answers

use this conf for video conversion according to instagram reels specs

ffmpeg -i video_path -c:v libx264 -preset slow -crf 22 -c:a aac -b:a 192k -movflags +faststart -y converted_video_path
like image 116
Ravi balas Avatar answered May 09 '26 21:05

Ravi balas


The possible reason could be the video requirements. Check out https://developers.facebook.com/docs/instagram-api/reference/ig-user/media

like image 41
sakigo Avatar answered May 09 '26 22:05

sakigo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!