All Projects → twitterdev → large-video-upload-python

twitterdev / large-video-upload-python

Licence: MIT license
Sample Python code for uploading video up to 140 seconds and/or up to 512Mb.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to large-video-upload-python

fbdl
📥 Download publicly shared videos from Facebook with an ease!
Stars: ✭ 29 (-73.39%)
Mutual labels:  media
media-roller
A self hosted server to download videos from social media with an iOS shortcut for on-click saving to camera roll
Stars: ✭ 52 (-52.29%)
Mutual labels:  media
reactjs-media
The reactjs media is a react package with awesome HTMLMediaElements that are recreated into react components with a good looking UI and fast UX.
Stars: ✭ 15 (-86.24%)
Mutual labels:  media
kafka-twitter-spark-streaming
Counting Tweets Per User in Real-Time
Stars: ✭ 38 (-65.14%)
Mutual labels:  twitter-api
fn-whatsapp-bot
This script is made for public bots, so use a second account to scan the qr and main account to command.
Stars: ✭ 20 (-81.65%)
Mutual labels:  media
macOSAppsOpenSource
No description or website provided.
Stars: ✭ 33 (-69.72%)
Mutual labels:  media
kuon
🐦 [WIP] Twitter Client Library written in Rust 🦀
Stars: ✭ 47 (-56.88%)
Mutual labels:  twitter-api
all-in-one-video-pack.wordpress
A Wordpress Plugin to simplify adding Kaltura to your Blog
Stars: ✭ 19 (-82.57%)
Mutual labels:  media
twpy
Twitter High level scraper for humans.
Stars: ✭ 58 (-46.79%)
Mutual labels:  twitter-api
lua-twitter
A Lua twitter library that works with OpenResty or LuaSocket
Stars: ✭ 29 (-73.39%)
Mutual labels:  twitter-api
twitter-php-ads-sdk
A Twitter supported and maintained Ads API SDK for PHP.
Stars: ✭ 51 (-53.21%)
Mutual labels:  twitter-api
bootstrap-print
To manage print media for Twitter Bootstrap v3.
Stars: ✭ 60 (-44.95%)
Mutual labels:  media
nitter scraper
Scrape Twitter API without authentication using Nitter.
Stars: ✭ 31 (-71.56%)
Mutual labels:  twitter-api
cordova-plugin-exoplayer
Media player plugin for Cordova that uses Google's ExoPlayer
Stars: ✭ 48 (-55.96%)
Mutual labels:  media
MJMediaPicker
A Custom Class to select media from camera ,video or photo library by just adding a single file
Stars: ✭ 15 (-86.24%)
Mutual labels:  media
stweet
Advanced python library to scrap Twitter (tweets, users) from unofficial API
Stars: ✭ 287 (+163.3%)
Mutual labels:  twitter-api
TonUINO
Alternative TonUINO Firmware
Stars: ✭ 112 (+2.75%)
Mutual labels:  media
TwitterPlay
Sandbox code to play with Twitter API
Stars: ✭ 17 (-84.4%)
Mutual labels:  twitter-api
Transcoder
Docker container to transcode videos in mounted volume to H265 using FFMPEG
Stars: ✭ 13 (-88.07%)
Mutual labels:  media
media-command
Imports files as attachments, regenerates thumbnails, or lists registered image sizes.
Stars: ✭ 40 (-63.3%)
Mutual labels:  media

Large Media Upload

This Python sample demonstrates the following process of uploading large media (video / GIF / image) files asynchronously with the Twitter API, via the "chunked upload" method.

  1. INIT media upload.
  2. APPEND chunked data.
  3. FINALIZE media uploaded.
  4. Check STATUS of media processing.
  5. Tweet with attached media.

Large video files are longer than 30 seconds / up to 140 seconds, and/or a file size larger than 15 megabytes up to 512 megabytes.

Learn more about the Twitter Media APIs. Pay attention to the other requirements such as encoding, frame size and video formats supported, as these may be reasons for uploads failing at the processing stage.

Running the sample

  1. Install requirements:

    $ pipenv shell
    $ pipenv install
    
  2. Fill in your consumer keys and access tokens in async-upload.py:

    CONSUMER_KEY = 'your-consumer-key'
    CONSUMER_SECRET = 'your-consumer-secret'
    ACCESS_TOKEN = 'your-access-token'
    ACCESS_TOKEN_SECRET = 'your-access-secret'
    
  3. Edit path to your media file in async-upload.py:

VIDEO_FILENAME = 'path/to/video/file'
  1. Run script:

    $ python async-upload.py
    

Questions? Check our developer discussion forums.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].