Der Download wird immer wieder abgebrochen. Soll ich 1000x hintereinander den wget...-Befehl ausführen?
Druckbare Version
Der Download wird immer wieder abgebrochen. Soll ich 1000x hintereinander den wget...-Befehl ausführen?
Mit diesem Shellscript werden fortlaufend Dateien mit 100917... angelegt. Wie kann ich aber das Script ändern das nur im aktuellen Verzeichnis abgespeichert wird? Verzeichnis anlegen und hinein wechseln brauche ich nicht. Ich brauche nur die einzelnen Dateien. Die müßten am Ende vom Script zu einer Film.ts zusammengefügt werden. Wie mache ich das?Code:#!/bin/bash
# Name of the containing folder
GROUP="My Videos"
# Example link: https://vids.net/ABCAED/AADDCDE/m3u8/AADDCDE/AADDCDE_0.ts
# Insert below as: https://vids.net/ABCAED/AADDCDE/m3u8/AADDCDE/AADDCDE
# INSERT LINKS TO VIDEOS HERE
LINK=(
'Title for the video link'
'http://live.darkside-iptv.com:8080/test/test/100917'
'Title for the next video'
'http://live.darkside-iptv.com:8080/test/test/100917'
)
mkdir "$GROUP"
cd "$GROUP"
I=0
while [ $I -lt ${#LINK[@]} ]
do
# create folder for streaming media
TITLE=${LINK[$I]}
mkdir "$TITLE"
cd "$TITLE"
mkdir 'parts'
cd 'parts'
J=$((I + 1))
URL=${LINK[$J]}
I=$((I + 2))
DIR="${URL##*/}"
# download all streaming media parts
VID=-1
while [ $? -eq 0 ];
do
VID=$((VID + 1))
wget $URL
done
# combine parts
COUNTER=0
while [ $COUNTER -lt $VID ]; do
echo $DIR'_'$COUNTER.ts | tr " " "\n" >> tslist
let COUNTER=COUNTER+1
done
while read line; do cat $line >> $TITLE.ts; done < tslist
rm -rf tslist
mv "$TITLE.ts" "../$TITLE.ts"
cd ..
rm -rf 'parts'
cd ..
done
Desweiteren wäre es schön ein Script zu haben das als Parameter eine bestimmte Netzwerkadresse übergeben bekommt. So muß ich ja immer im Script die Adresse ändern.
Leider kenne ich mich nicht gut aus in Linux-Scripting.
Gibt es sonst keine einfachere Methode einen Livestream aufzunehmen? Bei z. B. ARD, ZDF hat es mit ffmpeg -i ... geklappt.
Danke.
Hat niemand ne Idee?
Läuft bei Dir eine Firewall? Die könnte evtl. beim Download dazwischen funken...
Code:sudo iptables -L
Hier die Daten:Code:heiko@linux-rhoj:~/neu/SyFy> sudo iptables -L
[sudo] Passwort für root:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
INPUT_direct all -- anywhere anywhere
INPUT_ZONES_SOURCE all -- anywhere anywhere
INPUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
FORWARD_direct all -- anywhere anywhere
FORWARD_IN_ZONES_SOURCE all -- anywhere anywhere
FORWARD_IN_ZONES all -- anywhere anywhere
FORWARD_OUT_ZONES_SOURCE all -- anywhere anywhere
FORWARD_OUT_ZONES all -- anywhere anywhere
DROP all -- anywhere anywhere ctstate INVALID
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
OUTPUT_direct all -- anywhere anywhere
Chain FORWARD_IN_ZONES (1 references)
target prot opt source destination
FWDI_public all -- anywhere anywhere [goto]
FWDI_public all -- anywhere anywhere [goto]
Chain FORWARD_IN_ZONES_SOURCE (1 references)
target prot opt source destination
Chain FORWARD_OUT_ZONES (1 references)
target prot opt source destination
FWDO_public all -- anywhere anywhere [goto]
FWDO_public all -- anywhere anywhere [goto]
Chain FORWARD_OUT_ZONES_SOURCE (1 references)
target prot opt source destination
Chain FORWARD_direct (1 references)
target prot opt source destination
Chain FWDI_public (2 references)
target prot opt source destination
FWDI_public_log all -- anywhere anywhere
FWDI_public_deny all -- anywhere anywhere
FWDI_public_allow all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
Chain FWDI_public_allow (1 references)
target prot opt source destination
Chain FWDI_public_deny (1 references)
target prot opt source destination
Chain FWDI_public_log (1 references)
target prot opt source destination
Chain FWDO_public (2 references)
target prot opt source destination
FWDO_public_log all -- anywhere anywhere
FWDO_public_deny all -- anywhere anywhere
FWDO_public_allow all -- anywhere anywhere
Chain FWDO_public_allow (1 references)
target prot opt source destination
Chain FWDO_public_deny (1 references)
target prot opt source destination
Chain FWDO_public_log (1 references)
target prot opt source destination
Chain INPUT_ZONES (1 references)
target prot opt source destination
IN_public all -- anywhere anywhere [goto]
IN_public all -- anywhere anywhere [goto]
Chain INPUT_ZONES_SOURCE (1 references)
target prot opt source destination
Chain INPUT_direct (1 references)
target prot opt source destination
Chain IN_public (2 references)
target prot opt source destination
IN_public_log all -- anywhere anywhere
IN_public_deny all -- anywhere anywhere
IN_public_allow all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere
Chain IN_public_allow (1 references)
target prot opt source destination
Chain IN_public_deny (1 references)
target prot opt source destination
Chain IN_public_log (1 references)
target prot opt source destination
Chain OUTPUT_direct (1 references)
target prot opt source destination
heiko@linux-rhoj:~/neu/SyFy>
Zum Testen, leere einmal Deine FW:
Code:sudo iptables -F