Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for iOS 12.2 playback issues #53

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions CameraSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,15 @@ Camera.prototype.handleStreamRequest = function (request) {
bitrate = request['video']['max_bit_rate']
}

this._v4l2CTLSetCTRL('video_bitrate', `${bitrate}000`)

let srtp = this.pendingSessions[sessionIdentifier]['video_srtp'].toString('base64')
let address = this.pendingSessions[sessionIdentifier]['address']
let port = this.pendingSessions[sessionIdentifier]['video_port']
let ssrc = this.pendingSessions[sessionIdentifier]['video_ssrc']

let ffmpegCommand = `\
-f video4linux2 -input_format h264 -video_size ${width}x${height} -framerate ${fps} -i /dev/video0 \
-vcodec copy -an -payload_type 99 -ssrc ${ssrc} -f rtp \
-srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params ${srtp} \
-f video4linux2 -input_format yuv420p -video_size ${width}x${height} -i /dev/video0 \
-vcodec h264_omx -an -pix_fmt yuv420p -r ${fps} -b:v ${bitrate}k -bufsize ${bitrate}k -maxrate ${bitrate}k \
-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`
console.log(ffmpegCommand)
let ffmpeg = spawn('ffmpeg', ffmpegCommand.split(' '), {env: process.env})
Expand Down