Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transcode error: Video file does not contain duration #21

Closed
4 of 8 tasks
Radzhab opened this issue Jun 30, 2017 · 10 comments
Closed
4 of 8 tasks

Transcode error: Video file does not contain duration #21

Radzhab opened this issue Jun 30, 2017 · 10 comments

Comments

@Radzhab
Copy link

Radzhab commented Jun 30, 2017

Which client are you using?

  • app (instagram_private_api/)
  • web (instagram_web_api/)

Purpose of your issue?

  • [x ] Bug report (encountered problems/errors)
  • Feature request (request for a new functionality)
  • Question
  • Other

Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (
Intel)] on win32

from instagram_private_api import Client, ClientCompatPatch,MediaRatios
from instagram_private_api_extensions import media

user_name = 'xxx'
password = 'xxx'

api = Client(user_name, password)
vid_data, vid_size, vid_duration, vid_thumbnail = media.prepare_video(
    'd:\\vid.mp4', aspect_ratios=MediaRatios.standard)

api.post_video(vid_data, vid_size, vid_duration, vid_thumbnail)

Error/Debug Log:

Traceback (most recent call last):
  File "C:/Users/admin/PycharmProjects/untitled/3.py", line 17, in <module>
    api.post_video(vid_data, vid_size, vid_duration, vid_thumbnail)
  File "build\bdist.win32\egg\instagram_private_api\endpoints\upload.py", line 64
3, in post_video
  File "build\bdist.win32\egg\instagram_private_api\endpoints\upload.py", line 22
4, in configure_video
  File "build\bdist.win32\egg\instagram_private_api\endpoints\upload.py", line 46
9, in post_photo
  File "build\bdist.win32\egg\instagram_private_api\endpoints\upload.py", line 19
7, in configure
  File "build\bdist.win32\egg\instagram_private_api\client.py", line 483, in _cal
l_api
instagram_private_api.errors.ClientError: Bad Request: Transcode error: Video fil
e does not contain duration

I want ipload mp4 file to my ig account. I try use different mp4-files - same error.

@ping ping added the no template Did not follow issue/pr template. label Jun 30, 2017
@ping
Copy link
Owner

ping commented Jun 30, 2017

@Radzhab

Your issue report does not conform to the issue template that has been specified for this repo:
https://raw.githubusercontent.com/ping/instagram_private_api/master/.github/ISSUE_TEMPLATE.md

Please edit your issue to comply with the template requirement.

This issue will be closed after 24 hours if no followup action is taken.


[This comment is auto-generated. ref=notemplate]

@Radzhab
Copy link
Author

Radzhab commented Jun 30, 2017

update...

@ping
Copy link
Owner

ping commented Jul 1, 2017

  1. Enable debug logging and post the log
  2. Can you provide a sample video?

@Radzhab
Copy link
Author

Radzhab commented Jul 1, 2017

@ping ping removed the no template Did not follow issue/pr template. label Jul 3, 2017
@ping
Copy link
Owner

ping commented Jul 3, 2017

The examples all show how to enable debug logging. Please review properly.

I was able to post the sample video you provided. In fact, IG deleted the post because of the copyrighted music.

@Radzhab
Copy link
Author

Radzhab commented Jul 6, 2017

I use different videos. Same result. I think its because instagram_private_api_extensions cannot send video length to request

This is my /media/configure/ params.
be3f113c4c2a4ca6bea4aac40d06a20b3a5783ca125616a3a0a7a2a21cd1a6c6.{"extra":{"source_width":612,"source_height":448},"_uuid":"e885ec00-6286-11e7-a3a1-00da86df26e2","source_type":"4","media_folder":"Instagram","_csrftoken":"FK0qVQQYjSWbKdpJxBtpBklVSIkLWBJo","caption":"","edits":{"crop_center":[0.0,-0.0],"crop_zoom":1.0,"crop_original_size":[612.0,448.0]},"_uid":"253194874","upload_id":"1499371784680","device":{"android_release":"6.0.1","model":"SM-G930F","android_version":23,"manufacturer":"samsung"}}

can you provide post_video python code example? without instagram_private_api_extensions

@ping
Copy link
Owner

ping commented Jul 7, 2017

You can easily print out any of the variables including vid_duration returned by the extensions lib to debug.

Your params says nothing. It also does not seem to be generated by this library. Post the full debug log as previously instructed.

@Radzhab
Copy link
Author

Radzhab commented Jul 7, 2017

can you provide post_video python code example? without instagram_private_api_extensions

@ping
Copy link
Owner

ping commented Jul 7, 2017

No

@ping
Copy link
Owner

ping commented Jul 14, 2017

Closing this since you're not willing to provide a full debug log.

@ping ping closed this as completed Jul 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants