mirror of
https://github.com/u2takey/ffmpeg-go.git
synced 2025-10-04 07:36:28 +08:00
init with test
This commit is contained in:
20
probe_test.go
Normal file
20
probe_test.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package ffmpeg_go
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/tidwall/gjson"
|
||||
)
|
||||
|
||||
const (
|
||||
TestInputFile1 = "./sample_data/in1.mp4"
|
||||
TestOutputFile1 = "./sample_data/out1.mp4"
|
||||
TestOverlayFile = "./sample_data/overlay.png"
|
||||
)
|
||||
|
||||
func TestProbe(t *testing.T) {
|
||||
data, err := Probe(TestInputFile1, nil)
|
||||
assert.Nil(t, err)
|
||||
assert.Equal(t, gjson.Get(data, "format.duration").String(), "7.036000")
|
||||
}
|
Reference in New Issue
Block a user