mirror of
https://github.com/alfg/ffmpegd.git
synced 2025-09-26 19:41:15 +08:00
30 lines
374 B
Go
30 lines
374 B
Go
package ffmpeg
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestFFProbeRun(t *testing.T) {
|
|
ffprobe := &FFProbe{}
|
|
probe, err := ffprobe.Run(testFile)
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
|
|
if len(probe.Streams) != 2 {
|
|
t.Error()
|
|
}
|
|
|
|
if probe.Streams[0].Index != 0 {
|
|
t.Error()
|
|
}
|
|
|
|
if probe.Streams[0].Width != 1280 {
|
|
t.Error()
|
|
}
|
|
|
|
if probe.Streams[0].Height != 534 {
|
|
t.Error()
|
|
}
|
|
}
|