Improved ffmpeg error resilience for ad stitched streams

This commit is contained in:
Trevor Mears
2026-01-01 00:33:10 -08:00
parent ea3aff2f04
commit 2531f1786f
2 changed files with 17 additions and 3 deletions
+8 -1
View File
@@ -26,7 +26,14 @@ router.get('/', (req, res) => {
const args = [
'-hide_banner',
'-loglevel', 'warning',
'-fflags', '+genpts+discardcorrupt',
// Error resilience: discard corrupt packets, generate timestamps
'-fflags', '+genpts+discardcorrupt+igndts',
// Ignore errors in stream and continue
'-err_detect', 'ignore_err',
// Reconnect settings for network drops
'-reconnect', '1',
'-reconnect_streamed', '1',
'-reconnect_delay_max', '5',
'-i', url,
// Copy ALL streams without re-encoding
'-c', 'copy',