Skip to content

trim video from youtube/twitter before downloading

License

Notifications You must be signed in to change notification settings

kayslay/vid_trimmer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vid_Trimmer

This is a service written in Go to save me from downloading a full video when I only need a part from the video.

I'm a low budget and lazy developer, so I don't have the money or time to make it a tool for everyone. If you have the time and cash to create a service from it, please do.

The project uses github.com/jtguibas/cinema to trim videos.

My personal vid-trimmer

Supported video sites

Generate Download link

This endpoint generates a download link for the trimmed video.

Path: [GET]/download

Request Parameters

  • url: the url to download from
  • format: the format to return the file
  • start: the second s to start the trim
  • end: the second e to end the trim

Response

This returns a json object that contains link and state fields.

link is the download link of the trimmed video.

state gives info about the state of the video.

  • NULL: no file yet
  • PENDING: trimming started, but not complete
  • DONE: video trimmed successfully

The frontend will have to make a request periodically till the state is DONE. This is because I don't have time to add websocket (remember, I'm a lazy dev)

{
  "link": "https://vid-trim-stage.herokuapp.com/download/727266af07.mp4",
  "state": "DONE"
}

Example

Request

example with my personal service 😁

Response

{
  "link": "https://vid-trim-stage.herokuapp.com/download/727266af07.mp4",
  "state": "DONE"
}

Download File

This endpoint downloads the trimmed video. This is generated by, Generate Download link

Path: [GET]/download/{key}

ENV

  • ENV: the environment
  • FILE_SIZE: the maximum allowed size of file in MB
  • HOST: the host url of the service
  • TWITTER_ACCESS_KEY: twitter access key
  • TWITTER_ACCESS_SECRET: twitter access secret
  • TWITTER_CONSUMER_KEY: twitter consumer key
  • TWITTER_CONSUMER_SECRET: twitter consumer secret

About

trim video from youtube/twitter before downloading

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published