mirror of
https://github.com/koush/scrypted.git
synced 2026-03-06 19:22:00 +00:00
rebroadcast: move and enable dumping of h264 extra data
This commit is contained in:
4
plugins/prebuffer-mixin/package-lock.json
generated
4
plugins/prebuffer-mixin/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.183",
|
||||
"version": "0.1.184",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.183",
|
||||
"version": "0.1.184",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@scrypted/common": "file:../../common",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@scrypted/prebuffer-mixin",
|
||||
"version": "0.1.183",
|
||||
"version": "0.1.184",
|
||||
"description": "Rebroadcast and Prebuffer for VideoCameras.",
|
||||
"author": "Scrypted",
|
||||
"license": "Apache-2.0",
|
||||
|
||||
@@ -384,8 +384,19 @@ class PrebufferSession {
|
||||
}
|
||||
|
||||
const vcodec = [
|
||||
'-vcodec',
|
||||
'copy',
|
||||
'-vcodec', 'copy',
|
||||
// Add SPS/PPS to all keyframes. Not all cameras do this!
|
||||
// This isn't really necessary for a few reasons:
|
||||
// MPEG-TS and MP4 will automatically do this, since there's no out of band
|
||||
// way to get the SPS/PPS.
|
||||
// RTSP mode may send the SPS/PPS out of band via the sdp, and then may not have
|
||||
// SPS/PPS in the bit stream.
|
||||
// Adding this argument isn't strictly necessary, but it normalizes the bitstream
|
||||
// so consumers that expect the SPS/PPS will have it. Ran into an issue where
|
||||
// the HomeKit plugin was blasting RTP packets out from RTSP mode,
|
||||
// but the bitstream had no SPS/PPS information, resulting in the video never loading
|
||||
// in the Home app.
|
||||
'-bsf:v', 'dump_extra'
|
||||
];
|
||||
|
||||
const rbo: ParserOptions<PrebufferParsers> = {
|
||||
@@ -472,19 +483,6 @@ class PrebufferSession {
|
||||
// create missing pts from dts so mpegts and mp4 muxing does not fail
|
||||
const extraInputArguments = this.storage.getItem(this.ffmpegInputArgumentsKey) || DEFAULT_FFMPEG_INPUT_ARGUMENTS;
|
||||
ffmpegInput.inputArguments.unshift(...extraInputArguments.split(' '));
|
||||
// Add SPS/PPS to all keyframes. Not all cameras do this!
|
||||
// This isn't really necessary for a few reasons:
|
||||
// MPEG-TS and MP4 will automatically do this, since there's no out of band
|
||||
// way to get the SPS/PPS.
|
||||
// RTSP mode may send the SPS/PPS out of band via the sdp, and then may not have
|
||||
// SPS/PPS in the bit stream.
|
||||
// Adding this argument isn't strictly necessary, but it normalizes the bitstream
|
||||
// so consumers that expect the SPS/PPS will have it. Ran into an issue where
|
||||
// the HomeKit plugin was blasting RTP packets out from RTSP mode,
|
||||
// but the bitstream had no SPS/PPS information, resulting in the video never loading
|
||||
// in the Home app.
|
||||
if (rtspMode)
|
||||
ffmpegInput.inputArguments.push('-bsf:v', 'dump_extra');
|
||||
session = await startParserSession(ffmpegInput, rbo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user