Skip to content

domcx/twitchcap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twitchcap

Capture twitch moments

	c := twitchcap.New()
	//Select source
	if err := c.CaptureVod("34138940"); err != nil {
		panic(err)
	}
	if err := c.FindStream(twitchcap.R_Source); err != nil {
		panic(err)
	}
	fmt.Println("Starting download...")
	//Maybe we save it?
	file, err := os.OpenFile("/tmp/vod.ts", os.O_APPEND | os.O_RDWR | os.O_CREATE, 0644)
	defer file.Close()
	if err != nil {
		panic(err)
	}
	//Download time in seconds, approximate
	buf, _ := c.Download(60)
	//Each part of the stream gets sent here
	for b := range buf {
		file.Write(b)
	}

About

Capture twitch moments

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages