Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f0138cf
Enable debug_info symbols for tvheadend, ffmpeg and videodrivers
th0ma7 Sep 21, 2025
df6ae2a
tvheadend: Update requirements for gracenote2epg[full]>=1.6.0
th0ma7 Sep 21, 2025
d583c57
tvheadend: Update to bed53d31 git has from September 18th 2025
th0ma7 Sep 21, 2025
107884e
intel-graphics-compiler: Allow handling GCC_DEBUG_INFO
th0ma7 Sep 23, 2025
ef3a980
tvheadend: Update to version 4.3 git hash 5fd59491 of Sept 22nd
th0ma7 Sep 30, 2025
8caf6c6
tvheadend: Add crash fix from https://github.com/tvheadend/tvheadend/…
th0ma7 Sep 30, 2025
c8dfd73
tvheadend: Re-enable debug build
th0ma7 Sep 30, 2025
f914009
intel-graphic-compiler: Revert disabling assertions as now default
th0ma7 Sep 30, 2025
44c32be
synocli-videodriver: Not enough space on GH-action for Debug mode
th0ma7 Sep 30, 2025
b0bcf13
libhdhomerun: Update from version 20250506 to 20250815
th0ma7 Oct 7, 2025
76e8e44
tvheadend: Update to git hash b6d58031 from Oct 5th 2025
th0ma7 Oct 7, 2025
e6b55a8
tvheadend: Fix comcerto2k build as numpy requires gcc >= 8.5
th0ma7 Oct 8, 2025
236314a
ffmpeg7: Workaround for compiler bug for hi3535 in dedug mode
th0ma7 Oct 8, 2025
076faae
qoriq: Adjust debug compile flags to workaround architecture limits
th0ma7 Oct 8, 2025
6e67c7b
tvheadend: Update to git hash d4dff154 from Oct 7th 2025
th0ma7 Oct 8, 2025
866f2d9
SVT-AV1: Disable AVX512 with older gcc 4.9.x
th0ma7 Oct 10, 2025
856577c
cross-env.mk: Adapt debug flags for older binutils
th0ma7 Oct 10, 2025
2bc551c
ffmpeg7: Do not enable lto in Debug mode
th0ma7 Oct 10, 2025
96f988f
ffmpeg7: Add pending fix upstream affecting tvheadend
th0ma7 Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions cross/ffmpeg7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ LICENSE = GPLv2
# requires c11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)

include ../../mk/spksrc.common.mk

CONFIGURE_ARGS = --target-os=linux --cross-prefix=$(TC_PATH)$(TC_PREFIX) --prefix=$(INSTALL_PREFIX)
CONFIGURE_ARGS += --pkg-config=/usr/bin/pkg-config
CONFIGURE_ARGS += --ranlib=$(RANLIB)
Expand All @@ -21,26 +23,29 @@ CONFIGURE_ARGS += --enable-gpl --enable-version3
CONFIGURE_ARGS += --disable-static
CONFIGURE_ARGS += --disable-doc
ifeq ($(strip $(GCC_DEBUG_INFO)),1)
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --disable-optimizations --assert-level=2 --enable-ftrapv
ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH))
# Workaround for gcc-4.8.3 internal compilier bug in debug mode
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --assert-level=2
CONFIGURE_ARGS += --extra-cflags=-O1
else
CONFIGURE_ARGS += --enable-debug=3 --disable-stripping --assert-level=2 --enable-ftrapv --disable-optimizations
endif
else
CONFIGURE_ARGS += --extra-cflags=-O3
CONFIGURE_ARGS += --disable-debug
CONFIGURE_ARGS += --enable-lto
endif

# Must match $(SPK_REV) from spk/ffmpeg7/Makefile
CONFIGURE_ARGS += --extra-version=$(shell sed -n 's/^SPK_REV = \(.*\)/\1/p' $(WORK_DIR)/../../../spk/ffmpeg7/Makefile)

# Enable Synology specific -hls_seek_time option and other optimizations
CONFIGURE_ARGS += --extra-cflags=-DSYNO_VIDEOSTATION

# Compiler workaround to enable DTS-HD MA stream decoding
CONFIGURE_ARGS += --extra-cflags=-fno-if-conversion
# Synology default optimization
CONFIGURE_ARGS += --extra-cflags=-O3
# Remove some of the noise while compiling
CONFIGURE_ARGS += --extra-cflags=-Wno-deprecated-declarations

include ../../mk/spksrc.common.mk

# ARCH specific
OPTIONAL_DEPENDS = cross/openh264
OPTIONAL_DEPENDS += cross/libaom
Expand Down Expand Up @@ -210,7 +215,6 @@ ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --arch=arm
CONFIGURE_ARGS += --enable-neon
CONFIGURE_ARGS += --enable-thumb
CONFIGURE_ARGS += --enable-lto
CONFIGURE_ARGS += --disable-armv5te
CONFIGURE_ARGS += --disable-armv6
CONFIGURE_ARGS += --disable-armv6t2
Expand All @@ -224,14 +228,12 @@ ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --arch=arm64
CONFIGURE_ARGS += --enable-neon
CONFIGURE_ARGS += --enable-thumb
CONFIGURE_ARGS += --enable-lto
endif

ifeq ($(findstring $(ARCH),qoriq),$(ARCH))
CONFIGURE_ARGS += --arch=ppc
CONFIGURE_ARGS += --cpu=e500v2
CONFIGURE_ARGS += --extra-libs=-latomic
CONFIGURE_ARGS += --enable-lto
endif

ifeq ($(findstring $(ARCH),evansport),$(ARCH))
Expand All @@ -249,7 +251,6 @@ DEPENDS += cross/intel-media-driver cross/intel-mediasdk
DEPENDS += cross/intel-libvpl cross/intel-libvpl-tools
endif
CONFIGURE_ARGS += --arch=x86_64
CONFIGURE_ARGS += --enable-lto
CONFIGURE_ARGS += --enable-libdrm
CONFIGURE_ARGS += --enable-libmfx
CONFIGURE_ARGS += --enable-vaapi
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
If hw_base_encode_send_frame() is called with frame == NULL before any
input frames are submitted, ctx->pic_end is NULL and dereferencing it
causes a crash. This can occur in hardware encoding pipelines that flush
before receiving any input frames.

Fix by checking ctx->pic_end before accessing its pts field.

Link: https://github.com/tvheadend/tvheadend/issues/1833
Signed-off-by: James Hutchinson <[email protected]>

Source: https://patchwork.ffmpeg.org/project/ffmpeg/patch/[email protected]/

--- libavcodec/vaapi_encode.c-orig 2025-08-05 00:22:34.000000000 +0000
+++ libavcodec/vaapi_encode.c 2025-10-12 12:10:57.687449669 +0000
@@ -1382,7 +1382,7 @@ static int vaapi_encode_send_frame(AVCod

// Fix timestamps if we hit end-of-stream before the initial decode
// delay has elapsed.
- if (ctx->input_order < ctx->decode_delay)
+ if (ctx->input_order <= ctx->decode_delay && ctx->pic_end)
ctx->dts_pts_diff = ctx->pic_end->pts - ctx->first_pts;
}

2 changes: 1 addition & 1 deletion cross/libhdhomerun/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = libhdhomerun
PKG_VERS = 20250506
PKG_VERS = 20250815
PKG_EXT = tgz
PKG_DIST_NAME = $(PKG_NAME)_$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://download.silicondust.com/hdhomerun
Expand Down
6 changes: 3 additions & 3 deletions cross/libhdhomerun/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
libhdhomerun_20250506.tgz SHA1 5de17a094030e6fcdab80bbcb2777596895fb79e
libhdhomerun_20250506.tgz SHA256 879b1bc476c9b93e77ee280a84fc1157e7cc47d43ed9c8398d88a8ac5f35c034
libhdhomerun_20250506.tgz MD5 0ad4ab9827cff41ef6c59f637265f200
libhdhomerun_20250815.tgz SHA1 5de17a094030e6fcdab80bbcb2777596895fb79e
libhdhomerun_20250815.tgz SHA256 879b1bc476c9b93e77ee280a84fc1157e7cc47d43ed9c8398d88a8ac5f35c034
libhdhomerun_20250815.tgz MD5 0ad4ab9827cff41ef6c59f637265f200
5 changes: 5 additions & 0 deletions cross/svt-av1/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ CMAKE_ARGS += -DCOMPILE_C_ONLY=ON
endif
endif

# GCC 4.9 has incomplete/broken AVX-512 intrinsics support
ifeq ($(call version_lt, ${TC_GCC}, 5.0),1)
CMAKE_ARGS += -DENABLE_AVX512=OFF
endif

.PHONY: svt-av1_post_install_target
svt-av1_post_install_target:
$(RUN) sed -i 's|^prefix=.*|prefix=$(STAGING_INSTALL_PREFIX)|' $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/SvtAv1Enc.pc
4 changes: 2 additions & 2 deletions cross/tvheadend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ PKG_NAME = tvheadend
PKG_VERS = 4.3
PKG_EXT = tar.gz
# no official release since v4.2.8 (Jan 12, 2019)
# git hash from August 21st 2025
PKG_GIT_HASH = d69021326922bc2029f25858460ff4f5e245f89c
# git hash from Oct 7th 2025
PKG_GIT_HASH = d4dff154ae2499f29b31c680e9ba60f58166cc3e
PKG_DIST_NAME = $(PKG_GIT_HASH).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/tvheadend/tvheadend/archive
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT)
Expand Down
6 changes: 3 additions & 3 deletions cross/tvheadend/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz SHA1 bc2c2162d8513f8073e42b6c1e34216d99f5746f
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz SHA256 998625df8f0e2315e758018f7ce04e1f90b3945259e1c3a8a8c34ff8a97f2516
tvheadend-gitd69021326922bc2029f25858460ff4f5e245f89c.tar.gz MD5 416175fac77b091971b2de5413edf42c
tvheadend-gitd4dff154ae2499f29b31c680e9ba60f58166cc3e.tar.gz SHA1 9586b9afe44593e0778cef29be9ee8cf78a81b3b
tvheadend-gitd4dff154ae2499f29b31c680e9ba60f58166cc3e.tar.gz SHA256 f28f41964480b26ef506fcabf897f96784be689cde56084655d85d36d8cad93b
tvheadend-gitd4dff154ae2499f29b31c680e9ba60f58166cc3e.tar.gz MD5 3e93b2429fd66e470ccafe240db1d65a
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
--- ./src/transcoding/transcode/context.c-orig 2025-09-29 23:02:55.751104426 +0000
+++ ./src/transcoding/transcode/context.c 2025-09-29 23:04:03.323094983 +0000
@@ -414,6 +414,11 @@ tvh_context_encode(TVHContext *self, AVF
int ret = 0;

if (!avcodec_is_open(self->oavctx)) {
+ // Check if we have a valid codec before attempting to open
+ if (!self->oavctx->codec) {
+ tvh_context_log(self, LOG_ERR, "cannot open encoder: no codec available");
+ return -1;
+ }
ret = tvh_context_open(self, OPEN_ENCODER);
}
if (!ret && !(ret = tvh_context_push_frame(self, avframe))) {
15 changes: 14 additions & 1 deletion mk/spksrc.cross-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,22 @@ ENV += TC_KERNEL=$(TC_KERNEL)
# -g3 includes macro definitions in debug info
# -O0 disables optimizations for predictable debugging
# -gz compresses debug sections to reduce file size (60-80% smaller)
#
# PowerPC e500v2 (qoriq): Use -O1 to avoid stack frame offset limitations
# (e500v2 has 248-byte max offset for certain load/store instructions)
#
# GCC 4.8.3 (hi3535/armv7l) with old binutils cannot handle compressed
# debug sections from -g3. Use -g (level 2) instead which generates
# less debug info and avoids compression
ifeq ($(strip $(GCC_DEBUG_INFO)),1)
ifeq ($(strip $(GCC_DEBUG_FLAGS)),)
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O0
ifeq ($(findstring $(ARCH), $(PPC_ARCHS)),$(ARCH))
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O1 -fno-omit-frame-pointer
else ifeq ($(findstring $(ARCH), $(ARMv7L_ARCHS)),$(ARCH))
GCC_DEBUG_FLAGS = -ggdb3 -g3 -O1 -fno-omit-frame-pointer
else
GCC_DEBUG_FLAGS = -ggdb3 -g -O0
endif

# Check compression support and add to flags
GCC_SUPPORTS_GZ := $(shell echo | $(WORK_DIR)/../../../toolchain/syno-$(ARCH)-$(TCVERSION)/work/$(TC_TARGET)/bin/$(TC_PREFIX)gcc -gz -E - 2>/dev/null 1>&2 && echo yes)
Expand Down
10 changes: 1 addition & 9 deletions mk/spksrc.cross-meson-crossfile.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,9 @@ endif
ifeq ($(GCC_DEBUG_INFO),1)
@echo "debug = 'true'" ; \
echo "b_ndebug = 'true'" ; \
echo "optimization = '0'" ; \
echo "optimization = '$(strip $(patsubst -O%,%,$(filter -O%,$(GCC_DEBUG_FLAGS))))'" ; \
echo
endif
# @echo "install_rpath = [" ; \
# echo $(LDFLAGS) $(ADDITIONAL_LDFLAGS) | tr ' ' '\n' | grep '^-Wl,--rpath,' | sed -e "s/^-Wl,--rpath,//" -e "s/^/\t'/" -e "s/$$/',/" ; \
# echo -ne "\t]\n" ; \
# echo
# @echo "runtime_rpath = [" ; \
# echo $(LDFLAGS) $(ADDITIONAL_LDFLAGS) | tr ' ' '\n' | grep '^-Wl,--rpath,' | sed -e "s/^-Wl,--rpath,//" -e "s/^/\t'/" -e "s/$$/',/" ; \
# echo -ne "\t]\n" ; \
# echo
@echo "c_args = ["
ifneq ($(strip $(MESON_BUILTIN_C_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_C_ARGS)',\n"
Expand Down
2 changes: 2 additions & 0 deletions spk/ffmpeg7/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ DESCRIPTION_FRE = FFmpeg est une solution complète multiplateforme pour enregis
DISPLAY_NAME = FFmpeg $(firstword $(subst ., ,$(SPK_VERS)))
STARTABLE = no

GCC_DEBUG_INFO := 1

HOMEPAGE = https://www.ffmpeg.org/
LICENSE = GPLv3

Expand Down
62 changes: 38 additions & 24 deletions spk/tvheadend/Makefile
Original file line number Diff line number Diff line change
@@ -1,43 +1,23 @@
SPK_NAME = tvheadend
SPK_SHORT_VERS = 4.3
SPK_GIT_HASH = d6902132
SPK_GIT_DATE = 20250821
SPK_GIT_HASH = d4dff154
SPK_GIT_DATE = 20251007
SPK_VERS = $(SPK_SHORT_VERS).$(SPK_GIT_DATE)
TVH_VERS = $(SPK_SHORT_VERS)~$(SPK_GIT_HASH)
SPK_REV = 44
SPK_REV = 45
SPK_ICON = src/tvheadend.png
DSM_UI_DIR = app

# Export version to the build where version
# script gets patched accordingly by:
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

FFMPEG_PACKAGE = ffmpeg7
PYTHON_PACKAGE = python312
SPK_DEPENDS = 'python312:$(FFMPEG_PACKAGE)'

# PPC archs except qoriq are not supported
# https://tvheadend.org/issues/5060
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)
# ffmpeg7 requires c11 support
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS)

# Force building pure-python wheels to include gracenote2epg
WHEELS_PURE_PYTHON_PACKAGING_ENABLE = 1
WHEELS += src/requirements-pure.txt

DEPENDS = cross/tvheadend
DEPENDS += cross/dtv-scan-tables
DEPENDS += cross/docker-tvheadend
DEPENDS += cross/zap2epg

MAINTAINER = th0ma7
DESCRIPTION = Tvheadend is a TV streaming server and recorder for Linux, FreeBSD and Android supporting DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP and HDHomeRun as input sources. Tvheadend offers HTTP, HTSP and SAT IP streaming.
DESCRIPTION_FRE = Tvheadend est un serveur de streaming et enregistreur TV pour Linux, FreeBSD et Android prenant en charge DVB-S, DVB-S2, DVB-C, DVB-T, ATSC, ISDB-T, IPTV, SAT IP et HDHomeRun comme sources d\'entrée. Tvheadend offre le streaming HTTP, HTSP et SAT IP.
DISPLAY_NAME = Tvheadend
STARTABLE = yes
CHANGELOG = "1. Update to latest git version d6902132 as of August 21st 2025 \(Includes season and episode number to filename formatting, Add scene markers to recordings, Add age ratings on XMLTV\)<br/>2. Update zap2epg to version 4.1<br/> 3. Include new gracenote2epg grabber v1.5.1"
CHANGELOG = "1. Update to latest git version d4dff154 as of October 7th 2025<br/>2. Update gracenote2epg grabber v1.6.0<br/>3. Update libhdhomerun v20250815"
HOMEPAGE = https://tvheadend.org/
LICENSE = GPL v3

Expand All @@ -54,4 +34,38 @@ SERVICE_PORT_TITLE = Tvheadend (HTTP)
# Admin link
ADMIN_PORT = ${SERVICE_PORT}

# PPC archs except qoriq are not supported
# https://tvheadend.org/issues/5060
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)
# ffmpeg7 requires c11 support
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS)

DEPENDS = cross/tvheadend
DEPENDS += cross/dtv-scan-tables
DEPENDS += cross/docker-tvheadend
DEPENDS += cross/zap2epg

OPTIONAL_DEPENDS += python/numpy
OPTIONAL_DEPENDS += python/pandas

WHEELS += src/requirements-pure.txt

include ../../mk/spksrc.common.mk

# Optional gracenote2epg dependencies
ifeq ($(call version_ge, $(TC_GCC), 8.5),1)
# [numpy]
DEPENDS += python/numpy

# [pandas]
DEPENDS += python/pandas
endif

# Export version to the build where version
# script gets patched accordingly by:
# 000-fix-version.patch from cross/tvheadend
export TVH_VERS

GCC_DEBUG_INFO := 1

include ../../mk/spksrc.python.mk
12 changes: 10 additions & 2 deletions spk/tvheadend/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
#certifi ==> python312
charset-normalizer==3.4.2
gracenote2epg==1.5.1
gracenote2epg==1.6.0
idna==3.10
langdetect==1.0.9
polib==1.2.0
requests==2.32.4
urllib3==2.5.0

# Additional wheels for gracenote2epg[full] >= 1.6.0
#numpy==2.2.6 # python/numpy
#pandas==2.3.2 # python/pandas
pgeocode==0.5.0
python-dateutil==2.9.0.post0
pytz==2025.2
tzdata==2025.2