dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

Error uploading video in story #1338

Open abresihjj opened 3 years ago

abresihjj commented 3 years ago

Hello friends The following error appears when uploading a video in the story

Even when I enter the dimensions of the video manually, an error appears on Instagram

where is the problem from? Can you upload a video to the story? If you have a sample code, please put it here

It's very important to me, please help

 xx index > TypeError: unsupported file type: undefined (file: /home/user/public_html/content/files/dsfsdf/mixkit-2  x
x                                                      xx 66-preview_1608408853.mp4)                                                                                                       x
x                                                      xx index >     at lookup (/home/user/instagram/instagram2/node_modules/image-size/lib/index.js:34:9)                                  x
x                                                      xx index >     at module.exports (/home/user/instagram/instagram2/node_modules/image-size/lib/index.js:122:12)                        x
x                                                      xx index >     at PublishService.uploadAndConfigureStoryPhoto (/home/user/instagram/instagram2/node_modules/instagram-private-api/di  x
x                                                      xx st/services/publish.service.js:386:33)                                                                                           x
x                                                      xx index >     at uploadAndConfigure (/home/user/instagram/instagram2/node_modules/instagram-private-api/dist/services/publish.servi  x
x                                                      xx ce.js:188:20)                                                                                                                    x
x                                                      xx index >     at PublishService.story (/home/user/instagram/instagram2/node_modules/instagram-private-api/dist/services/publish.ser  x
x                                                      xx vice.js:280:16)                                                                                                                  x
x                                                      xx index >     at /home/user/instagram/instagram2/index.js:267:31                                                                     x
x                                                      xx index > qqqqqqqq 130                                                                                                             x
x                                                      xx index > 2020-12-20 00:06:31                                   
Nerixyz commented 3 years ago

What's the code you used to upload the story?

abresihjj commented 3 years ago

@Nerixyz Hello dear friend Like the address below https://github.com/dilame/instagram-private-api/issues/1301

The code is exactly the same

Please advise

I wish there was a way to change the images automatically, which is very important and useful. Can't you use ffmpeg and change the video file? I do not know much, but I think there is a spirit

Thanks

Nerixyz commented 3 years ago

Can't you use ffmpeg and change the video file?

No. This is unncecessary for this package. You can use other ffmpeg packages to do this.

The code is exactly the same

Then what are your files? What's the file-type?

abresihjj commented 3 years ago

@Nerixyz Hello again

The file type is mp4

Every bird with any size makes a mistake


Is there any way to resize the video to be used?


https://github.com/Nerixyz/instagram_mqtt What is?


I want to receive all the direct messages and also have new messages in the form of sockets, and whatever method I want to send the message in the form of sockets, what method and library do you think I should use?

Thanks

Nerixyz commented 3 years ago

Is there any way to resize the video to be used?

You can use any tool like ffmpeg. Just google it.

I want to receive all the direct messages and also have new messages in the form of sockets, and whatever method I want to send the message in the form of sockets, what method and library do you think I should use?

Not related to this issue, looks like instagram_mqtt could help.

abresihjj commented 3 years ago

Hello again Please add resizing within this library

I do not know how to use a library that has this. I tried many times but it did not work

Thanks

Before this message, I noticed instagram_mqtt and I was checking, but it was an error Accessors are only available when targeting ECMAScript 5 and higher.

I have and when from tsc -t es2018 realtime.example.ts Also used error

Cannot find module '../src'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

What should I do?

Please advise Thanks

abresihjj commented 3 years ago

@Nerixyz Hello again Please add resizing within this library

I do not know how to use a library that has this. I tried many times but it did not work

Thanks

Before this message, I noticed instagram_mqtt and I was checking, but it was an error Accessors are only available when targeting ECMAScript 5 and higher.

I have and when from tsc -t es2018 realtime.example.ts Also used error

Cannot find module '../src'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

What should I do?

Please advise Thanks