Skip to content

gradeup/get-video-duration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

get-video-duration

Go binary to get the duration of a video in seconds.

Deployment using docker

docker run -p 8080:8080 codehimanshu/get-video-duration

Install from source

Prerequisites:

  • go 1.13+
  • ffmpeg

Start API Server:

  • go run main.go

Usage

Curl Example:

curl http://localhost:8080/duration?url=http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

Response

{"duration":596.473333}

ToDos

  • Use environment variables to get Port and path to ffmpeg/ffprobe

About

API to get duration of a video in seconds

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •