2010-09-07, 19:41
Hi Ruud, I already prepared a fix for this. I will try to upload new version today late at night.
Gujs Wrote:Hi Ruud, I already prepaired fix for this. I will try to upload new version today late at night.Thanks, looking forward to this patch.
Gujs Wrote:Hi Ruud, I already prepared a fix for this. I will try to upload new version today late at night.Hi Gujs.
#!/bin/sh
# Variables
MKVVIDEO=$1 #Full path to recording /home/user/Videos/News.mkv
b=$2 #Basename of recording News.mkv
c=$3 #Channel name BBC world
C=$4 #Who created this recording user
t=$5 #Program title News
c=$6 #Program description News and stories...
S=$7 #Start time stamp of recording, UNIX epoch 1224421200
E=$8 #Stop time stamp of recording, UNIX epoch 1224426600
b=$(echo "$b" | sed "s/....$//") # Remove file ext (4 char)
MKVPATH=$(echo "$MKVVIDEO" | sed "s/....$//") # Remove file ext (4 char)
TRANSCODEPATH='~/Videos/TranscodedRecordings/' # EDIT
EDLFILE="$TRANSCODEPATH$b.edl"
COMSKIPPATH="c:/Program Files/comskip80_032/comskip.exe" # EDIT
COMSKIPLOGS="/home/nick/.wine/dosdevices/c:/Program Files/comskip80_032/logs/" # EDIT
MPGVIDEO=$TRANSCODEPATH$b".mpg" # Add new extention to filename
/bin/sync # flush diskbuffer
# Transcode to mpg
echo "*****" >/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "Starting Transcode to .mpg" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "***** INPUT = $MKVVIDEO *****" >>/var/log/tvheadendpp.log
echo "***** OUTPUT = $MPGVIDEO *****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
/usr/bin/whoami >>/var/log/tvheadendpp.log # for debugging purposes, who is running this script?
/bin/date >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
ffmpeg -v 10 -i "$MKVVIDEO" -vcodec copy -acodec copy "$MPGVIDEO" </dev/null >>/var/log/tvheadendpp.log 2>&1
echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "Starting Commercial Flagging" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "***** INPUT = "$MPGVIDEO" *****" >>/var/log/tvheadendpp.log
echo "***** OUTPUT = "$EDLFILE" *****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
/usr/bin/whoami >>/var/log/tvheadendpp.log # for debugging purposes, who is running this script?
/bin/date >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
wine "$COMSKIPPATH" "$MPGVIDEO" </dev/null >>/var/log/tvheadendpp.log 2>&1
echo "*****" >>/var/log/tvheadendpp.log
echo "*****" >>/var/log/tvheadendpp.log
# Move Comskip Log File
echo "Moving Log file to '$COMSKIPLOGS$b.log'" </dev/null >>/var/log/tvheadendpp.log 2>&1
mv "$TRANSCODEPATH$b.log" "$COMSKIPLOGS"
# Move .edl back to MKV Path
echo "Copying edl file to '$MKVPATH.edl'" </dev/null >>/var/log/tvheadendpp.log 2>&1
cp "$EDLFILE" "$MKVPATH.edl"
echo "EDL for $MKVVIDEO:" >>/var/log/tvheadendpp.log
echo "Finished at `date`" >>/var/log/tvheadendpp.log
ffmpeg -v 10 -i "$MKVVIDEO" -acodec copy -vcodec libx264 -vpre veryfast -s hd480 -b 500k "$TRANSCODEPATH$b.edl" </dev/null >>/var/log/posttvheader.log 2>&1
ffmpeg -v 10 -i "$MKVVIDEO" -vcodec copy -acodec copy "$MPGVIDEO"
ffmpeg -v 10 -i "$MKVVIDEO" -vcodec copy -ab 128k "$MPGVIDEO"
ffmpeg -v 10 -i "$MKVVIDEO" -vcodec mpeg2video -sameq -acodec copy -f vob -copyts "$MPGVIDEO"
Quote:Output #0, mpeg, to '/home/nick/Recordings/NCIS.2010-09-10.mpg':
Metadata:
encoder : Lavf52.78.3
Stream #0.0(eng): Video: mpeg2video, yuv420p, 720x576 [PAR 64:45 DAR 16:9], q=2-31, 15000 kb/s, 90k tbn, 25 tbc
Stream #0.1(eng): Audio: mp2, 48000 Hz, 2 channels, 256 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg @ 0x915ca60] buffer underflow i=1 bufi=0 size=768
Last message repeated 1 times
frame= 555 fps= 0 q=-1.0 size= 16968kB time=52.24 bitrate=2660.8kbits/s
frame= 1011 fps=1011 q=-1.0 size= 30994kB time=70.50 bitrate=3601.3kbits/s
frame= 1617 fps=1078 q=-1.0 size= 49586kB time=94.67 bitrate=4290.7kbits/s
#!/bin/sh
case "$1" in
suspend)
/usr/sbin/service tvheadend stop
rmmod budget_ci
rmmod budget_core
rmmod dvb_core
rmmod tda10023
echo "stopped tuner!" >> /tmp/tuner.log
;;
resume)
modprobe budget_ci
modprobe budget_core
modprobe dvb_core
modprobe tda10023
/usr/sbin/service tvheadend start
echo "started tuner!" >> /tmp/tuner.log
;;
esac
tsint Wrote:Do you have a script to unload/load the tuner modules when you suspend/resume?
This is my sleep script, /etc/pm/sleep.d/66_tuner
Code:...
Perhaps this only works if you have a PCI-tuner...
decay Wrote:Ok, working as expected, Live-TV displays fine through the hts addon, EPG shows everything 2h early.
I.e. Running program 1800-1900 shows information from the program running 16-1700.
edit: forgot to mention that i'm on GMT+2 currently, so it seems a simple timezone matter at the first glance.