mirror of
https://github.com/livepeer/lpms
synced 2025-11-02 04:22:58 +08:00
cmd: Update transcoding example to use new API.
This commit is contained in:
@@ -67,7 +67,7 @@ func main() {
|
||||
ffmpeg.InitFFmpeg()
|
||||
|
||||
fmt.Printf("Setting fname %s encoding %d renditions with %v\n", fname, len(options), lbl)
|
||||
err := ffmpeg.Transcode2(&ffmpeg.TranscodeOptionsIn{
|
||||
res, err := ffmpeg.Transcode3(&ffmpeg.TranscodeOptionsIn{
|
||||
Fname: fname,
|
||||
Accel: accel,
|
||||
Device: dev,
|
||||
@@ -75,4 +75,7 @@ func main() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for i, r := range res {
|
||||
fmt.Printf("profile=%v frames=%v pixels=%v\n", profiles[i].Name, r.Frames, r.Pixels)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user