From 42150e59ed59ff0510e832229bcfaa67cca11514 Mon Sep 17 00:00:00 2001 From: David Colburn Date: Tue, 30 Jul 2024 22:07:48 -0400 Subject: [PATCH] switch to media-samples --- .gitattributes | 1 - build/test/Dockerfile | 7 ++++++- go.mod | 6 +++--- go.sum | 12 ++++++------ test/publish.go | 14 +++++++------- test/sample/matrix-trailer-vp8.ivf | 3 --- test/sample/matrix-trailer-vp9.ivf | 3 --- test/sample/matrix-trailer.h264 | 3 --- test/sample/matrix-trailer.ogg | 3 --- test/web.go | 2 +- 10 files changed, 23 insertions(+), 31 deletions(-) delete mode 100644 .gitattributes delete mode 100644 test/sample/matrix-trailer-vp8.ivf delete mode 100644 test/sample/matrix-trailer-vp9.ivf delete mode 100644 test/sample/matrix-trailer.h264 delete mode 100644 test/sample/matrix-trailer.ogg diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 169c2929..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -test/sample/* filter=lfs diff=lfs merge=lfs -text diff --git a/build/test/Dockerfile b/build/test/Dockerfile index c76f186e..dfb942e4 100644 --- a/build/test/Dockerfile +++ b/build/test/Dockerfile @@ -33,9 +33,9 @@ RUN go mod download # copy source COPY cmd/ cmd/ COPY pkg/ pkg/ +COPY test/ test/ COPY version/ version/ -COPY test/ test/ # copy templates COPY --from=livekit/egress-templates workspace/build/ cmd/server/templates/ COPY --from=livekit/egress-templates workspace/build/ test/templates/ @@ -98,6 +98,11 @@ COPY --from=0 /workspace/egress /bin/ COPY --from=0 /workspace/test.test . COPY build/test/entrypoint.sh . +# download samples +RUN apt-get update && apt-get install -y git-lfs +RUN git clone --depth 1 https://github.com/livekit/media-samples.git +RUN cd media-samples && git lfs pull + # run tests USER egress ENV PATH=${PATH}:/chrome diff --git a/go.mod b/go.mod index 8b775659..8a926da2 100644 --- a/go.mod +++ b/go.mod @@ -20,9 +20,9 @@ require ( github.com/livekit/mageutil v0.0.0-20230125210925-54e8a70427c1 github.com/livekit/protocol v1.19.2-0.20240723043112-bacbd15bfb3a github.com/livekit/psrpc v0.5.3-0.20240526192918-fbdaf10e6aa5 - github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240628022514-ad17d3f0adad + github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240731013006-cfee4c8c656d github.com/pion/rtp v1.8.6 - github.com/pion/webrtc/v3 v3.2.43 + github.com/pion/webrtc/v3 v3.2.47 github.com/prometheus/client_golang v1.19.0 github.com/prometheus/client_model v0.6.1 github.com/prometheus/common v0.53.0 @@ -90,7 +90,7 @@ require ( github.com/nats-io/nuid v1.0.1 // indirect github.com/pion/datachannel v1.5.6 // indirect github.com/pion/dtls/v2 v2.2.11 // indirect - github.com/pion/ice/v2 v2.3.24 // indirect + github.com/pion/ice/v2 v2.3.29 // indirect github.com/pion/interceptor v0.1.29 // indirect github.com/pion/logging v0.2.2 // indirect github.com/pion/mdns v0.0.12 // indirect diff --git a/go.sum b/go.sum index 63a8d21d..1e98a4f5 100644 --- a/go.sum +++ b/go.sum @@ -188,8 +188,8 @@ github.com/livekit/protocol v1.19.2-0.20240723043112-bacbd15bfb3a h1:KqA12sSIgRm github.com/livekit/protocol v1.19.2-0.20240723043112-bacbd15bfb3a/go.mod h1:bNjJi+8frdvC84xG0CJ/7VfVvqerLg2MzjOks0ucyC4= github.com/livekit/psrpc v0.5.3-0.20240526192918-fbdaf10e6aa5 h1:mTZyrjk5WEWMsvaYtJ42pG7DuxysKj21DKPINpGSIto= github.com/livekit/psrpc v0.5.3-0.20240526192918-fbdaf10e6aa5/go.mod h1:CQUBSPfYYAaevg1TNCc6/aYsa8DJH4jSRFdCeSZk5u0= -github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240628022514-ad17d3f0adad h1:SfX8OBXfUx9WHGEIsJi+rpWMsPhgtlRlQpHk3bnEZrI= -github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240628022514-ad17d3f0adad/go.mod h1:pzzIik/xBvglkUstdIQP8taCI7s08KGIgCnc824y3oI= +github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240731013006-cfee4c8c656d h1:OTYQ4OPXNVBAXsnbBeOoboAwUpVrz18f2cBjORFpRRk= +github.com/livekit/server-sdk-go/v2 v2.2.1-0.20240731013006-cfee4c8c656d/go.mod h1:slEHd/HaPGeHdDVj2O8uZVk/NcAj8bSCdMT8dRwntmk= github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs= github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ= github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= @@ -213,8 +213,8 @@ github.com/pion/datachannel v1.5.6/go.mod h1:1eKT6Q85pRnr2mHiWHxJwO50SfZRtWHTsNI github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= github.com/pion/dtls/v2 v2.2.11 h1:9U/dpCYl1ySttROPWJgqWKEylUdT0fXp/xst6JwY5Ks= github.com/pion/dtls/v2 v2.2.11/go.mod h1:d9SYc9fch0CqK90mRk1dC7AkzzpwJj6u2GU3u+9pqFE= -github.com/pion/ice/v2 v2.3.24 h1:RYgzhH/u5lH0XO+ABatVKCtRd+4U1GEaCXSMjNr13tI= -github.com/pion/ice/v2 v2.3.24/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= +github.com/pion/ice/v2 v2.3.29 h1:nKSU0Kb7F0Idfaz15EwGB1GbOxBlONXnWma5p1lOFcE= +github.com/pion/ice/v2 v2.3.29/go.mod h1:KXJJcZK7E8WzrBEYnV4UtqEZsGeWfHxsNqhVcVvgjxw= github.com/pion/interceptor v0.1.29 h1:39fsnlP1U8gw2JzOFWdfCU82vHvhW9o0rZnZF56wF+M= github.com/pion/interceptor v0.1.29/go.mod h1:ri+LGNjRUc5xUNtDEPzfdkmSqISixVTBF/z/Zms/6T4= github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= @@ -250,8 +250,8 @@ github.com/pion/transport/v3 v3.0.2/go.mod h1:nIToODoOlb5If2jF9y2Igfx3PFYWfuXi37 github.com/pion/turn/v2 v2.1.3/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= github.com/pion/turn/v2 v2.1.6 h1:Xr2niVsiPTB0FPtt+yAWKFUkU1eotQbGgpTIld4x1Gc= github.com/pion/turn/v2 v2.1.6/go.mod h1:huEpByKKHix2/b9kmTAM3YoX6MKP+/D//0ClgUYR2fY= -github.com/pion/webrtc/v3 v3.2.43 h1:Z4GesLwy/1qPbD6jT1BmtgsYTsTWzqqmu5EQHDhIkEs= -github.com/pion/webrtc/v3 v3.2.43/go.mod h1:M1RAe3TNTD1tzyvqHrbVODfwdPGSXOUo/OgpoGGJqFY= +github.com/pion/webrtc/v3 v3.2.47 h1:2DrJ7YnxiZVcmVA+HRyyACCSYvVW8E1YpOvF/EXeRYI= +github.com/pion/webrtc/v3 v3.2.47/go.mod h1:g7pwdiN9Gj2zZZlSTW5XC7OzrgHS9QzRM0y+O2jtjVg= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/test/publish.go b/test/publish.go index a6039da6..54eca108 100644 --- a/test/publish.go +++ b/test/publish.go @@ -28,16 +28,16 @@ import ( var ( samples = map[types.MimeType]string{ - types.MimeTypeOpus: "/workspace/test/sample/matrix-trailer.ogg", - types.MimeTypeH264: "/workspace/test/sample/matrix-trailer.h264", - types.MimeTypeVP8: "/workspace/test/sample/matrix-trailer-vp8.ivf", - types.MimeTypeVP9: "/workspace/test/sample/matrix-trailer-vp9.ivf", + types.MimeTypeOpus: "/media-samples/SolLevante.ogg", + types.MimeTypeH264: "/media-samples/SolLevante.h264", + types.MimeTypeVP8: "/media-samples/SolLevante-vp8.ivf", + types.MimeTypeVP9: "/media-samples/SolLevante-vp9.ivf", } frameDurations = map[types.MimeType]time.Duration{ - types.MimeTypeH264: time.Microsecond * 41708, - types.MimeTypeVP8: time.Microsecond * 41708, - types.MimeTypeVP9: time.Microsecond * 41708, + types.MimeTypeH264: time.Microsecond * 41667, + types.MimeTypeVP8: time.Microsecond * 41667, + types.MimeTypeVP9: time.Microsecond * 41667, } ) diff --git a/test/sample/matrix-trailer-vp8.ivf b/test/sample/matrix-trailer-vp8.ivf deleted file mode 100644 index 56b1f524..00000000 --- a/test/sample/matrix-trailer-vp8.ivf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6e8b139e32cef642dde5dff58df00434647cb90cb2e20ed99e9154ad5f7335c7 -size 22906210 diff --git a/test/sample/matrix-trailer-vp9.ivf b/test/sample/matrix-trailer-vp9.ivf deleted file mode 100644 index 9e6ad48f..00000000 --- a/test/sample/matrix-trailer-vp9.ivf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27e26ca87f4a815dac0a44d62fc3f7efca1b7da2120e2027c01abbfe77cfa91e -size 19437513 diff --git a/test/sample/matrix-trailer.h264 b/test/sample/matrix-trailer.h264 deleted file mode 100644 index b7a155fd..00000000 --- a/test/sample/matrix-trailer.h264 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae36844a00ace9b1ad33643147e8f9442719ce35f18a2ab81f8db9d10b66a1d3 -size 42630870 diff --git a/test/sample/matrix-trailer.ogg b/test/sample/matrix-trailer.ogg deleted file mode 100644 index 64278244..00000000 --- a/test/sample/matrix-trailer.ogg +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:430f6cbd55b749fbb6e2681da66dd37ff476c977aece4abd7a52993648169d5b -size 2184711 diff --git a/test/web.go b/test/web.go index e1677682..bb4c191b 100644 --- a/test/web.go +++ b/test/web.go @@ -26,7 +26,7 @@ import ( "github.com/livekit/protocol/utils" ) -const webUrl = "https://videoplayer-2k23.vercel.app/videos/eminem" +const webUrl = "https://storage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" func (r *Runner) testWeb(t *testing.T) { if !r.should(runWeb) {