Merge pull request #8314 from CvH/12.0/ffmpegx_up

Tvheadend updates and change to ffmpeg 6.0.x
This commit is contained in:
Matthias Reichl 2023-12-20 17:35:30 +01:00 committed by GitHub
commit 9874a2830b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 368 additions and 462 deletions

View File

@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2017-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="comskip" PKG_NAME="comskip"
PKG_VERSION="84fcd7388394c95fc8a7e558642bbadb43134507" PKG_VERSION="6e66de54358498aa276d233f5b3e7fa673526af1"
PKG_SHA256="4d45d30335ce1c28fb4de8865ada57f81de18d83a77950e9ab7c3ea26d24a883" PKG_SHA256="412f0cc543cbe327b36b0354c00ace260c996e95dd95cb585ca58dd52c926607"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.kaashoek.com/comskip/" PKG_SITE="http://www.kaashoek.com/comskip/"
PKG_URL="https://github.com/erikkaashoek/Comskip/archive/${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/erikkaashoek/Comskip/archive/${PKG_VERSION}.tar.gz"

View File

@ -1,12 +0,0 @@
diff --git a/mpeg2dec.c b/mpeg2dec.c
index 3013dc1..5b79227 100755
--- a/mpeg2dec.c
+++ b/mpeg2dec.c
@@ -161,7 +161,6 @@ int64_t pev_best_effort_timestamp = 0;
int video_stream_index = -1;
int audio_stream_index = -1;
-int width, height;
int have_frame_rate ;
int stream_index;

View File

@ -0,0 +1,58 @@
From 3f940e6f8e83fbb0cbbca6a4f55b506ccec8d3c4 Mon Sep 17 00:00:00 2001
From: bsperduto <brian.sperduto@gmail.com>
Date: Sun, 3 Dec 2023 08:50:41 -0600
Subject: [PATCH 1/2] Fix for deprecation of DECLARE_ALIGNED #164
---
comskip.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/comskip.c b/comskip.c
index 08ffd5e..e85f61a 100644
--- a/comskip.c
+++ b/comskip.c
@@ -733,9 +733,9 @@ int sceneChangePercent;
bool lastFrameWasBlack = false;
bool lastFrameWasSceneChange = false;
-#include <libavutil/avutil.h> // only for DECLARE_ALIGNED
-static DECLARE_ALIGNED(32, long, histogram)[256];
-static DECLARE_ALIGNED(32, long, lastHistogram)[256];
+
+static long histogram[256];
+static long lastHistogram[256];
#define MAXCSLENGTH 400*300
#define MAXCUTSCENES 8
@@ -10097,7 +10097,7 @@ void LoadCutScene(const char *filename)
#define OWN_HISTOGRAM_WIDTH 4
#define OWN_HISTOGRAM_HEIGHT 256
-static DECLARE_ALIGNED(32, int, own_histogram)[OWN_HISTOGRAM_WIDTH][OWN_HISTOGRAM_HEIGHT];
+static int own_histogram[OWN_HISTOGRAM_WIDTH][OWN_HISTOGRAM_HEIGHT];
int scan_step;
#define SCAN_MULTI
From eae0b430d7c9317333fb8759bd67369fd71a085a Mon Sep 17 00:00:00 2001
From: bsperduto <brian.sperduto@gmail.com>
Date: Sun, 10 Dec 2023 13:32:57 +0100
Subject: [PATCH 2/2] [PATCH] Update mpeg2dec.c
---
mpeg2dec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mpeg2dec.c b/mpeg2dec.c
index 626a991..bb2fa2b 100755
--- a/mpeg2dec.c
+++ b/mpeg2dec.c
@@ -349,7 +349,7 @@ static void signal_handler (int sig)
#define AUDIOBUFFER 1600000
static double base_apts = 0.0, apts, top_apts = 0.0;
-static DECLARE_ALIGNED(16, short, audio_buffer[AUDIOBUFFER]);
+static short audio_buffer[AUDIOBUFFER];
static short *audio_buffer_ptr = audio_buffer;
static int audio_samples = 0;
#define ISSAME(T1,T2) (fabs((T1) - (T2)) < 0.001)

View File

@ -1,9 +1,9 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="x264" PKG_NAME="x264"
PKG_VERSION="9c3c71688226fbb23f4d36399fab08f018e760b0" PKG_VERSION="a354f11f8f019a2a34ae7ef554ff07b31f0818f3"
PKG_SHA256="1b0e11f6ce9dc8c8da5e78006bd1a26dffe866d21f85d4305fd555f107d97b9a" PKG_SHA256="3f87b564f71e7fccf2b58c1bafcdb74b88ce2d57fff5cf870a5703fb33691d38"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.videolan.org/developers/x264.html" PKG_SITE="http://www.videolan.org/developers/x264.html"
PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.bz2" PKG_URL="https://code.videolan.org/videolan/x264/-/archive/${PKG_VERSION}/x264-${PKG_VERSION}.tar.bz2"

View File

@ -1,10 +1,10 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="ffmpegx" PKG_NAME="ffmpegx"
PKG_VERSION="4.4.3" PKG_VERSION="6.0.1"
PKG_SHA256="6c5b6c195e61534766a0b5fe16acc919170c883362612816d0a1c7f4f947006e" PKG_SHA256="9b16b8731d78e596b4be0d720428ca42df642bb2d78342881ff7f5bc29fc9623"
PKG_LICENSE="LGPLv2.1+" PKG_LICENSE="GPL-3.0-only"
PKG_SITE="https://ffmpeg.org" PKG_SITE="https://ffmpeg.org"
PKG_URL="https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz" PKG_URL="https://ffmpeg.org/releases/ffmpeg-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain aom bzip2 openssl lame libvorbis opus x264 zlib" PKG_DEPENDS_TARGET="toolchain aom bzip2 openssl lame libvorbis opus x264 zlib"
@ -64,9 +64,9 @@ pre_configure_target() {
PKG_FFMPEG_X26x_GENERIC="\ PKG_FFMPEG_X26x_GENERIC="\
--enable-libx264 \ --enable-libx264 \
--enable-encoder=x264 \ --enable-encoder=libx264 \
--enable-libx265 \ --enable-libx265 \
--enable-encoder=x265" --enable-encoder=libx265"
fi fi
# Encoders # Encoders
@ -134,7 +134,6 @@ configure_target() {
${PKG_FFMPEG_ENCODERS} \ ${PKG_FFMPEG_ENCODERS} \
\ \
`#General options` \ `#General options` \
--enable-avresample \
--disable-lzma \ --disable-lzma \
--disable-alsa \ --disable-alsa \
${PKG_FFMPEG_X11_GRAB} \ ${PKG_FFMPEG_X11_GRAB} \

View File

@ -1,44 +0,0 @@
From 1d23e125b6f76e74b754560c3b6931507cacddce Mon Sep 17 00:00:00 2001
From: Timo Rothenpieler <timo@rothenpieler.org>
Date: Tue, 7 Sep 2021 19:35:31 +0200
Subject: [PATCH] configure: account for openssl3 license change
---
configure | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index c87a010387..ed7345b2c1 100755
--- a/configure
+++ b/configure
@@ -1765,7 +1765,6 @@ EXTERNAL_LIBRARY_GPL_LIST="
EXTERNAL_LIBRARY_NONFREE_LIST="
decklink
libfdk_aac
- openssl
libtls
"
@@ -1857,6 +1856,7 @@ EXTERNAL_LIBRARY_LIST="
mediacodec
openal
opengl
+ openssl
pocketsphinx
vapoursynth
"
@@ -6572,7 +6572,10 @@ enabled omx_rpi && { test_code cc OMX_Core.h OMX_IndexConfigBrcmVideoR
die "ERROR: OpenMAX IL headers from raspberrypi/firmware not found"; } &&
enable omx
enabled omx && require_headers OMX_Core.h
-enabled openssl && { check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
+enabled openssl && { { check_pkg_config openssl "openssl >= 3.0.0" openssl/ssl.h OPENSSL_init_ssl &&
+ { enabled gplv3 || ! enabled gpl || enabled nonfree || die "ERROR: OpenSSL >=3.0.0 requires --enable-version3"; }; } ||
+ { enabled gpl && ! enabled nonfree && die "ERROR: OpenSSL <3.0.0 is incompatible with the gpl"; } ||
+ check_pkg_config openssl openssl openssl/ssl.h OPENSSL_init_ssl ||
check_pkg_config openssl openssl openssl/ssl.h SSL_library_init ||
check_lib openssl openssl/ssl.h OPENSSL_init_ssl -lssl -lcrypto ||
check_lib openssl openssl/ssl.h SSL_library_init -lssl -lcrypto ||
--
2.34.1

View File

@ -1,84 +0,0 @@
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sun, 16 Jul 2023 18:18:02 +0300
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
instructions within inline assembly
Fixes assembling with binutils as >= 2.41
Upstream: http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=effadce6c756247ea8bae32dc13bb3e6f464f0eb
Bug reports for this change in binutils:
https://fftrac-bg.ffmpeg.org/ticket/10405
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108941
https://sourceware.org/bugzilla/show_bug.cgi?id=30578
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)
diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 6298f5ed19..ca7e2dffc1 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
+ if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
);
+ else
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
+ );
return rt;
}
@@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}
--
2.30.2

View File

@ -10,7 +10,7 @@ PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.tvheadend.org" PKG_SITE="http://www.tvheadend.org"
PKG_URL="https://github.com/tvheadend/tvheadend/archive/${PKG_VERSION}.tar.gz" PKG_URL="https://github.com/tvheadend/tvheadend/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain avahi comskip curl dvb-apps ffmpegx libdvbcsa libhdhomerun \ PKG_DEPENDS_TARGET="toolchain avahi comskip curl dvb-apps libdvbcsa libhdhomerun \
libiconv openssl pngquant:host Python3:host dtv-scan-tables" libiconv openssl pngquant:host Python3:host dtv-scan-tables"
PKG_DEPENDS_CONFIG="ffmpegx" PKG_DEPENDS_CONFIG="ffmpegx"
PKG_SECTION="service" PKG_SECTION="service"
@ -33,20 +33,20 @@ PKG_TVH_TRANSCODING="\
--disable-libvpx_static \ --disable-libvpx_static \
--disable-libx264_static \ --disable-libx264_static \
--disable-libx265_static \ --disable-libx265_static \
--enable-libav \ --disable-libav \
--enable-libfdkaac \ --disable-libfdkaac \
--enable-libopus \ --disable-libopus \
--enable-libvorbis \ --disable-libvorbis \
--enable-libx264" --disable-libx264"
# hw specific transcoding options # hw specific transcoding options
if [ "${TARGET_ARCH}" = "x86_64" ]; then if [ "${TARGET_ARCH}" = "x86_64" ]; then
PKG_DEPENDS_TARGET+=" libva" PKG_DEPENDS_TARGET+=" libva"
# specific transcoding options # specific transcoding options
PKG_TVH_TRANSCODING="${PKG_TVH_TRANSCODING} \ PKG_TVH_TRANSCODING="${PKG_TVH_TRANSCODING} \
--enable-vaapi \ --disable-vaapi \
--enable-libvpx \ --disable-libvpx \
--enable-libx265" --disable-libx265"
else else
# for != "x86_64" targets # for != "x86_64" targets
# specific transcoding options # specific transcoding options

View File

@ -1,6 +1,6 @@
--- a/src/input/mpegts/scanfile.c --- a/src/input/mpegts/scanfile.c
+++ b/src/input/mpegts/scanfile.c +++ b/src/input/mpegts/scanfile.c
@@ -903,7 +903,7 @@ scanfile_init ( const char *muxconf_path, int lock ) @@ -906,7 +906,7 @@ scanfile_init ( const char *muxconf_path
#elif defined(PLATFORM_FREEBSD) #elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables"; path = "/usr/local/share/dtv-scan-tables";
#else #else

View File

@ -2,7 +2,7 @@ fix libhdhomerun includes
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -362,7 +362,7 @@ if enabled hdhomerun_static; then @@ -394,7 +394,7 @@ if enabled hdhomerun_static; then
else else
if enabled_or_auto hdhomerun_client; then if enabled_or_auto hdhomerun_client; then

View File

@ -11,13 +11,11 @@ causing an FTBFS. Instead, recognize both the old and new symbols.
src/input/mpegts/tvhdhomerun/tvhdhomerun.c | 3 ++- src/input/mpegts/tvhdhomerun/tvhdhomerun.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
index 58dec51ab3..18068faf5d 100644
--- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c --- a/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
+++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c +++ b/src/input/mpegts/tvhdhomerun/tvhdhomerun.c
@@ -32,7 +32,8 @@ @@ -28,7 +28,8 @@
#include <arpa/inet.h>
#include "config.h" #include <openssl/sha.h>
-#ifdef HDHOMERUN_TAG_DEVICE_AUTH_BIN -#ifdef HDHOMERUN_TAG_DEVICE_AUTH_BIN
+#if defined(HDHOMERUN_TAG_DEVICE_AUTH_BIN) \ +#if defined(HDHOMERUN_TAG_DEVICE_AUTH_BIN) \

View File

@ -9,11 +9,9 @@ Subject: [PATCH] Fix building with -fno-common (default from GCC 10)
src/input/mpegts.h | 2 +- src/input/mpegts.h | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-) 3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/input.h b/src/input.h
index a9c96df048..3dce355c6a 100644
--- a/src/input.h --- a/src/input.h
+++ b/src/input.h +++ b/src/input.h
@@ -133,8 +133,8 @@ void tvh_hardware_delete ( tvh_hardware_t *th ); @@ -128,8 +128,8 @@ void tvh_hardware_delete ( tvh_hardware_
extern const idclass_t tvh_input_class; extern const idclass_t tvh_input_class;
extern const idclass_t tvh_input_instance_class; extern const idclass_t tvh_input_instance_class;
@ -24,8 +22,6 @@ index a9c96df048..3dce355c6a 100644
#define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link) #define TVH_INPUT_FOREACH(x) LIST_FOREACH(x, &tvh_inputs, ti_link)
#define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link) #define TVH_HARDWARE_FOREACH(x) LIST_FOREACH(x, &tvh_hardware, th_link)
diff --git a/src/input/mpegts.c b/src/input/mpegts.c
index e02d491f19..fca4f34296 100644
--- a/src/input/mpegts.c --- a/src/input/mpegts.c
+++ b/src/input/mpegts.c +++ b/src/input/mpegts.c
@@ -20,6 +20,8 @@ @@ -20,6 +20,8 @@
@ -37,11 +33,9 @@ index e02d491f19..fca4f34296 100644
extern memoryinfo_t mpegts_input_queue_memoryinfo; extern memoryinfo_t mpegts_input_queue_memoryinfo;
extern memoryinfo_t mpegts_input_table_memoryinfo; extern memoryinfo_t mpegts_input_table_memoryinfo;
diff --git a/src/input/mpegts.h b/src/input/mpegts.h
index 9dda3bacaa..9c4c57b73b 100644
--- a/src/input/mpegts.h --- a/src/input/mpegts.h
+++ b/src/input/mpegts.h +++ b/src/input/mpegts.h
@@ -1149,7 +1149,7 @@ typedef struct mpegts_listener @@ -1132,7 +1132,7 @@ typedef struct mpegts_listener
void (*ml_mux_delete) (mpegts_mux_t *mm, void *p); void (*ml_mux_delete) (mpegts_mux_t *mm, void *p);
} mpegts_listener_t; } mpegts_listener_t;

View File

@ -21,7 +21,6 @@ https://github.com/tvheadend/tvheadend/commit/ce09077056f9c6558c188d135cec3be85c
} }
function playProgram() { function playProgram() {
--- a/src/webui/static/app/dvr.js --- a/src/webui/static/app/dvr.js
+++ b/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js
@@ -87,13 +87,11 @@ tvheadend.dvrDetails = function(uuid) { @@ -87,13 +87,11 @@ tvheadend.dvrDetails = function(uuid) {

View File

@ -8,11 +8,9 @@ Subject: [PATCH] SAT>IP client: UPnP header field names are case insensitive
src/input/mpegts/satip/satip.c | 14 +++++++------- src/input/mpegts/satip/satip.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-) 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/input/mpegts/satip/satip.c b/src/input/mpegts/satip/satip.c
index 4d522e19c4..58e91d30bb 100644
--- a/src/input/mpegts/satip/satip.c --- a/src/input/mpegts/satip/satip.c
+++ b/src/input/mpegts/satip/satip.c +++ b/src/input/mpegts/satip/satip.c
@@ -1175,19 +1175,19 @@ satip_discovery_service_received @@ -1125,19 +1125,19 @@ satip_discovery_service_received
if (ptr == NULL) if (ptr == NULL)
break; break;
if (http_tokenize(ptr, argv, 2, ':') == 2) { if (http_tokenize(ptr, argv, 2, ':') == 2) {

View File

@ -1,83 +1,83 @@
; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip ; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip
edl_mode=3 ; the mode specified in the generated edl file, 0=cut, 3=commercial break edl_mode=3 ; the mode specified in the generated edl file, 0=cut, 3=commercial break
mkv_time_offset=30.0 ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug mkv_time_offset=30.0 ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug
always_keep_first_seconds=2 ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance always_keep_first_seconds=2 ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance
detect_method=43 ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all detect_method=43 ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all
validate_silence=1 ; Default, set to 0 to force using this clues if selected above. validate_silence=1 ; Default, set to 0 to force using this clues if selected above.
validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above. validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above.
validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above. validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above.
verbose=10 ; show a lot of extra info, level 5 is also OK, set to 0 to disable verbose=10 ; show a lot of extra info, level 5 is also OK, set to 0 to disable
max_brightness=60 ; frame not black if any pixels checked are greater than this (scale 0 to 255) max_brightness=60 ; frame not black if any pixels checked are greater than this (scale 0 to 255)
test_brightness=40 ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255) test_brightness=40 ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255)
max_avg_brightness=25 ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting max_avg_brightness=25 ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting
max_commercialbreak=600 ; maximum length in seconds to consider a segment a commercial break max_commercialbreak=600 ; maximum length in seconds to consider a segment a commercial break
min_commercialbreak=25 ; minimum length in seconds to consider a segment a commercial break min_commercialbreak=25 ; minimum length in seconds to consider a segment a commercial break
max_commercial_size=125 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between max_commercial_size=125 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between
min_commercial_size=4 ; mimimum time in seconds for a single commercial min_commercial_size=4 ; mimimum time in seconds for a single commercial
min_show_segment_length=250 ; any segment longer than this will be scored towards show. min_show_segment_length=250 ; any segment longer than this will be scored towards show.
non_uniformity=500 ; Set to 0 to disable cutpoints based on uniform frames non_uniformity=500 ; Set to 0 to disable cutpoints based on uniform frames
max_volume=500 ; any frame with sound volume larger than this will not be regarded as black frame max_volume=500 ; any frame with sound volume larger than this will not be regarded as black frame
min_silence=12 ; Any deep silence longer than this amount of frames is a possible cutpoint min_silence=12 ; Any deep silence longer than this amount of frames is a possible cutpoint
ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing
logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting
punish=0 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable punish=0 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable
punish_threshold=1.3 ; Multiply when amount is above average * punish_threshold punish_threshold=1.3 ; Multiply when amount is above average * punish_threshold
punish_modifier=2 ; When above average * threshold multiply score by this value punish_modifier=2 ; When above average * threshold multiply score by this value
intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA
logo_percentile=0.92 ; if more then this amount of logo is found then logo detection will be disabled logo_percentile=0.92 ; if more then this amount of logo is found then logo detection will be disabled
logo_threshold=0.75 logo_threshold=0.75
punish_no_logo=1 ; Default, set to 0 to avoid show segments without logo to be scored towards commercial punish_no_logo=1 ; Default, set to 0 to avoid show segments without logo to be scored towards commercial
aggressive_logo_rejection=0 aggressive_logo_rejection=0
connect_blocks_with_logo=1 ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable connect_blocks_with_logo=1 ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable
logo_filter=0 ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value. logo_filter=0 ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value.
cut_on_ar_change=1 ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable cut_on_ar_change=1 ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable
delete_show_after_last_commercial=0 ; set to 1 if you want to delete the last block if its a show and after a commercial delete_show_after_last_commercial=0 ; set to 1 if you want to delete the last block if its a show and after a commercial
delete_show_before_or_after_current=0 ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show delete_show_before_or_after_current=0 ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show
delete_block_after_commercial=0 ; set to max size of block in seconds to be discarded, set to 0 to disable delete_block_after_commercial=0 ; set to max size of block in seconds to be discarded, set to 0 to disable
remove_before=0 ; amount of seconds of show to be removed before ALL commercials remove_before=0 ; amount of seconds of show to be removed before ALL commercials
remove_after=0 ; amount of seconds of show to be removed after ALL commercials remove_after=0 ; amount of seconds of show to be removed after ALL commercials
shrink_logo=5 ; Reduce the duration of the logo with this amount of seconds shrink_logo=5 ; Reduce the duration of the logo with this amount of seconds
after_logo=0 ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint after_logo=0 ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint
padding=0 padding=0
ms_audio_delay=5 ms_audio_delay=5
volume_slip=40 volume_slip=40
skip_b_frames=0 ; Set to 1 to force Comskip to skip frames for higher processing speed. skip_b_frames=0 ; Set to 1 to force Comskip to skip frames for higher processing speed.
hardware_decode=0 ; Set to 1 to enable hardware accelerated video decoding, only available in donator version hardware_decode=0 ; Set to 1 to enable hardware accelerated video decoding, only available in donator version
max_repair_size=200 ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS. max_repair_size=200 ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS.
disable_heuristics=4 ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255 disables all heuristics disable_heuristics=4 ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255 disables all heuristics
delete_logo_file=0 ; set to 1 if you want comskip to tidy up after finishing delete_logo_file=0 ; set to 1 if you want comskip to tidy up after finishing
output_framearray=0 ; create a big excel file for detailed analysis, set to 0 to disable output_framearray=0 ; create a big excel file for detailed analysis, set to 0 to disable
output_data=0 ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding output_data=0 ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding
output_videoredo=0 ; The old videoredo format output_videoredo=0 ; The old videoredo format
output_videoredo3=0 ; The new videoredo v3 format. output_videoredo3=0 ; The new videoredo v3 format.
output_womble=0 output_womble=0
output_mls=0 ; set to 1 if you want MPeg Video Wizard bookmark file output output_mls=0 ; set to 1 if you want MPeg Video Wizard bookmark file output
output_cuttermaran=0 output_cuttermaran=0
output_mpeg2schnitt=0 output_mpeg2schnitt=0
output_mpgtx=0 output_mpgtx=0
output_dvrcut=0 output_dvrcut=0
output_zoomplayer_chapter=0 output_zoomplayer_chapter=0
output_zoomplayer_cutlist=0 output_zoomplayer_cutlist=0
output_edl=1 output_edl=1
output_dvrmstb=0 ; Set to 1 if you're running DVRMS-Toolbox output_dvrmstb=0 ; Set to 1 if you're running DVRMS-Toolbox
output_edlx=0 output_edlx=0
output_vcf=0 output_vcf=0
output_bsplayer=0 output_bsplayer=0
output_btv=0 ; set to 1 if you want Beyond TV chapter cutlist output output_btv=0 ; set to 1 if you want Beyond TV chapter cutlist output
output_projectx=0 ; set to 1 if you want ProjectX cutlist output (Xcl) output_projectx=0 ; set to 1 if you want ProjectX cutlist output (Xcl)
output_avisynth=0 output_avisynth=0
output_vdr=1 ; set to 1 if you want Kodi to skipping commercials output_vdr=1 ; set to 1 if you want Kodi to skipping commercials
output_demux=0 ; set to 1 if you want comskip to demux the mpeg file while scanning output_demux=0 ; set to 1 if you want comskip to demux the mpeg file while scanning
sage_framenumber_bug=0 sage_framenumber_bug=0
sage_minute_bug=0 sage_minute_bug=0
live_tv=0 ; set to 1 if you use parallelprocessing and need the output while recording live_tv=0 ; set to 1 if you use parallelprocessing and need the output while recording
live_tv_retries=4 ; change to 16 when using live_tv in BTV, used for mpeg PS and TS live_tv_retries=4 ; change to 16 when using live_tv in BTV, used for mpeg PS and TS
dvrms_live_tv_retries=300 ; only used for dvr_ms dvrms_live_tv_retries=300 ; only used for dvr_ms
standoff=0 ; change to 8000000 when using live_tv in BTV standoff=0 ; change to 8000000 when using live_tv in BTV
cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\"" cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\""
mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1" mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n" avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" " dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
windowtitle="Comskip - %s" windowtitle="Comskip - %s"

View File

@ -1,56 +1,56 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import os import os
import shutil import shutil
import urllib.request import urllib.request
import subprocess import subprocess
import re import re
import xbmc, xbmcvfs, xbmcgui, xbmcaddon import xbmc, xbmcvfs, xbmcgui, xbmcaddon
ADDON_NAME = xbmcaddon.Addon().getAddonInfo("name") ADDON_NAME = xbmcaddon.Addon().getAddonInfo("name")
LS = xbmcaddon.Addon().getLocalizedString LS = xbmcaddon.Addon().getLocalizedString
def clear_directory(directory): def clear_directory(directory):
try: try:
for file_name in os.listdir(directory): for file_name in os.listdir(directory):
file_path = os.path.join(directory, file_name) file_path = os.path.join(directory, file_name)
if os.path.isfile(file_path): if os.path.isfile(file_path):
os.unlink(file_path) os.unlink(file_path)
elif os.path.isdir(file_path): elif os.path.isdir(file_path):
shutil.rmtree(file_path) shutil.rmtree(file_path)
except Exception as e: except Exception as e:
xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_INFO)
exit(1) exit(1)
def download_and_extract(url, destination, extract_path): def download_and_extract(url, destination, extract_path):
try: try:
# Download the file # Download the file
urllib.request.urlretrieve(url, destination) urllib.request.urlretrieve(url, destination)
# Extract the file to the specified directory, ignoring the root path # Extract the file to the specified directory, ignoring the root path
subprocess.run(["tar", "xf", destination, "--strip-components=3", "-C", extract_path]) subprocess.run(["tar", "xf", destination, "--strip-components=3", "-C", extract_path])
except Exception as e: except Exception as e:
xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_INFO)
exit(1) exit(1)
if __name__ == "__main__": if __name__ == "__main__":
scan_tables_path = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo("path")), "dvb-scan") scan_tables_path = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo("path")), "dvb-scan")
download_url = "https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-LATEST.tar.bz2" download_url = "https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-LATEST.tar.bz2"
downloaded_file_path = "/tmp/dtv-scan-tables-LATEST.tar.bz2" downloaded_file_path = "/tmp/dtv-scan-tables-LATEST.tar.bz2"
# Clear the contents of the dvb_scan directory # Clear the contents of the dvb_scan directory
clear_directory(scan_tables_path) clear_directory(scan_tables_path)
# Download and extract the file using subprocess # Download and extract the file using subprocess
download_and_extract(download_url, downloaded_file_path, scan_tables_path) download_and_extract(download_url, downloaded_file_path, scan_tables_path)
# Clean up the downloaded file # Clean up the downloaded file
os.remove(downloaded_file_path) os.remove(downloaded_file_path)
# Notify download complete # Notify download complete
xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)

View File

@ -2,9 +2,9 @@
# Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2016-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="tvheadend43" PKG_NAME="tvheadend43"
PKG_VERSION="905b4f0d0387818cbbf7012bf4dffb25e9893748" PKG_VERSION="3dcb7ecf36666dcb43211a84141b1b645c9ca757"
PKG_SHA256="3decc29681e7eefac7a734116078b6f36fa125d81c8b9c9998b96070fcbe53a0" PKG_SHA256="c7c8414bca5304276cc8f07aa291e36b50e1190d441f2af2ce256631b7c033c2"
PKG_VERSION_NUMBER="4.3-2091" PKG_VERSION_NUMBER="4.3-2180"
PKG_REV="0" PKG_REV="0"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -1,6 +1,6 @@
--- a/src/input/mpegts/scanfile.c --- a/src/input/mpegts/scanfile.c
+++ b/src/input/mpegts/scanfile.c +++ b/src/input/mpegts/scanfile.c
@@ -921,7 +921,7 @@ scanfile_init ( const char *muxconf_path @@ -922,7 +922,7 @@ scanfile_init ( const char *muxconf_path
#elif defined(PLATFORM_FREEBSD) #elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables"; path = "/usr/local/share/dtv-scan-tables";
#else #else

View File

@ -2,7 +2,7 @@ fix libhdhomerun includes
--- a/configure --- a/configure
+++ b/configure +++ b/configure
@@ -419,7 +419,7 @@ if enabled hdhomerun_static; then @@ -481,7 +481,7 @@ if enabled hdhomerun_static; then
else else
if enabled_or_auto hdhomerun_client; then if enabled_or_auto hdhomerun_client; then

View File

@ -1,83 +1,83 @@
; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip ; See comskip.txt in the distribution zip file for many settable parameters, read manual.html, tuning.html and debugwindow.html for how to tune and debug comskip
edl_mode=3 ; the mode specified in the generated edl file, 0=cut, 3=commercial break edl_mode=3 ; the mode specified in the generated edl file, 0=cut, 3=commercial break
mkv_time_offset=30.0 ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug mkv_time_offset=30.0 ; offset in seconds, to work around what appears to be an Kodi or ffmpeg bug
always_keep_first_seconds=2 ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance always_keep_first_seconds=2 ; Kodi has a bug that causes a segfault if we don't keep the start of the stream, I'll fix that when I get a chance
detect_method=43 ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all detect_method=43 ; 1=black frame, 2=logo, 4=scene change, 8=fuzzy logic, 16=closed captions, 32=aspect ration, 64=silence, 128=cutscenes, 255=all
validate_silence=1 ; Default, set to 0 to force using this clues if selected above. validate_silence=1 ; Default, set to 0 to force using this clues if selected above.
validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above. validate_uniform=1 ; Default, set to 0 to force using this clues (like pure white frames) if blackframe is selected above.
validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above. validate_scenechange=1 ; Default, set to 0 to force using this clues if selected above.
verbose=10 ; show a lot of extra info, level 5 is also OK, set to 0 to disable verbose=10 ; show a lot of extra info, level 5 is also OK, set to 0 to disable
max_brightness=60 ; frame not black if any pixels checked are greater than this (scale 0 to 255) max_brightness=60 ; frame not black if any pixels checked are greater than this (scale 0 to 255)
test_brightness=40 ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255) test_brightness=40 ; frame not pure black if any pixels checked are greater than this, will check average brightness (scale 0 to 255)
max_avg_brightness=25 ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting max_avg_brightness=25 ; maximum average brightness for a dim frame to be considered black (scale 0 to 255) 0 means autosetting
max_commercialbreak=600 ; maximum length in seconds to consider a segment a commercial break max_commercialbreak=600 ; maximum length in seconds to consider a segment a commercial break
min_commercialbreak=25 ; minimum length in seconds to consider a segment a commercial break min_commercialbreak=25 ; minimum length in seconds to consider a segment a commercial break
max_commercial_size=125 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between max_commercial_size=125 ; maximum time in seconds for a single commercial or multiple commercials if no breaks in between
min_commercial_size=4 ; mimimum time in seconds for a single commercial min_commercial_size=4 ; mimimum time in seconds for a single commercial
min_show_segment_length=250 ; any segment longer than this will be scored towards show. min_show_segment_length=250 ; any segment longer than this will be scored towards show.
non_uniformity=500 ; Set to 0 to disable cutpoints based on uniform frames non_uniformity=500 ; Set to 0 to disable cutpoints based on uniform frames
max_volume=500 ; any frame with sound volume larger than this will not be regarded as black frame max_volume=500 ; any frame with sound volume larger than this will not be regarded as black frame
min_silence=12 ; Any deep silence longer than this amount of frames is a possible cutpoint min_silence=12 ; Any deep silence longer than this amount of frames is a possible cutpoint
ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing ticker_tape=0 ; Amount of pixels from bottom to ignore in all processing
logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting logo_at_bottom=0 ; Set to 1 to search only for logo at the lower half of the video, do not combine with subtitle setting
punish=0 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable punish=0 ; Compare to average for sum of 1=brightness, 2=uniform 4=volume, 8=silence, 16=schange, set to 0 to disable
punish_threshold=1.3 ; Multiply when amount is above average * punish_threshold punish_threshold=1.3 ; Multiply when amount is above average * punish_threshold
punish_modifier=2 ; When above average * threshold multiply score by this value punish_modifier=2 ; When above average * threshold multiply score by this value
intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA intelligent_brightness=0 ; Set to 1 to use a USA specific algorithm to tune some of the settings, not adviced outside the USA
logo_percentile=0.92 ; if more then this amount of logo is found then logo detection will be disabled logo_percentile=0.92 ; if more then this amount of logo is found then logo detection will be disabled
logo_threshold=0.75 logo_threshold=0.75
punish_no_logo=1 ; Default, set to 0 to avoid show segments without logo to be scored towards commercial punish_no_logo=1 ; Default, set to 0 to avoid show segments without logo to be scored towards commercial
aggressive_logo_rejection=0 aggressive_logo_rejection=0
connect_blocks_with_logo=1 ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable connect_blocks_with_logo=1 ; set to 1 if you want successive blocks with logo on the transition to be regarded as connected, set to 0 to disable
logo_filter=0 ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value. logo_filter=0 ; set the size of the filter to apply to bad logo detection, 4 seems to be a good value.
cut_on_ar_change=1 ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable cut_on_ar_change=1 ; set to 1 if you want to cut also on aspect ratio changes when logo is present, set to 2 to force cuts on aspect ratio changes. set to 0 to disable
delete_show_after_last_commercial=0 ; set to 1 if you want to delete the last block if its a show and after a commercial delete_show_after_last_commercial=0 ; set to 1 if you want to delete the last block if its a show and after a commercial
delete_show_before_or_after_current=0 ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show delete_show_before_or_after_current=0 ; set to 1 if you want to delete the previous and the next show in the recording, this can lead to the deletion of trailers of next show
delete_block_after_commercial=0 ; set to max size of block in seconds to be discarded, set to 0 to disable delete_block_after_commercial=0 ; set to max size of block in seconds to be discarded, set to 0 to disable
remove_before=0 ; amount of seconds of show to be removed before ALL commercials remove_before=0 ; amount of seconds of show to be removed before ALL commercials
remove_after=0 ; amount of seconds of show to be removed after ALL commercials remove_after=0 ; amount of seconds of show to be removed after ALL commercials
shrink_logo=5 ; Reduce the duration of the logo with this amount of seconds shrink_logo=5 ; Reduce the duration of the logo with this amount of seconds
after_logo=0 ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint after_logo=0 ; set to number of seconds after logo disappears comskip should start to search for silence to insert an additional cutpoint
padding=0 padding=0
ms_audio_delay=5 ms_audio_delay=5
volume_slip=40 volume_slip=40
skip_b_frames=0 ; Set to 1 to force Comskip to skip frames for higher processing speed. skip_b_frames=0 ; Set to 1 to force Comskip to skip frames for higher processing speed.
hardware_decode=0 ; Set to 1 to enable hardware accelerated video decoding, only available in donator version hardware_decode=0 ; Set to 1 to enable hardware accelerated video decoding, only available in donator version
max_repair_size=200 ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS. max_repair_size=200 ; Will repair maximum 200 missing MPEG frames in the timeline, set to 0 to disable repairing for players that don't use PTS.
disable_heuristics=4 ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255 disables all heuristics disable_heuristics=4 ; bit pattern for disabling heuristics, adding 1 disables heristics 1, adding 2 disables heristics 2, adding 4 disables heristics 3, 255 disables all heuristics
delete_logo_file=0 ; set to 1 if you want comskip to tidy up after finishing delete_logo_file=0 ; set to 1 if you want comskip to tidy up after finishing
output_framearray=0 ; create a big excel file for detailed analysis, set to 0 to disable output_framearray=0 ; create a big excel file for detailed analysis, set to 0 to disable
output_data=0 ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding output_data=0 ; create a dump of the user data channel, used for CC and XDS (such as V-Chip info). Can be use together with output_framearray to remote debug CC decoding
output_videoredo=0 ; The old videoredo format output_videoredo=0 ; The old videoredo format
output_videoredo3=0 ; The new videoredo v3 format. output_videoredo3=0 ; The new videoredo v3 format.
output_womble=0 output_womble=0
output_mls=0 ; set to 1 if you want MPeg Video Wizard bookmark file output output_mls=0 ; set to 1 if you want MPeg Video Wizard bookmark file output
output_cuttermaran=0 output_cuttermaran=0
output_mpeg2schnitt=0 output_mpeg2schnitt=0
output_mpgtx=0 output_mpgtx=0
output_dvrcut=0 output_dvrcut=0
output_zoomplayer_chapter=0 output_zoomplayer_chapter=0
output_zoomplayer_cutlist=0 output_zoomplayer_cutlist=0
output_edl=1 output_edl=1
output_dvrmstb=0 ; Set to 1 if you're running DVRMS-Toolbox output_dvrmstb=0 ; Set to 1 if you're running DVRMS-Toolbox
output_edlx=0 output_edlx=0
output_vcf=0 output_vcf=0
output_bsplayer=0 output_bsplayer=0
output_btv=0 ; set to 1 if you want Beyond TV chapter cutlist output output_btv=0 ; set to 1 if you want Beyond TV chapter cutlist output
output_projectx=0 ; set to 1 if you want ProjectX cutlist output (Xcl) output_projectx=0 ; set to 1 if you want ProjectX cutlist output (Xcl)
output_avisynth=0 output_avisynth=0
output_vdr=1 ; set to 1 if you want Kodi to skipping commercials output_vdr=1 ; set to 1 if you want Kodi to skipping commercials
output_demux=0 ; set to 1 if you want comskip to demux the mpeg file while scanning output_demux=0 ; set to 1 if you want comskip to demux the mpeg file while scanning
sage_framenumber_bug=0 sage_framenumber_bug=0
sage_minute_bug=0 sage_minute_bug=0
live_tv=0 ; set to 1 if you use parallelprocessing and need the output while recording live_tv=0 ; set to 1 if you use parallelprocessing and need the output while recording
live_tv_retries=4 ; change to 16 when using live_tv in BTV, used for mpeg PS and TS live_tv_retries=4 ; change to 16 when using live_tv in BTV, used for mpeg PS and TS
dvrms_live_tv_retries=300 ; only used for dvr_ms dvrms_live_tv_retries=300 ; only used for dvr_ms
standoff=0 ; change to 8000000 when using live_tv in BTV standoff=0 ; change to 8000000 when using live_tv in BTV
cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\"" cuttermaran_options="cut=\"true\" unattended=\"true\" muxResult=\"false\" snapToCutPoints=\"true\" closeApp=\"true\""
mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1" mpeg2schnitt_options="mpeg2schnitt.exe /S /E /R25 /Z %2 %1"
avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n" avisynth_options="LoadPlugin(\"MPEG2Dec3.dll\") \nMPEG2Source(\"%s\")\n"
dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" " dvrcut_options="dvrcut \"%s.dvr-ms\" \"%s_clean.dvr-ms\" "
windowtitle="Comskip - %s" windowtitle="Comskip - %s"

View File

@ -1,56 +1,56 @@
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv) # Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
import os import os
import shutil import shutil
import urllib.request import urllib.request
import subprocess import subprocess
import re import re
import xbmc, xbmcvfs, xbmcgui, xbmcaddon import xbmc, xbmcvfs, xbmcgui, xbmcaddon
ADDON_NAME = xbmcaddon.Addon().getAddonInfo("name") ADDON_NAME = xbmcaddon.Addon().getAddonInfo("name")
LS = xbmcaddon.Addon().getLocalizedString LS = xbmcaddon.Addon().getLocalizedString
def clear_directory(directory): def clear_directory(directory):
try: try:
for file_name in os.listdir(directory): for file_name in os.listdir(directory):
file_path = os.path.join(directory, file_name) file_path = os.path.join(directory, file_name)
if os.path.isfile(file_path): if os.path.isfile(file_path):
os.unlink(file_path) os.unlink(file_path)
elif os.path.isdir(file_path): elif os.path.isdir(file_path):
shutil.rmtree(file_path) shutil.rmtree(file_path)
except Exception as e: except Exception as e:
xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30041), xbmcgui.NOTIFICATION_INFO)
exit(1) exit(1)
def download_and_extract(url, destination, extract_path): def download_and_extract(url, destination, extract_path):
try: try:
# Download the file # Download the file
urllib.request.urlretrieve(url, destination) urllib.request.urlretrieve(url, destination)
# Extract the file to the specified directory, ignoring the root path # Extract the file to the specified directory, ignoring the root path
subprocess.run(["tar", "xf", destination, "--strip-components=3", "-C", extract_path]) subprocess.run(["tar", "xf", destination, "--strip-components=3", "-C", extract_path])
except Exception as e: except Exception as e:
xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30040), xbmcgui.NOTIFICATION_INFO)
exit(1) exit(1)
if __name__ == "__main__": if __name__ == "__main__":
scan_tables_path = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo("path")), "dvb-scan") scan_tables_path = os.path.join(xbmcvfs.translatePath(xbmcaddon.Addon().getAddonInfo("path")), "dvb-scan")
download_url = "https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-LATEST.tar.bz2" download_url = "https://linuxtv.org/downloads/dtv-scan-tables/dtv-scan-tables-LATEST.tar.bz2"
downloaded_file_path = "/tmp/dtv-scan-tables-LATEST.tar.bz2" downloaded_file_path = "/tmp/dtv-scan-tables-LATEST.tar.bz2"
# Clear the contents of the dvb_scan directory # Clear the contents of the dvb_scan directory
clear_directory(scan_tables_path) clear_directory(scan_tables_path)
# Download and extract the file using subprocess # Download and extract the file using subprocess
download_and_extract(download_url, downloaded_file_path, scan_tables_path) download_and_extract(download_url, downloaded_file_path, scan_tables_path)
# Clean up the downloaded file # Clean up the downloaded file
os.remove(downloaded_file_path) os.remove(downloaded_file_path)
# Notify download complete # Notify download complete
xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO) xbmcgui.Dialog().notification(ADDON_NAME, LS(30039), xbmcgui.NOTIFICATION_INFO)