Üdv!
Na szóval KuLuSz-szal fogadtunk, hogy nem lehet az ffmpeg-et mint önmagát lejátszásra használni. Ő azt állította lehet én azt, hogy nem. És azért, hogy bebizonyítsam nincs igazam, igen jól írom, hogy bebizonyítsam, hogy nincs igazam elkezdtem próbálkozni, hogy kizárjak mindent és megnyugodhassak ha tényleg nem lehetne lejátszásra használni. Mivel régebben volt már ezzel próbálkozásom a képernyő streamelő szkriptem keretében így nagyjából nem volt ismeretlen a terep. Előre szólok a szkriptjeim redundánsak, és hozzáértő szemmel sem szemantikailag sem máshogy nem rendezett. Nekem egy szempont volt a lényeg: működjön. A következő szkripteket MX Linux alatt is teszteltem, ott is jól működtek. S ha jól gondolom akkor antix alatt is van gtkdialog, ott is működnie kell. Előre szólok, hogy sajátos változónevekkel dolgozok, errre csípőből rávághatná egy szakember, hogy nem megfelelő - tisztában vagyok vele, nekem viszont így könnyebb volt megírni működőre. Természetesen akinek kedve, tudása, ideje van átírni, szíve joga. Nekem már így is megfelelnek ezek a szkriptek. Az egyik a MULTI nevű az adni fogja magát hogy kell használni, és az csak magyar nyelvű. A nosplayer viszont emlékeim szerint angol, de még az is lehet hogy hibrid - hunglish vagy nyomokban magyart is tartalmazhat.
Ja és még valami, modern ffmpegekhez készült amelyek támogatják az -user_agent kapcsolót, és már most biztosra veszem, hogy lesz akinél meg se nyikkannak. Pedig itt a kód. Ugyan bizonyítani nem tudom, hogy ez a kód fut nálam is rendben amit itt megosztok, de nem is akarom. Semmi célom nincs hazugságokat állítani azzal közvetve is csak magammal szúrnék ki. Ennek ellenére biztos lesz olyan gép amin nem fog rendesen futni a nevezett rendszerek ellenére sem a szkript - miért? - Ki tudja.... Szóval nálam így áll most a két szkript:
MULTI_hun_MX-antix.sh
Kód: Egész kijelölése
#!/bin/bash
if [[ -d "$HOME/MULTI" ]];then
echo "1"
else
mkdir -p "$HOME/MULTI"
fi
if [[ ! -f "$HOME/MULTI/func.sh" ]];then
echo "#!/bin/bash
findcar(){
[ -z \"\$TIPUS\" ]&& TIPUS=\".*\"
grep -i \"\$TIPUS\" \"\$CURDLL\"/PET.txt > \"\$HOME\"/MULTI/PET.txt
}
delline(){
rumlerajw=\"\$(grep \"\$gel\" \"\$CURDLL\"/PET.txt)\"
[ \"\$(grep \"\$gel\" \"\$CURDLL\"/PET.txt)\" -a \"\$gel\" ]&& sed -i -e \"s,.*\${rumlerajw},,g ; /^\$/d\" \"\$CURDLL\"/PET.txt && cp -f \"\$CURDLL\"/PET.txt \"\$HOME\"/MULTI/PET.txt
}
addline(){
grep -i \"\$TIPUS\" \"\$CURDLL\"/PET.txt > \"\$HOME\"/MULTI/PET.txt
[ ! \"`grep -i \"\$TIPUS\" \"\$CURDLL\"/PET.txt`\" -a \"\$TIPUS\" -a \"\$RSZ\" ]&& echo \"\$TIPUS|\$RSZ\" >> \"\$CURDLL\"/PET.txt
}
edit (){
ENAME=\"\$(grep \"\$2\" \"\$3\" | cut -f1 -d\"|\")\"
EURL=\"\$(grep \"\$2\" \"\$3\" | cut -f2 -d\"|\")\"
export MD_EDIT='
<window title=\"Stream for fofi8 player v3.0\" resizable=\"true\">
<vbox width-request=\"500\">
<frame Stream URL>
<hbox>
<text><label>Stream vagy fájl neve a listához:</label></text>
<entry> <default>'\$ENAME'</default> <variable>NAME1</variable> </entry>
</hbox>
<hbox>
<entry> <default>'\$EURL'</default> <variable>URL1</variable> </entry>
</hbox>
</frame>
<hbox homogeneous=\"true\">
<button><label>Vissza</label> </button>
<button><label>Mentés</label> </button>
</hbox>
</vbox>
</window>'
eval \$(gtkdialog --program=MD_EDIT --center)
if [[ \"\$EXIT\" == \"Mentés\" ]];then
sed -i -e \"s,\${ENAME}|\${EURL},\${NAME1}|\${URL1},g\" \"\$3\" && cp -f \"\$CURDLL\"/PET.txt \"\$HOME\"/MULTI/PET.txt
fi
}
fot(){
rumleraj=\"\$(cat \"\$HOME\"/MULTI/PET.txt | grep -i \"\$gel\" | cut -d\"|\" -f2)\"
\"\$PLAYER_RPGq\" \"\$rumleraj\" &
}
if [[ \"\$1\" == \"findcar\" ]];then
findcar \"\$@\"
elif [[ \"\$1\" == \"delline\" ]];then
delline \"\$@\"
elif [[ \"\$1\" == \"edit\" ]];then
edit \"\$@\"
elif [[ \"\$1\" == \"addline\" ]];then
addline \"\$@\"
elif [[ \"\$1\" == \"fot\" ]];then
fot \"\$@\"
fi
" > "$HOME"/MULTI/func.sh && chmod +x "$HOME"/MULTI/func.sh
else
echo "van"
fi
export CURDLL="$(dirname $0)"
gel=""
if [[ -f "$CURDLL/PET.txt" ]];then
echo "van PET.txt"
else
xmessage -title "Nincs PET.txt" -buttons Ok:0,Cancel:1 -default Ok -nearmouse "Nincs PET.txt fájl!
Kérlek hozz létre ezen szkript mellé egy PET.txt fájlt,
melyben egymás alá eltárolod a linkeket!
De én most létrehoztam egyet, kérlek szerkeszd annak mintájára!
Hajrá ;)
" &
export lista="EPER|http://radio.elte.hu:8000/eper97
"
printf "$lista" > "$CURDLL"/PET.txt &
fi
for progq in fofi nosplayer ffplay defaultmediaplayer vlc smplayer gnome-mplayer gui_mpv gmplayer;do
[[ $(which "$progq") ]]&& DLG_PROGSq=" $DLG_PROGSq
<item>$progq</item>
"
done
cp "$CURDLL"/PET.txt "$HOME"/MULTI/PET.txt
export MD='<window title="MULTI.sh for nosplayer" resizable="true">
<vbox width-request="600" height-request="500">
<hbox>
<entry><variable>TIPUS</variable>
<action>'$HOME'/MULTI/func.sh findcar</action></entry>
<entry><variable>RSZ</variable></entry>
<text><label>Grafikus Lejátszó:</label></text>
<combobox width-request="140">
'$DLG_PROGSq'
<variable>PLAYER_RPGq</variable>
</combobox>
<button>
<label>Hozzáad</label>
<action>'$HOME'/MULTI/func.sh addline</action>
</button>
<button><label>Eltávolítás</label>
<variable>RM_BTN</variable>
<action>'$HOME'/MULTI/func.sh delline</action>
<action>refresh:'$HOME'/MULTI/func.sh gel</action>
</button>
<button><label>Szerkeszt</label>
<action>'$HOME'/MULTI/func.sh edit $gel '"$CURDLL"'/PET.txt</action>
<action>refresh:'$HOME'/MULTI/func.sh gel</action>
</button>
</hbox>
<tree auto-refresh="true">
<label>Neve|Hivatkozas</label>
<input file>'$HOME'/MULTI/PET.txt</input>
<variable>gel</variable>
<action>'$HOME'/MULTI/func.sh fot</action>
</tree>
</vbox></window>'
gtkdialog -pc MD
nosplayer_eng_MX-antix.sh
Kód: Egész kijelölése
#!/bin/bash
###nosplayer.sh based on only ffmpeg############
###y2023m01d12########################
###usage: ./nosplayer.sh "inputfile_or_inputstream"####
###thanks to KuLuSz for help!#################
export kuka="$@"
if [[ $(which lxterminal) ]];then
TERM="lxterminal"
kapcsolo="-e"
elif [[ $(which urxvt) ]];then
TERM="urxvt"
kapcsolo="-e"
elif [[ $(which rxvt) ]];then
TERM="rxvt"
kapcsolo="-e"
elif [[ $(which xterm) ]];then
TERM="xterm"
kapcsolo="-e"
elif [[ $(which xfce4-terminal) ]];then
TERM="xfce4-terminal"
kapcsolo="-x"
fi
array[0]="Nokia5310XpressMusic/2.0 (10.10) Profile/MIDP-2.1 Configuration/CLDC-1.1"
array[1]="Lavf54.3.100"
array[2]="Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-A320F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/5.4 Chrome/51.0.2704.106 Mobile Safari/537.36"
array[3]="Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36"
array[4]="Nokia5310XpressMusic/2.0 (10.10) Profile/MIDP-2.1 Configuration/CLDC-1.1 UCWEB/2.0 (Java; U; MIDP-2.0; ru; Nokia5310XpressMusic) U2/1.0.0 UCBrowser/9.5.0.449 U2/1.0.0 Mobile UNTRUSTED/1.0"
array[5]="NokiaC2-01/5.0 (11.40) Profile/MIDP-2.1 Configuration/CLDC-1.1 UCWEB/2.0 (Java; U; MIDP-2.0; en-US; nokiac2-01) U2/1.0.0 UCBrowser/8.9.0.251 U2/1.0.0 Mobile UNTRUSTED/1.0"
array[6]="Mozilla/5.0 (X11; Linux x86_64; rv:108.0) Gecko/20100101 Firefox/108.0"
array[7]="Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG-SM-G935A Build/MMB29M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/97.0.4692.98 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/350.1.0.29.106;]"
array[8]="Mozilla/5.0 (Mobile; Windows Phone 8.1; Android 4.0; ARM; Trident/7.0; Touch; rv:11.0; IEMobile/11.0; NOKIA; Lumia 928) like iPhone OS 7_0_3 Mac OS X AppleWebKit/537 (KHTML, like Gecko) Mobile Safari/537"
size="${#array[@]}"
index="$(($RANDOM % $size))"
#echo "${array[$index]}"
#exit 1
bemenet="$(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" 2>&1 | grep -o "Video: \|Audio: " | sed 's/([^)]*)//g' | grep -o "Video\|Audio" | grep -o "A\|V" | tr -d '\n')"
if [[ "$bemenet" == "AV" ]];then
if [[ "$(pidof pulseaudio)" != "" ]];then
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f opengl -vf scale=600:-1 "ffmpegTv-pulse-AudioVideo-OpenGL";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpulse-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
elif [[ "$(pidof pipewire-pulse)" != "" ]];then
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f opengl -vf scale=600:-1 "ffmpegTv-pipewire-AudioVideo-OpenGL";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpipewire-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3>"$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f opengl -vf scale=600:-1 "ffmpegTv-OpenGL-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f xv -vf scale=600:-1 "ffmpegTv";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
fi
elif [[ "$bemenet" == "VA" ]];then
if [[ "$(pidof pulseaudio)" != "" ]];then
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f opengl -vf scale=600:-1 "ffmpegTv-pulse-AudioVideo-OpenGL";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpulse-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
elif [[ "$(pidof pipewire-pulse)" != "" ]];then
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f opengl -vf scale=600:-1 "ffmpegTv-pipewire-AudioVideo-OpenGL";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpipewire-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3>"$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f opengl -vf scale=600:-1 "ffmpegTv-OpenGL-AudioVideo";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f xv -vf scale=600:-1 "ffmpegTv";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
fi
elif [[ "$bemenet" == "V" ]];then
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f opengl -vf scale=600:-1 "ffmpegTv-VideoOnly-OpenGL";} &
export pidder="$(cat "$HOME"/pideges.txt)"
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
(ffmpeg -hide_banner -re -i "${@}" -user_agent "${array[$index]}" -b:v 2M -f flv - & echo $! >&3 ) 3> "$HOME"/pideges.txt | { sleep 5 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f xv -vf scale=600:-1 "ffmpegTv-VideoOnly";} &
export pidder="$(cat "$HOME"/pideges.txt)"
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
fi
elif [[ "$bemenet" == "A" ]];then
pidder=""
if [[ "$(pidof pulseaudio)" != "" ]];then
"$TERM" "$kapcsolo" ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -i "${@}" -user_agent "${array[$index]}" -f pulse default &
export pidder=$!
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
echo "not started"
fi
elif [[ "$(pidof pipewire-pulse)" != "" ]];then
pidder=""
"$TERM" "$kapcsolo" ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -i "${@}" -user_agent "${array[$index]}" -f pulse default &
export pidder=$!
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
echo "not started"
fi
else
pidder=""
"$TERM" "$kapcsolo" ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -i "${@}" -user_agent "${array[$index]}" -f alsa default &
export pidder=$!
sleep 3
if ps -p "$pidder" > /dev/null ;then
ICONSETSGUI8=""
ICONSETSGUI8="$ICONSETSGUI8
<hbox>
<button>
<label>STOP: $pidder</label>
<action>kill -9 $pidder</action>
</button>
<frame Process>
<text>
<label>nothing</label>
<input>ps -p $pidder</input>
<variable>nocsakdokk</variable>
</text>
<timer milliseconds=\"true\" interval=\"3000\" visible=\"false\">
<action>refresh:nocsakdokk</action>
</timer>
</frame>
</hbox>
"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
${ICONSETSGUI8}
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox>
</window>"
eval `gtkdialog --program=MAIN_DIALOG --center`
else
echo "not started"
fi
fi
else
echo "cant do anything"
fi
exit 0
Ne felejtsük a létrehozott szkritpteket futtathatóvá tenni!
MINDIG MINDEN ESETBEN ELŐSZÖR RAM VAGY LIVE ÉLŐ MÓDBAN TESZTELJÜNK!!!