Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump up lowest tier audio bitrate #37

Merged
merged 18 commits into from
Feb 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -20,6 +20,9 @@ conductor_image:
cworker_image:
docker buildx build -f Dockerfile-cworker -t odyseeteam/transcoder-cworker:dev --platform linux/amd64 .

test_down:
docker-compose down

test_prepare:
docker-compose up -d minio db redis
docker-compose up -d cworker conductor
10 changes: 5 additions & 5 deletions client/client_test.go
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ package client
import (
"context"
"fmt"
"io/ioutil"
"io"
"math/rand"
"net/http"
"net/http/httptest"
@@ -76,7 +76,7 @@ func (s *clientSuite) TestPlayFragment() {

// Request stream and wait until it's available.
ctx, cancel := context.WithTimeout(context.Background(), 120*time.Second)
wait := time.NewTicker(500 * time.Millisecond)
wait := time.NewTicker(1000 * time.Millisecond)
Waiting:
for {
select {
@@ -102,7 +102,7 @@ Waiting:
sz, err := c.PlayFragment(streamURL, streamSDHash, tc.name, rr, httptest.NewRequest(http.MethodGet, "/", nil))
s.Require().NoError(err)
s.Require().Equal(http.StatusOK, rr.Result().StatusCode)
rbody, err := ioutil.ReadAll(rr.Result().Body)
rbody, err := io.ReadAll(rr.Result().Body)
s.Require().NoError(err)
if tc.size > 0 {
// Different transcoding runs produce slightly different files.
@@ -111,7 +111,7 @@ Waiting:
} else {
absPath, err := filepath.Abs(filepath.Join("./testdata", "known-stream", tc.name))
s.Require().NoError(err)
tbody, err := ioutil.ReadFile(absPath)
tbody, err := os.ReadFile(absPath)
s.Require().NoError(err)
s.Equal(strings.TrimRight(string(tbody), "\n"), strings.TrimRight(string(rbody), "\n"))
}
@@ -182,7 +182,7 @@ Waiting:
})
}

c.remoteServer = "http://localhost:63333"
c.remoteServer = "http://localhost:13131"
c.cache.Clear()

for _, tc := range streamFragmentCases {
14 changes: 8 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ version: '3.7'
services:
conductor:
image: odyseeteam/transcoder-conductor:dev
container_name: conductor
container_name: tc-conductor
command:
- ./transcoder
- conductor
@@ -30,10 +30,11 @@ services:
window: 120s
cworker:
image: odyseeteam/transcoder-cworker:dev
container_name: cworker
container_name: tc-cworker
command:
- ./transcoder
- worker
- --blob-server=blobcache-eu.lbry.com
# build:
# context: .
# dockerfile: Dockerfile-worker
@@ -49,7 +50,7 @@ services:
# - '9090:8080'
redis:
image: redis:7.0
container_name: redis
container_name: tc-redis
ports:
- '6379:6379'
volumes:
@@ -61,7 +62,7 @@ services:
restart: unless-stopped
db:
image: postgres:14
container_name: db
container_name: tc-db
ports:
- "5432:5432"
environment:
@@ -79,7 +80,7 @@ services:
retries: 5
minio:
image: minio/minio
container_name: minio
container_name: tc-minio
ports:
- "9000:9000"
- "38861:38861"
@@ -98,7 +99,8 @@ services:
/bin/sh -c "
/usr/bin/mc config host add myminio http://minio:9000 ody odyseetes3;
/usr/bin/mc mb myminio/transcoded;
/usr/bin/mc policy set download myminio/transcoded;
/usr/bin/mc anonymous set download myminio/transcoded;
/usr/bin/mc anonymous set public myminio/transcoded;
exit 0;
"
depends_on: ["minio"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/lbryio/transcoder

go 1.18
go 1.20

require (
github.com/Pallinder/go-randomdata v1.2.0