Hallo,
Ich habe dieses Bash-Skript erstellt, um ein Problem zu lösen, bei dem der GreenTeaSpeak MusicBot nach dem Ende eines Songs manchmal nicht automatisch zum nächsten Titel wechselt oder aufgrund eines FFMPEG-Fehlers stoppt.
Funktionen
- Überwacht die MusicBot-Logs in Echtzeit.
- Liest die tatsächliche Songdauer aus dem Logeintrag Parsed duration.
- Sendet automatisch:
.mbot select <bot id> (e.g. .mbot select 3)
.mbot next
sobald die Songdauer abgelaufen ist.
- Erkennt den Fehler FFMPEG pipe EOF while process still running.
- Falls die Wiedergabe nicht gestartet werden kann, sendet das Skript automatisch:
.mbot stop
.mbot play
um den MusicBot neu zu starten.
- Es läuft immer nur ein Timer gleichzeitig.
- Vollautomatischer Betrieb.
Voraussetzungen
- Linux
- Bash
- netcat (nc)
- GreenTeaSpeak ServerQuery-Zugriff
- Aktivierte MusicBot-Logs
Konfiguration
Folgende Werte müssen im Skript angepasst werden.
- Server-IP
- ServerQuery-Port
- ServerQuery-Benutzername
- ServerQuery-Passwort
- Log-Pfad
- Bot-ID (falls erforderlich)
Im Hintergrund starten
Live-Log anzeigen
Mit freundlichen Grüßen
Emin ERDEMiR
-------------------------------------
Hello,
I created this Bash script to solve an issue where the GreenTeaSpeak MusicBot sometimes fails to automatically skip to the next track after a song ends or stops because of an FFMPEG error.
Features
-Monitors the MusicBot logs in real time.
-Reads the actual song duration from the Parsed duration log entry.
-Automatically sends:
.mbot select <bot id> (e.g. .mbot select 3)
.mbot next
once the song duration has elapsed.
-Detects the error FFMPEG pipe EOF while process still running.
-If playback cannot be started, the script automatically sends:
.mbot stop
.mbot play
to restart the MusicBot.
-Ensures that only one timer is running at a time.
-Fully automatic operation.
Requirements
-Linux
- Bash
- netcat (nc)
- GreenTeaSpeak ServerQuery access
- MusicBot logging enabled
Configuration
The following values must be adjusted in the script:
- Server IP address
- ServerQuery port
- ServerQuery username
- ServerQuery password
- Log file path
- Bot ID (if required)
Run in the background
View the live log
Best regards,
Emin ERDEMİR
-------------------------------------
Merhaba,
Bu Bash betiğini, GreenTeaSpeak MusicBot'un bir şarkı sona erdiğinde bazen otomatik olarak bir sonraki parçaya geçmemesi veya FFMPEG hatası nedeniyle durması sorununu çözmek amacıyla geliştirdim.
Özellikler
- MusicBot günlüklerini (loglarını) gerçek zamanlı olarak izler.
- `Parsed duration` log kaydından şarkının gerçek süresini okur.
- Şarkı süresi dolduğunda otomatik olarak:
.mbot select <bot id>` (örnek: `.mbot select 3`)
.mbot next`
komutlarını gönderir.
- `FFMPEG pipe EOF while process still running` hatasını algılar.
- Oynatma başlatılamazsa otomatik olarak:
.mbot stop`
.mbot play`
komutlarını göndererek MusicBot'u yeniden başlatır.
* Aynı anda yalnızca bir zamanlayıcının çalışmasını sağlar.
* Tamamen otomatik olarak çalışır.
Gereksinimler
- Linux
- Bash
- netcat (`nc`)
- GreenTeaSpeak ServerQuery erişimi
- MusicBot loglarının etkinleştirilmiş olması
Yapılandırma
Betik içerisinde aşağıdaki değerlerin düzenlenmesi gerekir:
- Sunucu IP adresi
- ServerQuery portu
- ServerQuery kullanıcı adı
- ServerQuery parolası
- Log dosyası yolu
- Bot ID'si (gerekiyorsa)
Arka planda çalıştırma
Canlı log görüntüleme
Saygılarımla,
Emin ERDEMİR
https://pixeldrain.com/u/SBjuqChh
Ich habe dieses Bash-Skript erstellt, um ein Problem zu lösen, bei dem der GreenTeaSpeak MusicBot nach dem Ende eines Songs manchmal nicht automatisch zum nächsten Titel wechselt oder aufgrund eines FFMPEG-Fehlers stoppt.
Funktionen
- Überwacht die MusicBot-Logs in Echtzeit.
- Liest die tatsächliche Songdauer aus dem Logeintrag Parsed duration.
- Sendet automatisch:
.mbot select <bot id> (e.g. .mbot select 3)
.mbot next
sobald die Songdauer abgelaufen ist.
- Erkennt den Fehler FFMPEG pipe EOF while process still running.
- Falls die Wiedergabe nicht gestartet werden kann, sendet das Skript automatisch:
.mbot stop
.mbot play
um den MusicBot neu zu starten.
- Es läuft immer nur ein Timer gleichzeitig.
- Vollautomatischer Betrieb.
Voraussetzungen
- Linux
- Bash
- netcat (nc)
- GreenTeaSpeak ServerQuery-Zugriff
- Aktivierte MusicBot-Logs
Konfiguration
Folgende Werte müssen im Skript angepasst werden.
- Server-IP
- ServerQuery-Port
- ServerQuery-Benutzername
- ServerQuery-Passwort
- Log-Pfad
- Bot-ID (falls erforderlich)
Im Hintergrund starten
- nohup bash /home/admin/greenteaspeak/autonext.sh > /home/admin/greenteaspeak/logs/autonext.log 2>&1 </dev/null &
Live-Log anzeigen
tail -f /home/admin/greenteaspeak/logs/autonext.logMit freundlichen Grüßen
Emin ERDEMiR
-------------------------------------
Hello,
I created this Bash script to solve an issue where the GreenTeaSpeak MusicBot sometimes fails to automatically skip to the next track after a song ends or stops because of an FFMPEG error.
Features
-Monitors the MusicBot logs in real time.
-Reads the actual song duration from the Parsed duration log entry.
-Automatically sends:
.mbot select <bot id> (e.g. .mbot select 3)
.mbot next
once the song duration has elapsed.
-Detects the error FFMPEG pipe EOF while process still running.
-If playback cannot be started, the script automatically sends:
.mbot stop
.mbot play
to restart the MusicBot.
-Ensures that only one timer is running at a time.
-Fully automatic operation.
Requirements
-Linux
- Bash
- netcat (nc)
- GreenTeaSpeak ServerQuery access
- MusicBot logging enabled
Configuration
The following values must be adjusted in the script:
- Server IP address
- ServerQuery port
- ServerQuery username
- ServerQuery password
- Log file path
- Bot ID (if required)
Run in the background
nohup bash /home/admin/greenteaspeak/autonext.sh > /home/admin/greenteaspeak/logs/autonext.log 2>&1 </dev/null &View the live log
tail -f /home/admin/greenteaspeak/logs/autonext.logBest regards,
Emin ERDEMİR
-------------------------------------
Merhaba,
Bu Bash betiğini, GreenTeaSpeak MusicBot'un bir şarkı sona erdiğinde bazen otomatik olarak bir sonraki parçaya geçmemesi veya FFMPEG hatası nedeniyle durması sorununu çözmek amacıyla geliştirdim.
Özellikler
- MusicBot günlüklerini (loglarını) gerçek zamanlı olarak izler.
- `Parsed duration` log kaydından şarkının gerçek süresini okur.
- Şarkı süresi dolduğunda otomatik olarak:
.mbot select <bot id>` (örnek: `.mbot select 3`)
.mbot next`
komutlarını gönderir.
- `FFMPEG pipe EOF while process still running` hatasını algılar.
- Oynatma başlatılamazsa otomatik olarak:
.mbot stop`
.mbot play`
komutlarını göndererek MusicBot'u yeniden başlatır.
* Aynı anda yalnızca bir zamanlayıcının çalışmasını sağlar.
* Tamamen otomatik olarak çalışır.
Gereksinimler
- Linux
- Bash
- netcat (`nc`)
- GreenTeaSpeak ServerQuery erişimi
- MusicBot loglarının etkinleştirilmiş olması
Yapılandırma
Betik içerisinde aşağıdaki değerlerin düzenlenmesi gerekir:
- Sunucu IP adresi
- ServerQuery portu
- ServerQuery kullanıcı adı
- ServerQuery parolası
- Log dosyası yolu
- Bot ID'si (gerekiyorsa)
Arka planda çalıştırma
nohup bash /home/admin/greenteaspeak/autonext.sh > /home/admin/greenteaspeak/logs/autonext.log 2>&1 </dev/null &Canlı log görüntüleme
tail -f /home/admin/greenteaspeak/logs/autonext.logSaygılarımla,
Emin ERDEMİR
https://pixeldrain.com/u/SBjuqChh