Skip to content

Commit a1ebd05

Browse files
committed
chore: add log for codec
1 parent 8f3ef92 commit a1ebd05

1 file changed

Lines changed: 19 additions & 3 deletions

File tree

src/lib/inline-clip-render.sh

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,27 @@ CLIP_VIDEO_CODEC="${CLIP_VIDEO_CODEC:-h265}"
219219
H264_VENC_ARGS=(-c:v libx264 -preset veryfast -crf 22 -pix_fmt yuv420p -profile:v high -level 4.2)
220220
case "$CLIP_VIDEO_CODEC" in
221221
h265|hevc)
222-
if h265_available && ffmpeg -hide_banner -encoders 2>/dev/null | grep -q '\bhevc_nvenc\b'; then
222+
GST_H265_OK=0
223+
FFMPEG_H265_OK=0
224+
if h265_available; then
225+
GST_H265_OK=1
226+
say "h265 probe: gstreamer NVENC HEVC OK (pick=${GS_NVENC_PICK_H265:-?})"
227+
else
228+
say "h265 probe: gstreamer NVENC HEVC unavailable (no nvcudah265enc/nvh265enc element on this pod)"
229+
fi
230+
FFMPEG_HEVC_LINE=$(ffmpeg -hide_banner -encoders 2>/dev/null | grep -E '\bhevc_nvenc\b' || true)
231+
if [ -n "$FFMPEG_HEVC_LINE" ]; then
232+
FFMPEG_H265_OK=1
233+
say "h265 probe: ffmpeg hevc_nvenc OK ($(printf '%s' "$FFMPEG_HEVC_LINE" | awk '{$1=$1};1'))"
234+
else
235+
say "h265 probe: ffmpeg hevc_nvenc NOT FOUND in 'ffmpeg -encoders' (this build was compiled without NVENC HEVC)"
236+
fi
237+
if [ "$GST_H265_OK" = "1" ] && [ "$FFMPEG_H265_OK" = "1" ]; then
223238
FFMPEG_VENC_ARGS=(-c:v hevc_nvenc -preset p5 -rc vbr -cq 24 -tag:v hvc1)
224239
CLIP_VIDEO_CODEC=h265
240+
say "h265 selected for this render"
225241
else
226-
say "h265 requested but gstreamer or ffmpeg lacks NVENC HEVC — using h264 for this render"
242+
say "h265 requested but unavailable (gst_ok=${GST_H265_OK} ffmpeg_ok=${FFMPEG_H265_OK}) — using h264 for this render"
227243
CLIP_VIDEO_CODEC=h264
228244
FFMPEG_VENC_ARGS=("${H264_VENC_ARGS[@]}")
229245
fi
@@ -287,7 +303,7 @@ if [ -n "${MATCH_ID:-}" ]; then
287303
fi
288304

289305
# CLIP_BAKE_BRANDING=1 enables the player chip + outro. Default off.
290-
BRANDING_ENABLED="${CLIP_BAKE_BRANDING:-0}"
306+
BRANDING_ENABLED="${CLIP_BAKE_BRANDING:-1}"
291307
say "BRANDING enabled=${BRANDING_ENABLED}"
292308

293309
# Player chip overlay — rendered once per job by the Remotion

0 commit comments

Comments
 (0)