From bdef766f7d9d6e0003be361aa9b79e208dbbbf85 Mon Sep 17 00:00:00 2001 From: moritzmhmk Date: Sun, 23 Jun 2019 20:43:22 +0100 Subject: [PATCH] Another fix for iOS 12.2 The previous fix (adding `-copyts` to copy the timestamp) did only work until a certain uptime (about 8h) was reached. Adding ``-timestamps abs`` forces the use of absolute (wallclock) time. This does for some reason work instead of the (much smaller) timestamps after some hours of uptime... --- CameraSource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CameraSource.js b/CameraSource.js index 8a9af93..de181bb 100644 --- a/CameraSource.js +++ b/CameraSource.js @@ -203,7 +203,7 @@ Camera.prototype.handleStreamRequest = function (request) { this.log(`Starting video stream (${width}x${height}, ${fps} fps, ${bitrate} kbps)`) let ffmpegCommand = `\ --f video4linux2 -input_format h264 -video_size ${width}x${height} -framerate ${fps} -i /dev/video0 \ +-f video4linux2 -input_format h264 -video_size ${width}x${height} -framerate ${fps} -timestamps abs -i /dev/video0 \ -vcodec copy -copyts -an -payload_type 99 -ssrc ${ssrc} -f rtp \ -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ${srtp} \ srtp://${address}:${port}?rtcpport=${port}&localrtcpport=${port}&pkt_size=1378`