2020-11-10, 08:11 AM
I made some headway here and thought I'd share. I have a pretty decent volume of saved recordings, many of which have old comskip files from many versions ago. I don't know if I'm saying this right, but as I understand it they trip up Kodi/knewc due to the edl_skip_field setting. It defaults to 0=cut and you will not be able to play portions of the video marked as commercials. Setting it to a value = 3 will allow playback of the commercial marked portions.
Anywho, my solution was to re-run comskip on all of these recordings so I started a bash script to handle it in bulk in Linux. I'm far from a bash guru but was able to piece together some code with a lot of help from other forums and Martin's PostProcessing.sh example. Here it is:
Just paste the code into your favorite text editor and change <username> to your user, or modify the path completely if you installed Comskip elsewhere. Save the contents to your ~/bin folder and don't forget to chmod +x to make it executable. If you haven't already you might want to make sure you've set edl_skip_field = 3 in your comskip.ini, or add that line to the end of the ini file if needed.
Change the nice value if you like. I have a new server with a 6-core 3.6GHz CPU and I was running two instances of the script (in two separate folders) with nice @ "2" and each instance was showing about 240% utilization in System Monitor. It was processing 1 hour shows in around 100 seconds, although this did vary with the particular show it was processing.
Disclaimer! As stated I am FAR from a bash guru, use at your own risk! It worked on my single-depth subfolder structure of my Video (recordings) folder.
I hope someone finds this useful. This is v1.0, so I'm open to feedback/improvements.
Cheers,
-Brad
Anywho, my solution was to re-run comskip on all of these recordings so I started a bash script to handle it in bulk in Linux. I'm far from a bash guru but was able to piece together some code with a lot of help from other forums and Martin's PostProcessing.sh example. Here it is:
Code:
#! /bin/bash
# comskip_subfolders.sh
# This script will bulk-process TS files in sub-folders. Execute in your root Video folder and it will run comskip on all TS files in all the "show" subfolders
# nice eases CPU use, range is -20 (fastest/highest CPU usage) to 19 (slowest/least CPU usage), negative values require sudo
for d in */; do
echo "Processing Folder $d"
cd "$d"
for file in *.ts
do
echo "Processing file " $file
nice -n 19 comskip --ini=/home/<username>/Comskip/comskip.ini "$file" > /dev/null
done
cd ..
done
Just paste the code into your favorite text editor and change <username> to your user, or modify the path completely if you installed Comskip elsewhere. Save the contents to your ~/bin folder and don't forget to chmod +x to make it executable. If you haven't already you might want to make sure you've set edl_skip_field = 3 in your comskip.ini, or add that line to the end of the ini file if needed.
Change the nice value if you like. I have a new server with a 6-core 3.6GHz CPU and I was running two instances of the script (in two separate folders) with nice @ "2" and each instance was showing about 240% utilization in System Monitor. It was processing 1 hour shows in around 100 seconds, although this did vary with the particular show it was processing.
Disclaimer! As stated I am FAR from a bash guru, use at your own risk! It worked on my single-depth subfolder structure of my Video (recordings) folder.
I hope someone finds this useful. This is v1.0, so I'm open to feedback/improvements.
Cheers,
-Brad
Server: Ryzen 5 3600 3.6GHz: 16GB RAM: ASRock Phantom D/RX570: SDD: 512GB HDDs: 5TB, 8TB, 8TB
Linux Mint v20, NPVR v5.1.3.210711
Tuners: Hauppauge PVR-2250-MC Dual Tuner, HDHR Duo ATSC Tuner
Clients: Knewc on CE-ODroid N2 x2, N2+, LE-RPi4, PCs x2
Linux Mint v20, NPVR v5.1.3.210711
Tuners: Hauppauge PVR-2250-MC Dual Tuner, HDHR Duo ATSC Tuner
Clients: Knewc on CE-ODroid N2 x2, N2+, LE-RPi4, PCs x2