Skip to content

Commit

Permalink
Merge pull request #8 from yasukotelin/feature/update-ffmpeg-for-high…
Browse files Browse the repository at this point in the history
…quolity

Update the gif for highquolity
  • Loading branch information
yasukotelin authored Feb 26, 2021
2 parents 37845c3 + 7afb2f8 commit 71a18ac
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# adbeem

![version](https://img.shields.io/badge/version-1.3.0-brightgreen)
![version](https://img.shields.io/badge/version-1.4.0-brightgreen)
[![GoDoc](https://godoc.org/github.com/yasukotelin/adbeem?status.svg)](https://godoc.org/github.com/yasukotelin/adbeem)
[![Go Report Card](https://goreportcard.com/badge/github.com/yasukotelin/adbeem)](https://goreportcard.com/report/github.com/yasukotelin/adbeem)

Expand Down Expand Up @@ -58,15 +58,15 @@ go get -u github.com/yasukotelin/adbeem
Show help.

```
$ adbeem --help
╰─>$ adbeem --help
NAME:
adbeem - adbeem is a CLI tool to capture or record the screen of Android with adb
USAGE:
adbeem [global options] command [command options] [arguments...]
VERSION:
1.2.0
1.4.0
COMMANDS:
screencap capture the screen
Expand Down Expand Up @@ -116,13 +116,13 @@ adbeem screenrecord -g

adbeem outputs mp4 and gif file.

--gifrate(-gr), gif framerate option.
--fps, gif fps option.

```
abdeem screenrecord -g -gr 30
abdeem screenrecord -g --fps 30
```

default is 15 framerate.
default is 20 fps.

### deeplink

Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ func (ffmpeg *Ffmpeg) ExistsCommand() bool {
return true
}

func (ffmpeg *Ffmpeg) ConvToGif(rate string) error {
func (ffmpeg *Ffmpeg) ConvToGif(fps string) error {
output := ffmpeg.Output
if output == "" {
output = ffmpeg.createOutputFromInput()
}
cmd := exec.Command("ffmpeg", "-i", ffmpeg.Input, "-vf", "scale=400:-1", "-r", rate, output)
cmd := exec.Command("ffmpeg", "-i", ffmpeg.Input, "-vf", "[0:v] fps="+fps+",scale=320:-1,split [a][b];[a] palettegen [p];[b][p] paletteuse", output)
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout

Expand Down
11 changes: 5 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
func main() {
app := &cli.App{
Name: "adbeem",
Usage: "adbeem is a CLI tool to capture or record the screen of Android with adb",
Version: "1.3.0",
Usage: "adbeem is a CLI tool using Android adb command more easily.",
Version: "1.4.0",
Commands: []*cli.Command{
{
Name: "screencap",
Expand Down Expand Up @@ -42,10 +42,9 @@ func main() {
Usage: "convert to gif",
},
&cli.StringFlag{
Name: "gifrate",
Aliases: []string{"gr"},
Value: "30",
Usage: "Gif rate",
Name: "fps",
Value: "20",
Usage: "Gif fps",
},
},
},
Expand Down

0 comments on commit 71a18ac

Please sign in to comment.