livestreamer skripta

philips

Guru
Osebje foruma
Administrator
17. avg 2007
9.878
697
113
"livestreamer" komanda se ti ne izvaja v ozadju, zato do spodnje kode, ki prekine program po 20 sekundah, sploh nikoli ne pride.

Poskusi recimo s tem
Koda:
@echo off
set App=notepad.exe
set Delay=10

set killer=%temp%\kill.bat
echo > "%killer%" ping localhost -n %Delay% ^> nul
echo>> "%killer%" tasklist ^| find /i "%App%" ^> nul ^&^& taskkill /f /im %App%
start /b "Timeout" "%killer%"

%App%

Vir: http://social.technet.microsof...-out?forum=ITCG
 

gloglo

Fizikalc
20. maj 2014
1.399
1
36
@echo off
set App=livestreamer -o c:/test.avi httpstream://http://192.168.1.1:1234/udp/239.10.1.11:5000 best
set Delay=10

set killer=%temp%\kill.bat
echo > "%killer%" ping localhost -n %Delay% ^> nul
echo>> "%killer%" tasklist ^| find /i "%App%" ^> nul ^&^& taskkill /f /im %App%
start /b "Timeout" "%killer%"

%App%

takole zgleda, enostavno jo ponovno zažene
 

philips

Guru
Osebje foruma
Administrator
17. avg 2007
9.878
697
113
Daj ukaz za livestreamer v novo .bat skripto in jo poženi kot App. Torej
Koda:
set App=nova_skripta.bat
 

gloglo

Fizikalc
20. maj 2014
1.399
1
36
@echo off
set App=c:/test.bat
set Delay=10

set killer=%temp%\kill.bat
echo > "%killer%" ping localhost -n %Delay% ^> nul
echo>> "%killer%" tasklist ^| find /i "%App%" ^> nul ^&^& taskkill /f /im %App%
start /b "Timeout" "%killer%"

%App%

naredi isto, prekine in takoj zažene z task scedularjem lahko omejiš trajanje skripte vendar bi raje vidu da to naredi v skripti.
2051913-err.jpg
 

Priponke

  • 2051913-err.jpg
    2051913-err.jpg
    58,7 KB · Ogledi: 137