Added gallery screenshot and improved README.md
[video-tweet.git] / README.md
CommitLineData
97f85f28 1# Large Video Upload
2
03695c65 3This Python sample demonstrates the following process of uploading large video files asynchronously with the Twitter API.
97f85f28 4
51. **INIT** media upload.
62. **APPEND** chunked data.
73. **FINALIZE** media uploaded.
84. Check **STATUS** of video processing.
03695c65 95. Tweet with attached video.
97f85f28 10
03695c65 11Large video files are longer than 30 seconds up to 140 seconds, and/or a file size larger than 15 megabytes up to 512 megabytes.
97f85f28 12
03695c65 13[Learn more](https://dev.twitter.com/rest/media) about the Twitter Media APIs. Pay attention to the other requirements such as encoding, frame size and video formats supported.
97f85f28 14
15## Running the sample
16
171. Install requirements:
18
19 ```
03695c65 20 $ pip install -r requirements.txt
97f85f28 21 ```
22
03695c65 232. Fill in your [consumer keys and access tokens](https://apps.twitter.com) in `async-upload.py`:
97f85f28 24
25 ```
26 CONSUMER_KEY = 'your-consumer-key'
27 CONSUMER_SECRET = 'your-consumer-secret'
28 ACCESS_TOKEN = 'your-access-token'
29 ACCESS_TOKEN_SECRET = 'your-access-secret'
30 ```
31
03695c65
AP
323. Edit path to your video file in `async-upload.py`:
33
34 ```
35 VIDEO_FILENAME = 'path/to/video/file'
36 ```
37
384. Run script:
97f85f28 39
40 ```
41 $ python async-upload.py
03695c65
AP
42 ```
43
44Questions? Check our [developer discussion forums](https://https://twittercommunity.com/c/media-apis).