mirror of
https://github.com/livepeer/lpms
synced 2025-11-01 12:03:00 +08:00
cmd: Update transcoding example to use new API.
This commit is contained in:
@@ -67,7 +67,7 @@ func main() {
|
|||||||
ffmpeg.InitFFmpeg()
|
ffmpeg.InitFFmpeg()
|
||||||
|
|
||||||
fmt.Printf("Setting fname %s encoding %d renditions with %v\n", fname, len(options), lbl)
|
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,
|
Fname: fname,
|
||||||
Accel: accel,
|
Accel: accel,
|
||||||
Device: dev,
|
Device: dev,
|
||||||
@@ -75,4 +75,7 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
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