Skip to content

Commit

Permalink
0x0
Browse files Browse the repository at this point in the history
  • Loading branch information
frostbyte73 committed Jun 18, 2024
1 parent 070f081 commit 22f020b
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion pkg/pipeline/builder/video.go
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ func (b *VideoBin) addEncoder() error {
return errors.ErrGstPipelineError(err)
}
if err = caps.SetProperty("caps", gst.NewCapsFromString(fmt.Sprintf(
"video/x-h264,profile=%s,multiview-mode=mono,multiview-flags=0",
"video/x-h264,profile=%s,multiview-mode=mono,multiview-flags=0x0",
b.conf.VideoProfile,
))); err != nil {
return errors.ErrGstPipelineError(err)
Expand Down
38 changes: 19 additions & 19 deletions test/participant.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,12 @@ func (r *Runner) testParticipantFile(t *testing.T) {
t.Run("3A/Participant/File", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "VP8",
name: "AudioOnly",
fileType: livekit.EncodedFileType_MP4,
audioCodec: types.MimeTypeOpus,
audioDelay: time.Second * 8,
audioUnpublish: time.Second * 14,
audioRepublish: time.Second * 20,
videoCodec: types.MimeTypeVP8,
filename: "participant_{publisher_identity}_vp8_{time}.mp4",
audioUnpublish: time.Second * 10,
audioRepublish: time.Second * 15,
filename: "participant_{room_name}_{time}.mp4",
},
{
name: "H264",
Expand All @@ -86,12 +84,14 @@ func (r *Runner) testParticipantFile(t *testing.T) {
filename: "participant_{room_name}_h264_{time}.mp4",
},
{
name: "AudioOnly",
name: "VP8",
fileType: livekit.EncodedFileType_MP4,
audioCodec: types.MimeTypeOpus,
audioUnpublish: time.Second * 10,
audioRepublish: time.Second * 15,
filename: "participant_{room_name}_{time}.mp4",
audioDelay: time.Second * 8,
audioUnpublish: time.Second * 14,
audioRepublish: time.Second * 20,
videoCodec: types.MimeTypeVP8,
filename: "participant_{publisher_identity}_vp8_{time}.mp4",
},
} {
r.runParticipantTest(t, test.name, test, func(t *testing.T, identity string) {
Expand Down Expand Up @@ -172,15 +172,6 @@ func (r *Runner) testParticipantSegments(t *testing.T) {

t.Run("3C/Participant/Segments", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "VP8",
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
// videoDelay: time.Second * 10,
// videoUnpublish: time.Second * 20,
filename: "participant_{publisher_identity}_vp8_{time}",
playlist: "participant_{publisher_identity}_vp8_{time}.m3u8",
},
{
name: "H264",
audioCodec: types.MimeTypeOpus,
Expand All @@ -190,6 +181,15 @@ func (r *Runner) testParticipantSegments(t *testing.T) {
filename: "participant_{room_name}_h264_{time}",
playlist: "participant_{room_name}_h264_{time}.m3u8",
},
{
name: "VP8",
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
// videoDelay: time.Second * 10,
// videoUnpublish: time.Second * 20,
filename: "participant_{publisher_identity}_vp8_{time}",
playlist: "participant_{publisher_identity}_vp8_{time}.m3u8",
},
} {
r.runParticipantTest(t, test.name, test,
func(t *testing.T, identity string) {
Expand Down
22 changes: 11 additions & 11 deletions test/room_composite.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,30 @@ func (r *Runner) testRoomCompositeFile(t *testing.T) {

t.Run("1A/RoomComposite/File", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "AudioOnly",
fileType: livekit.EncodedFileType_OGG,
audioOnly: true,
options: &livekit.EncodingOptions{
AudioCodec: livekit.AudioCodec_OPUS,
},
filename: "r_{room_name}_audio_{time}",
expectVideoEncoding: false,
},
{
name: "Base",
filename: "r_{room_name}_{time}.mp4",
expectVideoEncoding: true,
},
{
name: "Video-Only",
name: "VideoOnly",
videoOnly: true,
options: &livekit.EncodingOptions{
VideoCodec: livekit.VideoCodec_H264_HIGH,
},
filename: "r_{room_name}_video_{time}.mp4",
expectVideoEncoding: true,
},
{
name: "Audio-Only",
fileType: livekit.EncodedFileType_OGG,
audioOnly: true,
options: &livekit.EncodingOptions{
AudioCodec: livekit.AudioCodec_OPUS,
},
filename: "r_{room_name}_audio_{time}",
expectVideoEncoding: false,
},
} {
r.runRoomTest(t, test.name, types.MimeTypeOpus, types.MimeTypeH264, func(t *testing.T) {
fileOutput := &livekit.EncodedFileOutput{
Expand Down
14 changes: 7 additions & 7 deletions test/track.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,20 @@ func (r *Runner) testTrackFile(t *testing.T) {

t.Run("5A/Track/File", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "OPUS",
audioOnly: true,
audioCodec: types.MimeTypeOpus,
outputType: types.OutputTypeOGG,
filename: "t_{track_source}_{time}.ogg",
},
{
name: "H264",
videoOnly: true,
videoCodec: types.MimeTypeH264,
outputType: types.OutputTypeMP4,
filename: "t_{track_id}_{time}.mp4",
},
{
name: "OPUS",
audioOnly: true,
audioCodec: types.MimeTypeOpus,
outputType: types.OutputTypeOGG,
filename: "t_{track_source}_{time}.ogg",
},
{
name: "VP8",
videoOnly: true,
Expand Down
28 changes: 14 additions & 14 deletions test/track_composite.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,18 @@ func (r *Runner) testTrackCompositeFile(t *testing.T) {
t.Run("4A/TrackComposite/File", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "VP8",
name: "H264",
fileType: livekit.EncodedFileType_MP4,
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
filename: "tc_{publisher_identity}_vp8_{time}.mp4",
videoCodec: types.MimeTypeH264,
filename: "tc_{room_name}_h264_{time}.mp4",
},
{
name: "H264",
name: "VP8",
fileType: livekit.EncodedFileType_MP4,
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeH264,
filename: "tc_{room_name}_h264_{time}.mp4",
videoCodec: types.MimeTypeVP8,
filename: "tc_{publisher_identity}_vp8_{time}.mp4",
},
} {
r.runTrackTest(t, test.name, test.audioCodec, test.videoCodec, func(t *testing.T, audioTrackID, videoTrackID string) {
Expand Down Expand Up @@ -154,11 +154,11 @@ func (r *Runner) testTrackCompositeSegments(t *testing.T) {
t.Run("4C/TrackComposite/Segments", func(t *testing.T) {
for _, test := range []*testCase{
{
name: "VP8",
name: "Audio Only",
audioCodec: types.MimeTypeOpus,
videoCodec: types.MimeTypeVP8,
filename: "tcs_{publisher_identity}_vp8_{time}",
playlist: "tcs_{publisher_identity}_vp8_{time}.m3u8",
filename: "tcs_{room_name}_audio_{time}",
playlist: "tcs_{room_name}_audio_{time}.m3u8",
audioOnly: true,
},
{
name: "H264",
Expand All @@ -169,11 +169,11 @@ func (r *Runner) testTrackCompositeSegments(t *testing.T) {
livePlaylist: "tcs_live_{room_name}_h264_{time}.m3u8",
},
{
name: "Audio Only",
name: "VP8",
audioCodec: types.MimeTypeOpus,
filename: "tcs_{room_name}_audio_{time}",
playlist: "tcs_{room_name}_audio_{time}.m3u8",
audioOnly: true,
videoCodec: types.MimeTypeVP8,
filename: "tcs_{publisher_identity}_vp8_{time}",
playlist: "tcs_{publisher_identity}_vp8_{time}.m3u8",
},
} {
r.runTrackTest(t, test.name, test.audioCodec, test.videoCodec,
Expand Down

0 comments on commit 22f020b

Please sign in to comment.