Hello,
I don't know where to post but after testing PVRAnyDev I got multiple problems.
First I test 99_99_PVRAnyDev.init to record PVR-records to my virtual-USB (nfs-mount on my NAS).
Code: Select all
#!/bin/sh
#
# ? Copyright 1996-2014, zoelechat@SamyGO
#
#
. /dtv/SGO.env
SODIR=$SYSROOT/opt/privateer/usr/libso # E-series only, on F environment LIBSO_DIR is used
RecordingDevice="" # for fixed startup device (e.g. "sda1"), non-empty value disables daemon
PID_FILE="/dtv/.pvranydevd.pid"
start_daemon()
{
if [ -z $RecordingDevice ] ; then
echo "Starting PVRAnyDev daemon..."
$0 daemon &
pvrad_pid=$!
echo "PVRAnyDev daemon started with pid: $pvrad_pid."
echo $pvrad_pid > $PID_FILE
fi
}
stop_daemon()
{
if [ -f "$PID_FILE" ] ; then
pvrad_pid=$(cat $PID_FILE)
echo "Stopping PVRAnyDev daemon. pid: $pvrad_pid"
kill $pvrad_pid 2> /dev/null
kill -9 $pvrad_pid 2> /dev/null
rm $PID_FILE 2> /dev/null
fi
}
daemon()
{
pidof exeTV > /dev/null && RecordingFS="ext4" || RecordingFS="xfs"
while true
do
cur_usblog=$(cat /dtv/usb/usblog)
for cur_dev in /dtv/usb/sd* ; do
if [ -d "$cur_dev/CONTENTS" ] ; then
echo "$cur_usblog" | grep -A 1 "$cur_dev" | grep -q "${RecordingFS}"
if [ $? -ne 0 ] ; then
dev_short=$(echo $cur_dev | sed s/"\/dtv\/usb\/"//)
sed -i "/usb\/${dev_short}/{n;s/.*/FileSystem : ${RecordingFS}/;}" /dtv/usb/usblog
fi
fi
done
sleep 5
done
}
stop_bootloop()
{
for USB in /dtv/usb/sd* ; do
echo "checking $USB"
[ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1
done
}
update_usblog()
{
pidof exeTV > /dev/null && RecordingFS="ext4" || RecordingFS="xfs"
if [ -e /dtv/usb/usblog ] ; then
cp -f /dtv/usb/usblog /tmp
printf '' > /dtv/usb/usblog
sleep 2
[ ! -z $RecordingDevice ] && sed -i "/usb\/${RecordingDevice}/{n;s/.*/FileSystem : ${RecordingFS}/;}" /tmp/usblog
mv -f /tmp/usblog /dtv/usb
fi
}
case $1 in
start)
stop_bootloop
[ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
samyGOso -p $(pidof exeAPP || pidof exeDSP) -l $SODIR/libPVRAnyDev.so
stop_daemon
update_usblog
start_daemon
;;
stop)
[ -e /dtv/PVRAnyDev.log ] && echo "PVRAnyDev can't be stopped."
stop_daemon
;;
daemon)
daemon
;;
status)
[ -e /dtv/PVRAnyDev.log ] && cat /dtv/PVRAnyDev.log || echo "Not started"
[ -f "$PID_FILE" ] && echo -e "\nDaemon started with pid: $(cat $PID_FILE)" || echo -e "\nDaemon not started"
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
I also start 99_91_PVRtoTS.init to decrypt the files to .ts
Code: Select all
#!/bin/sh
#
# ? Copyright 1996-2014, zoelechat@SamyGO
#
#
. /dtv/SGO.env
SODIR=$SYSROOT/opt/privateer/usr/libso # E-series only, on F environment LIBSO_DIR is used
stop_bootloop()
{
for USB in /dtv/usb/sd* ; do
echo "checking $USB"
[ -e $USB/STOP ] && echo "STOP found. Script exit..." && exit 1
done
}
case $1 in
start)
stop_bootloop
[ "$LIBSO_DIR" ] && SODIR=$LIBSO_DIR
samyGOso -p $(pidof exeTV || pidof exeDSP) -l $SODIR/libPVRtoTS.so -r
;;
stop)
;;
status)
[ -f /dtv/PVRtoTS.log ] && cat /dtv/PVRtoTS.log || echo "Not started"
;;
*)
echo "Usage: $0 {start|stop|status}" 1>&2
exit 0
;;
esac
In libPVRtoTS.config i also change ts_outdir and start ts2filename after decrypting.
Code: Select all
"ts_outdir": "/dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen"
"exec_when_done": "/mnt/opt/privateer/usr/libso/ts2filename"
Now I try to record an actual broadcast and I set time to record to 1 minute . Everything is going well and i get a .ts-file with broadcast name and I can view it from my NAS on PC and TV. Unfortunately a second attempt to record something shows me a window with the message:
"A record under 10 seconds can not be saved."
A third attempt is working again.
The fourth attempt even shows the known message.
PVRtoTS.init status:
Code: Select all
mnt/etc/init.d/02_05_PVRtoTS.init start stop
Status:
SamyGO PVRtoTS v0.5.7 - (c) bugficks 2013
* F Series - T-MST12DEUC T-MST12DEUC-2105.0 2015-02-24 *
init done...
[PVRtoTS(0x3b059b8)] Saving key for '/dtv/usb/sda1/CONTENTS/20150421163914.srf' to '/dtv/usb/sda1/CONTENTS/20150421163914.key'
[PVRtoTS(0x3b059b8)] key: 26186528bb5b7b090b61ead4912a3de9
[PVRtoTS(0x3b04c90)] Creating decryption thread for '/dtv/usb/sda1/CONTENTS/20150421163914.srf'
[PVRtoTS thread(77f2d450)] '/dtv/usb/sda1/CONTENTS/20150421163914.srf'
[PVRtoTS thread(77f2d450)] Start decrypting '/dtv/usb/sda1/CONTENTS/20150421163914.srf' to '/dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/20150421163914.ts'
[PVRtoTS(0x3b04c90)] Waiting for decryption thread.
[PVRtoTS thread(77f2d450)] Recording stopped, still decrypting...
[PVRtoTS thread(77f2d450)] Finished decrypting '/dtv/usb/sda1/CONTENTS/20150421163914.srf' to '/dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/20150421163914.ts'
[PVRtoTS thread(77f2d450)] executing '/mnt/opt/privateer/usr/libso/ts2filename /dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/20150421163914.ts 2>&1'
[ts2filename] Renaming '/dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/20150421163914.ts' to '/dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/2015.04.21_18h39_SIXX - Desperate Housewives.ts'
[PVRtoTS thread(77f2d450)] '/mnt/opt/privateer/usr/libso/ts2filename /dtv/usb/sdb/NAS-Videos/Samsung-Aufnahmen/20150421163914.ts 2>&1' finished.
[PVRtoTS(0x3b04c90)] Decryption thread exited.
PVRtoAnyDev.init status:
Code: Select all
/mnt/etc/init.d/99_99_PVRtoAnyDev.init start stop
Status:
[PVRAnyDev] SamyGO PVRAnyDev v0.1.8 - (c) bugficks 2013
[PVRAnyDev] * F Series - T-MST12DEUC T-MST12DEUC-2105.0 2015-02-24 *
[PVRAnyDev] Patching _ZN11CDevListMgr19IsValidDeviceForPVREi @ 0x3ab02e8 .
[PVRAnyDev] Patching _ZN11CDevListMgr9AddDeviceERKiS1_ @ 0x3ab5034 .
[PVRAnyDev] Patching SetTimeshiftDuration[0] @ 0x9510020 90 min -> 1092 min.
[PVRAnyDev] Patching SetTimeshiftDuration[1] @ 0x36fa3d0 89 min -> 1091 min.
[PVRAnyDev] Patching SetTimeshiftDuration[2] @ 0x36fa3e0 90 min -> 1092 min.
[PVRAnyDev] Patching _ZN16CPVRPreprocessor34t_CheckDevicePerformanceTestResultEv @ 0x37492dc .
[PVRAnyDev] Patching _ZN17CMMBrowserViewMgr9AddDeviceEi @ 0x37d16b0 .
[PVRAnyDev] init done...
Daemon started with pid: 1670
It looks like libPVRAnyDev.so and libPVRtoTS.so are injected correct!?
Code: Select all
checking /dtv/usb/sda1
checking /dtv/usb/sda1
Injecting '/mnt/opt/privateer/usr/libso/libPVRtoTS.so' resident: '1' succeeded.
Injecting '/mnt/opt/privateer/usr/libso/libUSBPopDown_30s.so' resident: '0' succeeded.
checking /dtv/usb/sda1
checking /dtv/usb/sdb
checking /dtv/usb/sdc
Injecting '/mnt/opt/privateer/usr/libso/libPVRAnyDev.so' resident: '0' succeeded.
Starting PVRAnyDev daemon...
PVRAnyDev daemon started with pid: 1670.
I don't know where to search for the problem.
Also after recording a time-controlled record the TV starts in "Soft-power-off"-modus in chaotic intervals. This action I detect because of my Master-Slave-Powerplug. (It switches my Audio-Receiver on @ starting TV)
Greetz Joe