Skip to content

Commit

Permalink
VLive: Decrease the latency for virtual live. v5.11.1
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Oct 21, 2023
1 parent f0ce515 commit c1d647a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 3 additions & 1 deletion platform/virtual-live-stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,7 +1031,9 @@ func (v *VLiveTask) doVLive(ctx context.Context, input *VLiveSourceFile) error {
if input.Type != SrsVLiveSourceTypeStream {
args = append(args, "-stream_loop", "-1")
}
args = append(args, "-re")
args = append(args, "-re",
"-fflags", "nobuffer", // Reduce the latency introduced by optional buffering.
)
// For RTSP stream source, always use TCP transport.
if strings.HasPrefix(input.Target, "rtsp://") {
args = append(args, "-rtsp_transport", "tcp")
Expand Down
5 changes: 5 additions & 0 deletions ui/src/components/TutorialsButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ function useTutorialsEn(mediumRef) {
const ref = React.useRef({tutorials:[]});

const dict = React.useRef({
'39bd001af02d': {
author: 'Winlin Yang',
link: 'https://blog.ossrs.io/efficient-live-streaming-transcoding-for-reducing-bandwidth-and-saving-costs-39bd001af02d',
title: 'Efficient Live Streaming Transcoding for Reducing Bandwidth and Saving Costs'
},
'c078db917149': {
author: 'Winlin Yang',
link: 'https://blog.ossrs.io/easily-stream-your-rtsp-ip-camera-to-youtube-twitch-or-facebook-c078db917149',
Expand Down
3 changes: 2 additions & 1 deletion ui/src/pages/ScenarioTutorials.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default function ScenarioTutorials() {
{id: '38be22beec57'},
{id: '2aa792c35b25'},
{id: 'ba1895828b4f'},
{id: 'c078db917149'}
{id: 'c078db917149'},
{id: '39bd001af02d'}
])
});

Expand Down
2 changes: 1 addition & 1 deletion ui/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const StreamName = {
localStorage.setItem(SRS_STREAM_NAME, name);
},
load: () => {
return localStorage.getItem(SRS_STREAM_NAME);
return localStorage.getItem(SRS_STREAM_NAME) || 'livestream';
}
};

Expand Down

0 comments on commit c1d647a

Please sign in to comment.