Skip to content

Commit

Permalink
Configure FFmpeg to reconnect on network error
Browse files Browse the repository at this point in the history
  • Loading branch information
mtneug committed Feb 1, 2024
1 parent aecfbdc commit ab4372c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/functions/mmsys-test-encode/func.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ func (f *function) encode(ctx context.Context, chunk bool, chunkSeekSecond int,
ffmpegArgs = append(ffmpegArgs, "-t", strconv.Itoa(f.chunkSeconds+chunkOverlapSeconds))
}
ffmpegArgs = append(ffmpegArgs,
"-reconnect", "1",
"-reconnect_on_network_error", "1",
"-reconnect_on_http_error", "1",
"-reconnect_delay_max", "5",
"-i", inUrl,
"-filter:v", "scale=1920:1920:force_original_aspect_ratio=decrease:force_divisible_by=2",
"-f", "yuv4mpegpipe",
Expand Down

0 comments on commit ab4372c

Please sign in to comment.