Missing directory structure in Mythweb videos
Somehow the Directory structure in the Mythweb videos section is empty using mythweb-0.22_p22763.
Perhaps something is b0rked in my setup, so I had to hack it up a bit since the filename in videometadata doesn't overlap with my VideoStartupDir setting.
--- modules/video/handler.php.orig 2010-03-04 10:23:05.000000000 +0100
+++ modules/video/handler.php 2010-03-04 10:25:13.000000000 +0100
@@ -120,5 +120,6 @@
foreach ($dirs as $dir) {
if ($dir) {
- if(strpos($file, $dir) !== false) {
+ #Disable since $file and $dir doesn't overlap
+ #if(strpos($file, $dir) != false) {
if (!isset($PATH_TREE[$dir]))
$PATH_TREE[$dir] = array('display' => $dir,
@@ -128,5 +129,5 @@
$file = str_replace($dir, '', $file);
break;
- }
+ #}
}
}
@@ -150,4 +151,6 @@function output_path_picker($path, $padding=0) {
+ #Hide VideoStartupDir
+ $path=str_replace(setting('VideoStartupDir', hostname),"",$path);
for ($i = 0; $i < $padding; $i++)
echo ' ';
B2evolution antispam list
Before I implemented comment captchas on this blog I was flodded with comment spam. Captchas helped a lot! Like removing 95+% of all comment spam, however some still gets through. Deleting a spam comment now and then have irritated me greatly, but until earlier this week I haven't really done much about it.
After just a bit of research I decided that my first move was to automatically pull the B2evolution antispam list. I also considered Akismet but one step at a time.
Here is the simple script called from cron I use to pull the updates:
#!/bin/sh
site=http://example.com/admin.php
name=username
pass=password
cookies=`mktemp`wget -O /dev/null --post-data="login=$name&pwd=$pass" \
"${site}?ctrl=antispam&action=poll"
It's not perfect since at least one comment spam went through already.
I'd like to hear what other people to prevent comment spam (other than disabling comments :-) )?
Transcoding LATM packed HE-AAC audio with MythTV
Since some of the new Danish digital TV channels (on MUX2) are using the HE-AAC audio codec which is not widely supported (ie. on my Pop Corn Hour) I had to transcode the recordings before being able to watch it on my frontend.
I'm using VLC for the transcoding, since ffmpeg couldn't quite grok it yet.
For this I use the following simple script:
#!/bin/bash
vcodec="mp4v"
acodec="a52"
bitrate="VIDEO_BITRATE"
arate="128"
ext="aac"
mux="mp4"
vlc="/usr/bin/vlc"
input=$1
output=$2#http://www.geekzone.co.nz/forums.asp?forumid=83&topicid=55394
$vlc -v -I dummy "$input" --sout "#transcode{acodec=$acodec,ab=$arate,channels=2,samplerate=48000}:duplicate{dst=std{access=file,mux=ts,dst=\"$output\"}" vlc://quit
exit $?
Note: You have to enable VLC stream support for the --sout to work (USE="stream").
With MythTV I wrap it in the following script for it to work as a normal MythTV UserJob:
#!/bin/bash
VIDEODIR=$1
FILENAME=$2
JOBID=$3
NEWFILENAME=`echo $FILENAME | sed -e "s/\....$//"`.mp4# Sanity checking, to make sure everything is in order.
if [ -z "$VIDEODIR" -o -z "$FILENAME" ]; then
echo "Usage: $0 <VideoDirectory> <FileName>"
exit 5
fi
if [ ! -f "$VIDEODIR/$FILENAME" ]; then
echo "File does not exist: $VIDEODIR/$FILENAME"
exit 6
ficat << EOF | mysql -h mysqlserver -u mythtv -ppassword mythconverg
UPDATE jobqueue SET comment = "Starting transcoding using vlc." WHERE id = $JOBID;
EOF# Remove previous mp4 if any
if [ -f $VIDEODIR/$NEWFILENAME ]; then
rm $VIDEODIR/$NEWFILENAME
fi/home/mythtv/bin/transcodelatm.sh $VIDEODIR/$FILENAME $VIDEODIR/$NEWFILENAME
ERROR=$?
if [ $ERROR -ne 0 ]; then
echo "vlc failed for ${FILENAME}.tmp with error $ERROR"
exit $ERROR
fi#Update MySQL
cat << EOF | mysql -h mysqlserver -u mythtv -ppassword mythconverg
UPDATE recorded SET basename = "$NEWFILENAME", filesize = $(ls -l $VIDEODIR/$NEWFILENAME | awk '{print $5}') WHERE basename = "$FILENAME";
EOF#Remove previous version
rm $VIDEODIR/$FILENAMEexit 0
I don't update the jobqueue table once the job is finished, since MythTV immediately overwrites my update. The wiki shows how to use a bit of trickery to update the jobqueue table after the job completes, but the above solution is fine for me.
Gentoo KDE 4.4 upgrade a day after
When KDE 4.4 was released a few days ago, I just had to try it out. Here is a brief outline of the installation og the unstable KDE 4.4 ebuilds and first day experience.
It started out with ebuild blockers, blockers and more blockers. All KDE 4.3.5 packages blocked the new 4.4 ebuilds. Some propose to remove 4.3 KDE entries from world and world_sets but it was not there. So I ended up creating a binary buildhost to minimize downtime for my laptop. Also with a binary buildhost I could run the same packages on the laptop and the desktop machine.
I only encountered one compile failure. PyQt4 failed with:
sip: QAbstractAnimation has not been defined
The simple workaround is to USE="multimedia" emerge -va PyQt4.
After a bit of messing around nepomuk/akonadi seems to be working, at least enough to start up Kmail.
So fairly quickly the KDE installation was ready to roll. I started out testing it with a full days work and I've only come across some minor new issues:
- KRDC seems to have lost the taskbar icon
- thumbnail bar in cover switch is missing too
- synchronization with Google data is still not working well enough to be useable (same issue with 4.3.5
- the comic strip plasmoid is still not working here, same with 4.3.5
- the weather applet is showing local weather again, but status icon is missing
- also it feels like 4.4 is a bit slower than 4.3.5 here with Intel GM965 and desktop effects enabled
- had to disable the blue window glow (System Settings > Appearance > Windows > Shadows tab)
- disabling the normal drop shadows also helped on responsivenes when changing windows
- clicking the kopete systray icon doesn't raise the main window as it did previously
- some fonts (at least in Konqueror) are no longer anti-aliased
- last but certainly not least 4.4 seems quite stable here, not having any major crashes yet
All in I'm quite satisfied with KDE 4.4, though nothing really groundbreaking. With a little bit of debugging and messing around KDE 4.4 is ready for production on my laptop. Good work KDE team and the Gentoo KDE herd!
MythTV on Gentoo part 3
Last week I finally solved my hardware problems with MythTV 0.22 and a Hauppauge Nova-T PCI card and the TerraTec T-5 double DVB-T receiver.
After many reboots and tests with one or both receivers it turned out that the hardware was not at fault:-/
All I had to do was move the two TerraTec antennas to a spot with better reception, duh!
Before using the TerraTec receiver with my main MythTV server I had tested DVB-T reception on my laptop with the old placement of antennas and reception was fine, however it turns out that the DVB-T signal is quite dependant on weather changes.
So now my only remaining problems is that mythtranscoder doesn't support H.264 encoded streams and MythVideo webpart refuses to work, not using the mythtv hostname but the actual hostname...
:: Next >>