Unable to tweet videos using the media/upload (chunked) API for more than one chunk

video

#1

I can upload videos of one segment. However when I try to upload videos in multiple segments, I get an error.

The following works
command: command=INIT&media_type=video/mp4&total_bytes=3469591
response: media_id

command: command=APPEND&media_id=608643461605040129&segment_index=0
response: HTTP 204

command: command=FINALIZE&media_id=608643461605040129
response: media_id

The following does not work
command: command=INIT&media_type=video/mp4&total_bytes=7843097
response: media_id

request: command=APPEND&media_id=608643461605040129&segment_index=0
response: HTTP 204

request: command=APPEND&media_id=608643461605040129&segment_index=1
response: HTTP 204

command: FINALIZE
response: Unrecognised Video

I was able to successfully upload each segment of the video individually as well. Is there something that I am missing?

Thank you for any help.


#2

I’m not sure it’s been fixed yet but there’s been a problem since the api was released where videos larger than a few MB constantly returned a media id validation error when posted to statuses/update


#3

I looked at our server logs. Your video file (7843097 bytes) was received correctly but it has some issue (two samples with the same pts value) which is causing validation failure in our transcoding process. Please try a different video.


#4

I encounterd exactly same problem before.
I think those chunks are not uploaded perfectly.
Please capture your http request and check parameter precisely.