{"id":518,"date":"2026-11-15T21:13:13","date_gmt":"2026-11-15T20:13:13","guid":{"rendered":"https:\/\/www.tuxik.cz\/?p=518"},"modified":"2026-11-15T21:13:14","modified_gmt":"2026-11-15T20:13:14","slug":"winamp-audio-watchdog","status":"publish","type":"post","link":"https:\/\/www.tuxik.cz\/?p=518","title":{"rendered":"Winamp audio watchdog"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19-1024x576.png\" alt=\"\" class=\"wp-image-520\" srcset=\"https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19-1024x576.png 1024w, https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19-300x169.png 300w, https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19-768x432.png 768w, https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19-1536x864.png 1536w, https:\/\/www.tuxik.cz\/wp-content\/uploads\/e9c1d837-5160-4917-927f-1e44f9429d19.png 1672w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<div style=\"max-width: 960px; margin: 0 auto; color: #222; line-height: 1.7; font-size: 16px;\">\n<h1 style=\"font-size: 2.4em; margin-bottom: 10px;\">WinampAudioWatchdog<\/h1>\n<p style=\"font-size: 1.15em; color: #444; margin-top: 0;\">\n    Mal\u00fd watchdog pro Windows, kter\u00fd hl\u00edd\u00e1 <strong>skute\u010dn\u00fd audio v\u00fdstup p\u0159es WASAPI loopback<\/strong>.<br>\n    Kdy\u017e je na v\u00fdstupu del\u0161\u00ed dobu ticho, automaticky <strong>restartuje Winamp<\/strong>.\n  <\/p>\n<div style=\"background: #f6f8fb; border: 1px solid #dfe7f1; border-radius: 12px; padding: 22px; margin: 30px 0;\">\n<h2 style=\"margin-top: 0;\">Sta\u017een\u00ed<\/h2>\n<p style=\"margin-bottom: 18px;\">\n      K dispozici jsou hotov\u00e9 instal\u00e1tory pro 32bit i 64bit Windows:\n    <\/p>\n<div style=\"display: flex; flex-wrap: wrap; gap: 12px;\">\n      <a href=\"https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/x86\/setup.exe\" style=\"display: inline-block; background: #ff8a00; color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 10px; font-weight: bold;\"><br>\n        St\u00e1hnout 32bit verzi<br>\n      <\/a><p><\/p>\n<p>      <a href=\"https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/amd64\/setup.exe\" style=\"display: inline-block; background: #1d4ed8; color: #fff; text-decoration: none; padding: 12px 18px; border-radius: 10px; font-weight: bold;\"><br>\n        St\u00e1hnout 64bit verzi<br>\n      <\/a>\n    <\/p><\/div>\n<p style=\"margin-top: 16px; color: #555;\">\n      <strong>Pozn\u00e1mka:<\/strong> i kdy\u017e je Winamp obvykle 32bit, watchdog m\u016f\u017ee b\u00fdt klidn\u011b 64bit.<br>\n      Pro b\u011b\u017en\u00e1 64bit Windows je tedy verze <strong>amd64<\/strong> v po\u0159\u00e1dku.\n    <\/p>\n<p><\/p><\/div>\n<h2>Pro\u010d to vzniklo<\/h2>\n<p>\n    V praxi se ob\u010das stane, \u017ee Winamp sice b\u011b\u017e\u00ed, ale stream se zasekne nebo p\u0159estane hr\u00e1t.<br>\n    Extern\u00ed silence detektory neb\u00fdvaj\u00ed v\u017edy spolehliv\u00e9, proto\u017ee \u010dasto nehl\u00eddaj\u00ed skute\u010dn\u00fd zvuk,<br>\n    ale jen stav procesu nebo p\u0159\u00edtomnost streamu. Tohle \u0159e\u0161en\u00ed naopak sleduje<br>\n    <strong>re\u00e1ln\u00fd audio v\u00fdstup Windows<\/strong>.\n  <\/p>\n<h2>Jak to funguje<\/h2>\n<p>\n    Program pr\u016fb\u011b\u017en\u011b m\u011b\u0159\u00ed \u00farove\u0148 zvuku na v\u00fdstupu syst\u00e9mu. Pokud je hlasitost pod nastaven\u00fdm prahem<br>\n    d\u00e9le ne\u017e definovan\u00fd \u010das, provede automatick\u00fd restart Winampu:\n  <\/p>\n<ol>\n<li>ukon\u010d\u00ed <code>winamp.exe<\/code><\/li>\n<li>po\u010dk\u00e1 n\u011bkolik sekund<\/li>\n<li>spust\u00ed Winamp znovu<\/li>\n<li>na\u010dte playlist nebo URL streamu<\/li>\n<li>po restartu chv\u00edli nezasahuje, aby Winamp stihl nabufferovat<\/li>\n<\/ol>\n<p>\n    Voliteln\u011b um\u00ed nav\u00edc kontrolovat i dostupnost Icecast URL p\u0159es HTTP healthcheck,<br>\n    ale hlavn\u00ed rozhodov\u00e1n\u00ed je zalo\u017een\u00e9 na skute\u010dn\u00e9m zvuku.\n  <\/p>\n<h2>Hlavn\u00ed vlastnosti<\/h2>\n<ul>\n<li>hl\u00edd\u00e1n\u00ed skute\u010dn\u00e9ho audio v\u00fdstupu p\u0159es <strong>WASAPI loopback<\/strong><\/li>\n<li>automatick\u00fd restart Winampu p\u0159i del\u0161\u00edm tichu<\/li>\n<li>mo\u017enost automaticky spustit Winamp, pokud neb\u011b\u017e\u00ed<\/li>\n<li>voliteln\u00fd <strong>HTTP healthcheck<\/strong> streamu<\/li>\n<li>logov\u00e1n\u00ed do souboru<\/li>\n<li>voliteln\u00e1 <strong>e-mailov\u00e1 upozorn\u011bn\u00ed<\/strong><\/li>\n<li>hotov\u00e9 instala\u010dn\u00ed bal\u00ed\u010dky pro Windows<\/li>\n<\/ul>\n<h2>P\u0159\u00edklad konfigurace<\/h2>\n<p>\n    Konfigurace je v souboru <code>config.json<\/code>. N\u00ed\u017ee je uk\u00e1zkov\u00fd obsah:\n  <\/p>\n<pre style=\"background: #0f172a; color: #e5eefc; padding: 18px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.55;\"><code>{\n  \"WinampPath\": \"C:\\\\Program Files (x86)\\\\Winamp\\\\winamp.exe\",\n  \"PlaylistOrUrl\": \"C:\\\\radio\\\\stream.m3u\",\n  \"LogFile\": \"C:\\\\radio\\\\winamp-watchdog.log\",\n\n  \"SilenceThresholdDb\": -45.0,\n  \"SilenceSeconds\": 30,\n  \"RestartCooldownSeconds\": 90,\n\n  \"RestartIfWinampNotRunning\": true,\n  \"StartWinampOnLaunchIfMissing\": true,\n\n  \"StreamHealthcheckUrl\": \"\",\n  \"StreamHealthcheckIntervalSeconds\": 30,\n  \"StreamHealthcheckTimeoutSeconds\": 8,\n  \"StreamHealthcheckFailThreshold\": 3,\n\n  \"AlarmAfterRestarts\": 3,\n  \"RestartWindowMinutes\": 10,\n\n  \"EmailRecipients\": [],\n  \"EmailFrom\": \"\",\n  \"SmtpHost\": \"\",\n  \"SmtpPort\": 587,\n  \"SmtpEnableSsl\": true,\n  \"SmtpUsername\": \"\",\n  \"SmtpPassword\": \"\"\n}<\/code><\/pre>\n<h2>Doporu\u010den\u00e9 v\u00fdchoz\u00ed nastaven\u00ed<\/h2>\n<p>Pro prvn\u00ed test se osv\u011bd\u010d\u00ed za\u010d\u00edt takto:<\/p>\n<ul>\n<li><code>SilenceThresholdDb<\/code>: <strong>-45<\/strong><\/li>\n<li><code>SilenceSeconds<\/code>: <strong>30<\/strong><\/li>\n<li><code>RestartCooldownSeconds<\/code>: <strong>90<\/strong><\/li>\n<\/ul>\n<p>\n    Pokud watchdog fale\u0161n\u011b restartuje p\u0159i tich\u00fdch pas\u00e1\u017e\u00edch, zkus:\n  <\/p>\n<ul>\n<li>zv\u00fd\u0161it <code>SilenceSeconds<\/code> na <strong>45 a\u017e 60<\/strong><\/li>\n<li>nebo sn\u00ed\u017eit citlivost na <code>SilenceThresholdDb<\/code> t\u0159eba na <strong>-50<\/strong><\/li>\n<\/ul>\n<p>\n    Pokud naopak nereaguje na skute\u010dn\u00fd v\u00fdpadek, zkus:\n  <\/p>\n<ul>\n<li><code>SilenceThresholdDb<\/code> nastavit t\u0159eba na <strong>-40<\/strong><\/li>\n<\/ul>\n<h2>E-mailov\u00e1 upozorn\u011bn\u00ed<\/h2>\n<p>\n    Watchdog um\u00ed po restartu Winampu poslat informa\u010dn\u00ed e-mail. Sta\u010d\u00ed doplnit:\n  <\/p>\n<ul>\n<li><code>EmailRecipients<\/code> \u2013 seznam adres<\/li>\n<li><code>EmailFrom<\/code><\/li>\n<li><code>SmtpHost<\/code><\/li>\n<li>p\u0159\u00edpadn\u011b <code>SmtpUsername<\/code> a <code>SmtpPassword<\/code><\/li>\n<\/ul>\n<p>\n    Pr\u00e1zdn\u00fd seznam adres e-maily vyp\u00edn\u00e1. Pokud SMTP server vy\u017eaduje TLS\/STARTTLS,<br>\n    pou\u017eij typicky port <strong>587<\/strong> a <code>SmtpEnableSsl: true<\/code>.\n  <\/p>\n<div style=\"background: #fff8e8; border: 1px solid #f1d28b; border-radius: 12px; padding: 18px; margin: 28px 0;\">\n    <strong>Pozor:<\/strong> heslo k SMTP je v konfiguraci ulo\u017eeno jako prost\u00fd text,<br>\n    tak\u017ee je dobr\u00e9 omezit p\u0159\u00edstup k souboru <code>config.json<\/code>.\n  <\/div>\n<h2>Instalace a spu\u0161t\u011bn\u00ed<\/h2>\n<p>\n    Po instalaci m\u016f\u017ee struktura vypadat nap\u0159\u00edklad takto:\n  <\/p>\n<pre style=\"background: #f7f7f7; border: 1px solid #ddd; padding: 16px; border-radius: 10px; overflow-x: auto;\"><code>C:\\radio\\\n  WinampAudioWatchdog.exe\n  config.json\n  stream.m3u<\/code><\/pre>\n<p>Spu\u0161t\u011bn\u00ed z p\u0159\u00edkazov\u00e9 \u0159\u00e1dky:<\/p>\n<pre style=\"background: #f7f7f7; border: 1px solid #ddd; padding: 16px; border-radius: 10px; overflow-x: auto;\"><code>C:\\radio\\WinampAudioWatchdog.exe C:\\radio\\config.json<\/code><\/pre>\n<h2>Automatick\u00fd start po bootu<\/h2>\n<p>\n    Nejjednodu\u0161\u0161\u00ed je pou\u017e\u00edt <strong>Task Scheduler<\/strong>:\n  <\/p>\n<ol>\n<li>vytvo\u0159 novou \u00falohu (<em>Create Task<\/em>)<\/li>\n<li>nastav trigger: <strong>At startup<\/strong> nebo <strong>At log on<\/strong><\/li>\n<li>nastav akci:\n<ul>\n<li><strong>Program:<\/strong> <code>C:\\radio\\WinampAudioWatchdog.exe<\/code><\/li>\n<li><strong>Arguments:<\/strong> <code>C:\\radio\\config.json<\/code><\/li>\n<li><strong>Start in:<\/strong> <code>C:\\radio<\/code><\/li>\n<\/ul>\n<\/li>\n<li>pokud chce\u0161 b\u011bh bez p\u0159ihl\u00e1\u0161en\u00ed, za\u0161krtni <strong>Run whether user is logged on or not<\/strong><\/li>\n<\/ol>\n<p>\n    Je ale pot\u0159eba po\u010d\u00edtat s t\u00edm, \u017ee <strong>WASAPI loopback pot\u0159ebuje aktivn\u00ed audio za\u0159\u00edzen\u00ed<\/strong>.<br>\n    Na n\u011bkter\u00fdch Windows je proto spolehliv\u011bj\u0161\u00ed spou\u0161t\u011bt watchdog a\u017e po p\u0159ihl\u00e1\u0161en\u00ed u\u017eivatele,<br>\n    ne jako \u010distou slu\u017ebu bez desktop\/audio session.\n  <\/p>\n<h2>Jak otestovat funk\u010dnost<\/h2>\n<ol>\n<li>spus\u0165 Winamp se streamem<\/li>\n<li>spus\u0165 watchdog<\/li>\n<li>zastav stream nebo dej ve Winampu Stop<\/li>\n<li>po uplynut\u00ed <code>SilenceSeconds<\/code> by m\u011bl watchdog zapsat ticho do logu a restartovat Winamp<\/li>\n<\/ol>\n<h2>P\u0159eklad do EXE na Linuxu<\/h2>\n<p>\n    Pokud si chce\u0161 program p\u0159elo\u017eit s\u00e1m, pot\u0159ebuje\u0161 .NET SDK.\n  <\/p>\n<pre style=\"background: #f7f7f7; border: 1px solid #ddd; padding: 16px; border-radius: 10px; overflow-x: auto;\"><code>dotnet restore\ndotnet publish -c Release -r win-x64 --self-contained true \\\n  \/p:PublishSingleFile=true \\\n  \/p:EnableCompressionInSingleFile=true<\/code><\/pre>\n<p>\n    Pro 32bit Windows sta\u010d\u00ed m\u00edsto <code>win-x64<\/code> pou\u017e\u00edt <code>win-x86<\/code>.\n  <\/p>\n<h2>Vytvo\u0159en\u00ed NSIS instal\u00e1toru na Linuxu<\/h2>\n<p>\n    Pokud m\u00e1\u0161 v projektu p\u0159ipraven\u00e9 skripty pro build instal\u00e1tor\u016f, nejjednodu\u0161\u0161\u00ed postup je:\n  <\/p>\n<pre style=\"background: #f7f7f7; border: 1px solid #ddd; padding: 16px; border-radius: 10px; overflow-x: auto;\"><code>bash build-installers.sh<\/code><\/pre>\n<p>\n    T\u00edm vzniknou instala\u010dn\u00ed bal\u00ed\u010dky pro ob\u011b architektury.\n  <\/p>\n<hr style=\"margin: 40px 0; border: none; border-top: 1px solid #ddd;\">\n<h2>Sta\u017een\u00ed instal\u00e1tor\u016f<\/h2>\n<p>\n    Pokud chce\u0161 jen hotovou verzi bez kompilace, st\u00e1hni instal\u00e1tor podle architektury syst\u00e9mu:\n  <\/p>\n<ul>\n<li>\n      <strong>32bit verze:<\/strong><br>\n      <a href=\"https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/x86\/setup.exe\"><br>\n        https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/x86\/setup.exe<br>\n      <\/a>\n    <\/li>\n<li>\n      <strong>64bit verze:<\/strong><br>\n      <a href=\"https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/amd64\/setup.exe\"><br>\n        https:\/\/www.tuxik.cz\/pub\/winampaudiowatchdog\/amd64\/setup.exe<br>\n      <\/a>\n    <\/li>\n<\/ul>\n<p style=\"color: #666; font-size: 0.95em; margin-top: 28px;\">\n    WinampAudioWatchdog je voln\u011b pou\u017eiteln\u00fd n\u00e1stroj ur\u010den\u00fd hlavn\u011b pro dohled nad<br>\n    p\u0159ehr\u00e1v\u00e1n\u00edm streamu na Windows stroj\u00edch, kde je d\u016fle\u017eit\u00e9 hl\u00eddat skute\u010dn\u00fd audio v\u00fdstup.\n  <\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>WinampAudioWatchdog Mal\u00fd watchdog pro Windows, kter\u00fd hl\u00edd\u00e1 skute\u010dn\u00fd audio v\u00fdstup p\u0159es WASAPI loopback. Kdy\u017e je na v\u00fdstupu del\u0161\u00ed dobu ticho, automaticky restartuje Winamp. Sta\u017een\u00ed K dispozici jsou hotov\u00e9 instal\u00e1tory pro 32bit i 64bit Windows: St\u00e1hnout 32bit verzi St\u00e1hnout 64bit verzi &hellip; <a href=\"https:\/\/www.tuxik.cz\/?p=518\">Cel\u00fd p\u0159\u00edsp\u011bvek <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-518","post","type-post","status-publish","format-standard","hentry","category-nezarazene"],"_links":{"self":[{"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/posts\/518","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=518"}],"version-history":[{"count":1,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/posts\/518\/revisions"}],"predecessor-version":[{"id":521,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=\/wp\/v2\/posts\/518\/revisions\/521"}],"wp:attachment":[{"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tuxik.cz\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}