Commit 0d339d3
committed
fix(helper): NVENC scale_cuda filter syntax and NVDEC reference-frame pool
Two NVENC pipeline issues were dropping every Tubi-class (HEVC source)
segment back to the software encoder fallback:
scale_cuda filter chain. The previous filter string
"scale_cuda=W:H:force_original_aspect_ratio=decrease,format=nv12" had
a comma before format=nv12, so ffmpeg parsed it as two filters:
scale_cuda (GPU surface output) followed by a standalone format=nv12
CPU-side filter. The auto_scale ffmpeg inserted to bridge GPU->CPU
couldn't convert the surface and surfaced as
"Impossible to convert between the formats supported by the filter
'Parsed_scale_cuda_0' and the filter 'auto_scale_0'". Move format
inside scale_cuda's own options
("scale_cuda=w=W:h=H:format=nv12:force_original_aspect_ratio=decrease")
so the whole filter stays on GPU and feeds h264_nvenc directly.
NVDEC reference-frame pool. HEVC sources with longer reference chains
than the default extra_hw_frames pool covers ("Could not find ref with
POC N") would drop frames mid-decode and produce a short or empty
segment that the upload validator then rejected. Bump -extra_hw_frames
to 16 on the NVENC backend so the pool keeps the reference frames the
decoder still needs.1 parent c14563e commit 0d339d3
2 files changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
249 | 254 | | |
250 | 255 | | |
251 | 256 | | |
| |||
259 | 264 | | |
260 | 265 | | |
261 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
262 | 274 | | |
263 | | - | |
| 275 | + | |
264 | 276 | | |
265 | 277 | | |
266 | 278 | | |
| |||
0 commit comments