Mit stopwords.txt werden bekannte Füllwörter ausgefiltert.
fmt -0 langertext.txt | tr -d [:punct:] | grep -w -i -v -f stopwords.txt | sort | uniq -c | sort -n
fmt -0 langertext.txt | tr -d [:punct:] | grep -w -i -v -f stopwords.txt | sort | uniq -c | sort -n
avconv -f video4linux2 -r 25 -i /dev/video1 -vcodec mpeg4 -y webcam1.mp4
arecord -l
**** Liste der Hardware-Geräte (CAPTURE) ****
Karte 0: MID [HDA Intel MID], Gerät 0: 92HD81B1C5 Analog [92HD81B1C5 Analog]
Sub-Geräte: 1/1
Sub-Gerät #0: subdevice #0
avconv -f video4linux2 -i /dev/video1 -f alsa -i plughw:0,0 -ar 22050 -ab 64k -acodec ac3_fixed -vcodec mpeg4 -vb 2000k -y test.mp4
apt-get install libav-tools
apt-get install libavcodec-extra-53
avconv -i MOVI0000.avi -s 640x360 -vcodec libx264 MOVIE0000.mp4
<video width="640" height="360" controls autoplay >..
<source src="MOVIE0000.mp4" type="video/mp4">..
Sorry, dein Browser unterstützt kein HTML5 Video...
</video>
for i in *.mp4; do avconv -i "$i" -ss 00:00:05 -s 320x180 -vsync 1 -qscale 1 -vframes 1 "${i%.mp4}.jpg"; done
// Verzeichnis, in dem die Videos und Vorschaubilder abgelegt sind
//
$dir="videos";
$directory=scandir($dir);
// Wenn Aktion gewählt, erstelle HTML-Gerüst für die selektiert Videodatei
//
if($_GET['action']=="show")
{
$datei=$dir . "/" . strip_tags($_GET['file']);
echo "<video width=\"1280\" height=\"720\" controls autoplay >";
echo "<source src=\"$datei\" type=\"video/mp4\">";
echo "Sorry, your browser doesn't support HTML5 video...";
echo "</video><hr>";
}
// Gehe alle Dateien des Verzeichnisses durch
//
foreach($directory as $file)
{
// Endung mp4?
if(preg_match("/mp4$/", $file))
{
$datei = $dir . "/" . $file;
$size=filesize($datei); // Dateigröße holen
$creationdate=date("Y-m-d" ,filectime($datei)); // Erstellungsdatum der Datei
// Gibt es eine Vorschaudatei?
$thumbnail=$dir . "/" . str_replace("mp4","jpg",$file);
$description="";
if(file_exists($thumbnail))
{
$description ="<img src=\"$thumbnail\" width=\"300\"> <br>";
}
$description.=$file . " " . human_filesize($size) . " [$creationdate]";
echo "<a href=\"" . $_SERVER['PHP_SELF'] . "?action=show& file=$file\">$description</a><br>";
}
}
function human_filesize($bytes, $decimals = 2) {
$sz = 'BKMGTP';
$factor = floor((strlen($bytes) - 1) / 3);
return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$sz[$factor];
}
avconv -y -i rtsp://[Benutzer]:[Passwort]@192.168.1.202:554 -vcodec mjpeg -vframes 1 -an -f rawvideo screenshot.jpg
avconv -y -i "rtsp://[user]:[password]@192.168.178.143:554/11" -vcodec mjpeg -vframes 1 -an -f rawvideo screenshot.jpg
avconv -y -i "rtsp://[user]:[pwd]@192.168.178.221:554/live/ch1" -vcodec mjpeg -vframes 1 -an -f rawvideo screenshot.jpg
curl -k "https://192.168.178.223/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=[BENUTZER]&pwd=[PASSWORT]" -o screenshot.jpgBefehle der Foscam Kameras
curl -k "https://192.168.178.227/cgi-bin/CGIProxy.fcgi?cmd=setMainVideoStreamType&streamType=0&usr=BENUTZER&pwd=PASSWORT"
curl -k "https://192.168.178.227/cgi-bin/CGIProxy.fcgi?cmd=getMainVideoStreamType&usr=BENUTZER&pwd=PASSWORT"
curl --digest -u "BENUTZER:PASSWORT" 192.168.178.225/mjpeg/snap.cgi?chn=0 -o screenshot.jpg
$url="http://192.168.1.202";
$getstring="/web/cgi-bin/hi3510/param.cgi?cmd=ptzctrl&-step=1&-act=right&-speed=13";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . $getstring);
//curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
//curl_setopt($ch, CURLOPT_USERPWD, 'admin:123456');
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/xml',
'Connection: Keep-Alive',
'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Authorization: Basic [BASE64HASH]'
));
$data = curl_exec($ch);
echo $data;
curl_close($ch);
define myCamWeb HTTPSRV cam /usr/share/web CAM
<embed type="application/x-vlc-plugin" width= "1024" height= "768" name="player" autoplay="yes" loop="yes" target="rtsp://[Benutzer]:[Passwort]@192.168.1.202:554" />3. FHEM aktualisieren
define weblink_test weblink iframe https://<ip von fhem>/fhem/cam/index.html
#! /ffp/bin/sh
Background()
{
while ! crontab -l | grep zyfw_downloader >/dev/null
do
sleep 10
done
sleep 10 # just to be sure
cat /ffp/var/spool/cron.tab | crontab -
}
case $1 in
start)
if [ -f /ffp/var/spool/cron.tab ]
then
Background &
fi
;;
sto*)
mkdir -p /ffp/var/spool/
crontab -l >/ffp/var/spool/cron.tab
;;
esac
/ffp/start/cron.sh store
find -iname '*.jpg' -printf 'mkdir -p %TY-%Tm-%Td; cp %p %TY-%Tm-%Td\n' | bash
Ich wollte die neu erworbene Powerstation in Openhab einbinden, um den aktuellen Status (Ladestand etc.) über Openhab auswerten zu können. ...