fix(growing): restore proven XDCAM HD422 (MPEG-2 422) rdd9 @1080i59.94
Today's codec churn (h264_nvenc/AVC-Intra/op1a) produced .mxf files Premiere could not open. Subagent diagnosis vs the old working files on the share proved the working format is XDCAM HD422 = mpeg2video 4:2:2 yuv422p, clip type rdd9, wrapped at 1080i59.94 (30000/1001). raw2bmx REJECTS MPEG-2 422 at 60000/1001, so a 1080p59.94 SDI feed must wrap as 1080i59.94. Reverted GROWING_VIDEO_ELEMENTARY_ARGS to mpeg2video, raw2bmx -t rdd9 --mpeg2lg_422p_hl_1080i -f 30000/1001, -f mpeg2video pipe, and rates() 59.94->30000/1001 with 1080 forced interlaced.
This commit is contained in:
parent
e6eb565e30
commit
e6b7856bb2
1 changed files with 17 additions and 17 deletions
|
|
@ -360,12 +360,8 @@ const CONTAINER_EXT = {
|
||||||
// keeps a short GOP. Muxed to a raw `mpeg2video` elementary stream (no
|
// keeps a short GOP. Muxed to a raw `mpeg2video` elementary stream (no
|
||||||
// container) so raw2bmx ingests it via --mpeg2lg_*.
|
// container) so raw2bmx ingests it via --mpeg2lg_*.
|
||||||
const GROWING_VIDEO_ELEMENTARY_ARGS = [
|
const GROWING_VIDEO_ELEMENTARY_ARGS = [
|
||||||
'-c:v', 'h264_nvenc', '-profile:v', 'high',
|
'-c:v', 'mpeg2video', '-pix_fmt', 'yuv422p',
|
||||||
'-preset', 'p1', '-tune', 'll',
|
'-dc', '10', '-g', '15', '-bf', '2',
|
||||||
'-rc', 'constqp', '-qp', '21',
|
|
||||||
'-pix_fmt', 'yuv422p',
|
|
||||||
'-g', '1',
|
|
||||||
'-aud', '1', // Access Unit Delimiters required for raw2bmx --avc_high wrapper
|
|
||||||
];
|
];
|
||||||
const GROWING_DEFAULT_BITRATE = '25M';
|
const GROWING_DEFAULT_BITRATE = '25M';
|
||||||
const GROWING_EXT = 'mxf';
|
const GROWING_EXT = 'mxf';
|
||||||
|
|
@ -416,11 +412,14 @@ function deriveGrowingRaster(resolution, framerate, scanHint = null) {
|
||||||
if (height == null) height = 1080; // default raster
|
if (height == null) height = 1080; // default raster
|
||||||
|
|
||||||
// ffmpeg rate + raw2bmx rate strings for the common broadcast rates.
|
// ffmpeg rate + raw2bmx rate strings for the common broadcast rates.
|
||||||
|
// CRITICAL: XDCAM HD422 (MPEG-2 422 Long GOP) at 1080 lines does NOT support
|
||||||
|
// 1080p59.94 — raw2bmx rejects MPEG-2 422 @ 60000/1001 outright. A 1080p59.94
|
||||||
|
// SDI feed is therefore wrapped as 1080i59.94 (= 30000/1001 frame rate), which
|
||||||
|
// is exactly what every previously-working growing file on the share used and
|
||||||
|
// what Premiere's edit-while-ingest path reads. So 59.94 maps to 30000/1001.
|
||||||
function rates(fps) {
|
function rates(fps) {
|
||||||
if (fps == null) return { ff: '30000/1001', raw: '30000/1001' }; // 1080i59.94 default
|
if (fps == null) return { ff: '30000/1001', raw: '30000/1001' }; // 1080i59.94 default
|
||||||
if (Math.abs(fps - 59.94) < 0.2)
|
if (Math.abs(fps - 59.94) < 0.2 || Math.abs(fps - 29.97) < 0.05)
|
||||||
return { ff: '60000/1001', raw: '60000/1001' };
|
|
||||||
if (Math.abs(fps - 29.97) < 0.05)
|
|
||||||
return { ff: '30000/1001', raw: '30000/1001' };
|
return { ff: '30000/1001', raw: '30000/1001' };
|
||||||
if (Math.abs(fps - 60) < 0.05) return { ff: '60', raw: '60' };
|
if (Math.abs(fps - 60) < 0.05) return { ff: '60', raw: '60' };
|
||||||
if (Math.abs(fps - 50) < 0.05) return { ff: '25', raw: '25' }; // 1080i50 → 25 fps frames
|
if (Math.abs(fps - 50) < 0.05) return { ff: '25', raw: '25' }; // 1080i50 → 25 fps frames
|
||||||
|
|
@ -430,17 +429,18 @@ function deriveGrowingRaster(resolution, framerate, scanHint = null) {
|
||||||
return { ff: String(fps), raw: String(fps) };
|
return { ff: String(fps), raw: String(fps) };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Default scan: 1080 → interlaced (broadcast SDI default), 720/below → p.
|
// Scan for the MPEG-2 422 essence. raw2bmx CANNOT wrap MPEG-2 422 as 1080p at
|
||||||
// scanHint ('p'/'i') overrides this default so progressive Deltacast captures
|
// 59.94, so a 1080-line raster is always wrapped as INTERLACED (1080i59.94),
|
||||||
// are wrapped as progressive MXFs.
|
// regardless of the progressive scanHint. 720 and below stay progressive.
|
||||||
if (scan == null) scan = scanHint || ((height >= 1080) ? 'i' : 'p');
|
if (height >= 1080) scan = 'i';
|
||||||
|
else if (scan == null) scan = scanHint || 'p';
|
||||||
const r = rates(fpsNum);
|
const r = rates(fpsNum);
|
||||||
|
|
||||||
let rawFlag;
|
let rawFlag;
|
||||||
if (height >= 1080) {
|
if (height >= 1080) {
|
||||||
rawFlag = '--avci100_1080p';
|
rawFlag = '--mpeg2lg_422p_hl_1080i';
|
||||||
} else if (height >= 720) {
|
} else if (height >= 720) {
|
||||||
rawFlag = '--avci100_720p';
|
rawFlag = '--mpeg2lg_422p_hl_720p';
|
||||||
if (fpsNum == null) { r.ff = '60000/1001'; r.raw = '60000/1001'; }
|
if (fpsNum == null) { r.ff = '60000/1001'; r.raw = '60000/1001'; }
|
||||||
} else {
|
} else {
|
||||||
rawFlag = '--mpeg2lg_422p_ml_576i';
|
rawFlag = '--mpeg2lg_422p_ml_576i';
|
||||||
|
|
@ -863,7 +863,7 @@ class CaptureManager {
|
||||||
...GROWING_VIDEO_ELEMENTARY_ARGS,
|
...GROWING_VIDEO_ELEMENTARY_ARGS,
|
||||||
'-b:v', vb, '-minrate', vb, '-maxrate', vb, '-bufsize', vb,
|
'-b:v', vb, '-minrate', vb, '-maxrate', vb, '-bufsize', vb,
|
||||||
'-r', ffRate,
|
'-r', ffRate,
|
||||||
'-f', 'h264', '@VF@',
|
'-f', 'mpeg2video', '@VF@',
|
||||||
// (b) PCM s16le audio → "$AF"
|
// (b) PCM s16le audio → "$AF"
|
||||||
'-map', audioMap,
|
'-map', audioMap,
|
||||||
'-c:a', 'pcm_s16le', '-ar', '48000', '-ac', String(ach),
|
'-c:a', 'pcm_s16le', '-ar', '48000', '-ac', String(ach),
|
||||||
|
|
@ -912,7 +912,7 @@ class CaptureManager {
|
||||||
// fields with the live frame count every 3s (Premiere reads the header
|
// fields with the live frame count every 3s (Premiere reads the header
|
||||||
// Duration on each refresh; without the patch it sees duration=N/A).
|
// Duration on each refresh; without the patch it sees duration=N/A).
|
||||||
const bmx = [
|
const bmx = [
|
||||||
'raw2bmx', '-t', 'op1a', '-o', '"$OUT"', '-f', frameRate,
|
'raw2bmx', '-t', 'rdd9', '-o', '"$OUT"', '-f', frameRate,
|
||||||
'--part', String(GROWING_PART_INTERVAL_FRAMES),
|
'--part', String(GROWING_PART_INTERVAL_FRAMES),
|
||||||
'--index-follows',
|
'--index-follows',
|
||||||
rawFlag, '"$VF"',
|
rawFlag, '"$VF"',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue