CI Report:
https://ci-tests.linuxserver.io/linuxserver/tvheadend/0af87f13-ls259/index.html
LinuxServer Changes:
Rebase to Alpine 3.20.
Remote Changes:
transcode: add advanced options for deinterlacing
This patch exposes additional configuration options for the
deinterlace_vaapi (hardware) and yadif (software) deinterlace filters:
- Deinterlace rate type (rate): frame or field
- Deinterlace fields only (auto): only deinterlace interlaced fields
- VAAPI Deinterlace mode (mode): Bob, Weave, MADI, MCDI (for VAAPI only)
These options allow the transcode deinterlace configuration to be
fine-tuned. Most notably, the deinterlace filters can now be configured
with field-rate deinterlacing, which causes (for example) 25fps
interlaced input at a 90kHz timebase to produce 50fps output with a
180kHz timebase.
To maintain MPEG-TS compliance, the output timebase is fixed at 90kHz,
and both the adjusted output frame rate (e.g. 50fps) and frame
timestamps are rescaled accordingly before encoding. For accuracy, this
rescaling is performed dynamically using libav functions such as
av_rescale_q(), based on the timebase of the final filter in the
AVFilterContext chain and the timebase of the output AVCodecContext.
This approach supports fractional frame rates and remains robust against
future changes to the filter configuration, including various
combinations of deinterlace options.
When field-rate deinterlacing is selected, this produces frames with
(for example) correct timing of 50fps playback in a 90kHz container,
ensuring that the transcoded output stream preserves the intended
cadence and temporal fidelity of the original interlaced source.