mirror of
https://github.com/livepeer/lpms
synced 2025-10-31 03:26:43 +08:00
Support H.265/HEVC, VP8, VP9 (#279)
* support other popular codecs * use install_ffmpeg.sh from go-livepeer, refactor tests * set environment variable to build ffmpeg with tools and modules required for tests * Fix NV-SW encoder selection * Change HEVC display name to be alphanumeric * refactor tests * refactor tests * refactor tests * Fix unsupported codec test comments * Bump to trigger CI * Set env for dynamic libraries * Test cleanup, temporary use install_ffmpeg.sh from go-livepeer branch * Create cache key with right install_ffmpeg.sh * Bump to trigger CI * Switch back to master install_ffmpeg.sh
This commit is contained in:
@@ -20,12 +20,13 @@ func validRenditions() []string {
|
||||
|
||||
func main() {
|
||||
from := flag.Duration("from", 0, "Skip all frames before that timestamp, from start of the file")
|
||||
hevc := flag.Bool("hevc", false, "Use H.265/HEVC for encoding")
|
||||
to := flag.Duration("to", 0, "Skip all frames after that timestamp, from start of the file")
|
||||
flag.Parse()
|
||||
var err error
|
||||
args := append([]string{os.Args[0]}, flag.Args()...)
|
||||
if len(args) <= 3 {
|
||||
panic("Usage: [-from dur] [-to dur] <input file> <output renditions, comma separated> <sw/nv>")
|
||||
panic("Usage: [-hevc] [-from dur] [-to dur] <input file> <output renditions, comma separated> <sw/nv>")
|
||||
}
|
||||
str2accel := func(inp string) (ffmpeg.Acceleration, string) {
|
||||
if inp == "nv" {
|
||||
@@ -41,6 +42,9 @@ func main() {
|
||||
if !ok {
|
||||
panic(fmt.Sprintf("Invalid rendition %s. Valid renditions are:\n%s", k, validRenditions()))
|
||||
}
|
||||
if *hevc {
|
||||
p.Encoder = ffmpeg.H265
|
||||
}
|
||||
profs = append(profs, p)
|
||||
}
|
||||
return profs
|
||||
|
||||
Reference in New Issue
Block a user