MCPcopy Index your code
hub / github.com/caiguanhao/dylive

github.com/caiguanhao/dylive @v1.2.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.2.4 ↗ · + Follow
72 symbols 186 edges 5 files 6 documented · 8%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

dylive

Utilities to watch Douyin live streams. 观看抖音直播工具

dywatch

Watch for new douyin live stream.

go install -v github.com/caiguanhao/dylive/dywatch@latest
# This opens mpv.app on macOS for new live stream
dywatch -q uhd hongjingmayi maidanglaodo | xargs -n1 open -na mpv

# Record live stream
dywatch -q uhd -run 'mkdir -p "{{.User.Name}}" && ffmpeg -i "{{.StreamUrl}}" -y -c copy "{{.User.Name}}/{{.Id}}.flv"' hongjingmayi maidanglaodo

dylive

  • Use keyboard or mouse to navigate different categories.
  • Select multiple live stream rooms and open them at once.

To install:

You must have installed Go first.

go install -v github.com/caiguanhao/dylive/dylive@latest

Also install mpv to play live stream.

Works on macOS, Linux or Windows.

Preview:

https://user-images.githubusercontent.com/1284703/147945918-a20c6c96-88d7-46b6-834e-1650b8033605.mp4

Usage

Video player

By default, dylive uses mpv. If mpv does not exist, IINA and then VLC will be used. If you have installed video player in a different location, set the PLAYER environment variable.

# use different video player command
PLAYER=ffplay dylive

# specify full path
PLAYER=/Applications/IINA.app/Contents/MacOS/iina-cli dylive

# also works for iPhone video player on Apple Silicon Macs
PLAYER=/Applications/OPlayer\ Lite.app dylive

Video player arguments

You can add extra video player command arguments after dylive like this:

# mute first when starting mpv
dylive -- --mute=yes

See mpv's options.

Record while playing

Use mpv's --stream-record option to save live stream to file.

You can use template in player arguments.

List of variables that can be used in template: - Room info (which can be obtained with Ctrl-E) - Index number of room ({{.Index}} or {{.Nth}}) - Number of rooms ({{.Total}}) - Current date/time ({{.Now}}), its format can be changed with TIME_FORMAT environment variable.

# assume you have mpv command in your PATH
dylive -- --stream-record={{.User.Name}}.mp4

# for Windows, you may need to add quotes
dylive -- --no-border "--stream-record={{.User.Name}}-{{.Now}}.mp4"

Press Ctrl-S to view list of commands.

Core symbols most depended-on inside this repo

renderRooms
called by 6
dylive/main.go
updateStatus
called by 6
dylive/main.go
renderSubcats
called by 5
dylive/main.go
selectRoomByIndex
called by 5
dylive/main.go
selectRoom
called by 4
dylive/main.go
commandExists
called by 4
dylive/main.go
getDataInArray
called by 3
live.go
renderCategories
called by 3
dylive/main.go

Shape

Function 54
Struct 11
Method 6
TypeAlias 1

Languages

Go100%

Modules by API surface

dylive/main.go41 symbols
live.go21 symbols
dywatch/main.go5 symbols
live_test.go3 symbols
dylive/main_test.go2 symbols

For agents

$ claude mcp add dylive \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact