diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 3821a01149..796a49a465 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -17,6 +17,7 @@ #### Transcoder ### Bug Fixes 🐞 +- \#2466 bugfix: rendition resolution fix for portrait input videos; Min resolution applied for Nvidia hardware (@AlexKordic) #### CLI - \#2456 cli: Show O rather than B options when -redeemer flag set (@thomshutt) diff --git a/go.mod b/go.mod index f35a140564..f3a663e6ff 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,9 @@ require ( github.com/golang/mock v1.5.0 github.com/golang/protobuf v1.5.2 github.com/jaypipes/ghw v0.9.0 + github.com/jaypipes/pcidb v1.0.0 github.com/livepeer/livepeer-data v0.4.11 - github.com/livepeer/lpms v0.0.0-20220523122311-fc32eb80248c + github.com/livepeer/lpms v0.0.0-20220616165036-d82aa89e2477 github.com/livepeer/m3u8 v0.11.1 github.com/mattn/go-sqlite3 v1.11.0 github.com/olekukonko/tablewriter v0.0.5 diff --git a/go.sum b/go.sum index 2eb86eb1c4..849eb3b0e2 100644 --- a/go.sum +++ b/go.sum @@ -629,8 +629,8 @@ github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded h1:ZQlvR5RB4nfT+cO github.com/livepeer/joy4 v0.1.2-0.20191121080656-b2fea45cbded/go.mod h1:xkDdm+akniYxVT9KW1Y2Y7Hso6aW+rZObz3nrA9yTHw= github.com/livepeer/livepeer-data v0.4.11 h1:Sv+ss8e4vcscnMWLxcRJ2g3sNIHyQ3RzCtgEelfGPzw= github.com/livepeer/livepeer-data v0.4.11/go.mod h1:VIbJRdyH2Tas8EgLVkP79IPMepFDOv0dgHYLEZsCaf4= -github.com/livepeer/lpms v0.0.0-20220523122311-fc32eb80248c h1:LFwabjsjQU/bxVdULWNAWFnvoCdO9qzl5IYQXdCSDLI= -github.com/livepeer/lpms v0.0.0-20220523122311-fc32eb80248c/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM= +github.com/livepeer/lpms v0.0.0-20220616165036-d82aa89e2477 h1:d1tBqdLsPRM/GTvujGeRFFHlidA8mBizsTl8ea9tQxc= +github.com/livepeer/lpms v0.0.0-20220616165036-d82aa89e2477/go.mod h1:Hr/JhxxPDipOVd4ZrGYWrdJfpVF8/SEI0nNr2ctAlkM= github.com/livepeer/m3u8 v0.11.1 h1:VkUJzfNTyjy9mqsgp5JPvouwna8wGZMvd/gAfT5FinU= github.com/livepeer/m3u8 v0.11.1/go.mod h1:IUqAtwWPAG2CblfQa4SVzTQoDcEMPyfNOaBSxqHMS04= github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= diff --git a/server/mediaserver.go b/server/mediaserver.go index 2af534f6f0..5dffc016e2 100644 --- a/server/mediaserver.go +++ b/server/mediaserver.go @@ -67,7 +67,7 @@ var DetectionWhClient = &http.Client{Timeout: 2 * time.Second} var SelectRandFreq float64 func PixelFormatNone() ffmpeg.PixelFormat { - return ffmpeg.PixelFormat{ffmpeg.PixelFormatNone} + return ffmpeg.PixelFormat{RawValue: ffmpeg.PixelFormatNone} } // For HTTP push watchdog @@ -817,7 +817,7 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) { ctx = clog.AddNonce(ctx, cxn.nonce) } - status, _, vcodecStr, pixelFormat, err := ffmpeg.GetCodecInfoBytes(body) + status, mediaFormat, err := ffmpeg.GetCodecInfoBytes(body) isZeroFrame := status == ffmpeg.CodecStatusNeedsBypass if err != nil { errorOut(http.StatusUnprocessableEntity, "Error getting codec info url=%s", r.URL) @@ -825,13 +825,13 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) { } var vcodec *ffmpeg.VideoCodec - if len(vcodecStr) == 0 { + if len(mediaFormat.Vcodec) == 0 { clog.Warningf(ctx, "Couldn't detect input video stream codec") } else { - vcodecVal, ok := ffmpeg.FfmpegNameToVideoCodec[vcodecStr] + vcodecVal, ok := ffmpeg.FfmpegNameToVideoCodec[mediaFormat.Vcodec] vcodec = &vcodecVal if !ok { - errorOut(http.StatusUnprocessableEntity, "Unknown input stream codec=%s", vcodecStr) + errorOut(http.StatusUnprocessableEntity, "Unknown input stream codec=%s", mediaFormat.Vcodec) return } } @@ -875,7 +875,7 @@ func (s *LivepeerServer) HandlePush(w http.ResponseWriter, r *http.Request) { } } - cxn, err = s.registerConnection(ctx, st, vcodec, pixelFormat, segPar) + cxn, err = s.registerConnection(ctx, st, vcodec, mediaFormat.PixFormat, segPar) if err != nil { st.Close() if err != errAlreadyExists {