mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-27 04:36:12 +08:00
13 lines
237 B
Go
13 lines
237 B
Go
package ffmpeg
|
|
|
|
import (
|
|
"bytes"
|
|
"os/exec"
|
|
)
|
|
|
|
func TranscodeToJPEG(b []byte) ([]byte, error) {
|
|
cmd := exec.Command(defaults["bin"], "-hide_banner", "-i", "-", "-f", "mjpeg", "-")
|
|
cmd.Stdin = bytes.NewBuffer(b)
|
|
return cmd.Output()
|
|
}
|