- MULTI_hun_MX-antix.png (66.25 KiB) Megtekintve 46831 alkalommal
- nosplayer_eng_MX-antix.png (14.03 KiB) Megtekintve 46831 alkalommal
Kód: Egész kijelölése
"$@"
Kód: Egész kijelölése
cant do anything
Kód: Egész kijelölése
#!/bin/bash
###nosplayer.sh based on only ffmpeg############
###y2023m01d14########################
###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
jeeee="$((1 + $RANDOM % 37963))"
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
xmessage -title "PLease" "PLease Wait...." -center &
pidrem=$!
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
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpulse-AudioVideo";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
elif [[ "$(pidof pipewire-pulse)" != "" ]];then
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpipewire-AudioVideo";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f xv -vf scale=600:-1 "ffmpegTv";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
fi
elif [[ "$bemenet" == "VA" ]];then
if [[ "$(pidof pulseaudio)" != "" ]];then
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpulse-AudioVideo";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
elif [[ "$(pidof pipewire-pulse)" != "" ]];then
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f pulse default -f xv -vf scale=600:-1 "ffmpegTvpipewire-AudioVideo";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; 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"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f alsa default -f xv -vf scale=600:-1 "ffmpegTv";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
fi
elif [[ "$bemenet" == "V" ]];then
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f opengl -vf scale=600:-1 "ffmpegTv-VideoOnly-OpenGL";} &
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
sleep 25
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
else
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" -b:v 1M -f avi - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt | { sleep 15; ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 16M -re -i - -f xv -vf scale=600:-1 "ffmpegTv-VideoOnly";} &
sleep 25
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
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 6
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
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 6
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
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 6
if ps -p "$pidder" > /dev/null ;then
kill -15 "$pidrem"
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>"
gtkdialog --program=MAIN_DIALOG --center
else
echo "not started"
fi
fi
else
kill -15 "$pidrem"
echo "cant do anything"
fi
exit 0
Kód: Egész kijelölése
#!/bin/bash
###nosplayer.sh based on only ffmpeg############
###y2023m01d15########################
###usage: ./nosplayer.sh "inputfile_or_inputstream"####
###thanks to KuLuSz for help!#################
NP=NosPlayer
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))"
jeeee="$((1 + $RANDOM % 37963))"
tmpjukka="$(echo $jeeee)"
tmpf="$HOME/${tmpjukka}nosplayer.log"
echo -n "Check input file:" > "$tmpf"
jukka="$(echo $jeeee)"
export MAIN_LOG="<window title=\"$NP\" icon-name=\"gtk-disconnect\" resizable=\"true\"><vbox>
<edit auto-refresh=\"true\">
<height>150</height>
<width>500</width>
<input file>$tmpf</input>
</edit>
</vbox></window>"
gtkdialog -pc MAIN_LOG &
pidome=$!
piddeg="$(echo "$pidome" > "$HOME"/"$jukka"pideges.txt)"
pidrem="$(cat "$HOME"/"$jukka"pideges.txt)"
in="$(ffmpeg -i "${@}" -user_agent "${array[$index]}" 2>&1 | grep -o "\-\-enable\-opengl\|Video: \|Audio: " | cut -c1 | tr -d '\n')"
bemenet="$(cut -f2 -d- <<< "$in")"
if [[ -z "$(grep "A\|V" <<< "$bemenet")" ]];then
echo " failed" >> "$tmpf"
echo "Input file not contain audio or video data stream.
usage:
./$(basename $0) \"inputfile or inputstream\"
exiting..." >> "$tmpf"
sleep 4 && kill -9 "$pidrem" && rm "$HOME"/"$jukka"pideges.txt && rm "$tmpf" && exit 1
else
echo " ok" >> "$tmpf"
fi
echo -n "Check ffmpeg opengl support:" >> "$tmpf"
display="xv"
if [[ "${in:0:1}" == "-" ]];then
echo " ok" >> "$tmpf"
echo -n "Check system opengl support: " >> "$tmpf"
VCARD="$(glxinfo | grep "Device" | sed "s/ ([0-9]x[a-z0-9]*)//" | cut -f6- -d' ')"
OGL="$(glxinfo | grep "L re" | grep -i "$VCARD" | cut -f4- -d' ')"
if [[ "$VCARD" == "$OGL" ]];then
display="opengl"
echo " ok" >> "$tmpf"
else
echo " failed" >> "$tmpf"
fi
else
echo " failed" >> "$tmpf"
fi
echo "Graphycal driver: $display" >> "$tmpf"
sound_server="alsa"
[[ "$(pidof pulseaudio)" != "" ]]&& sound_server="pulse"
[[ "$(pidof pipewire-pulse)" != "" ]]&& PIPEWIRE="pipewire-" && sound_server="pulse"
echo "Sound system: $sound_server" >> "$tmpf"
echo "
Please wait..." >> "$tmpf"
video_option="-b:v 1M -f avi"
if [[ "$bemenet" == "AV" ]] || [[ "$bemenet" == "VA" ]];then
output="-f $sound_server default -f $display"
title="-audio/video"
elif [[ "$bemenet" == "V" ]];then
output="-f $display"
title="-video only"
elif [[ "$bemenet" == "A" ]];then
video_option=
output="-f $sound_server default"
title="-audio only"
else
kill -9 "$pidrem" && rm "$HOME"/"$jukka"pideges.txt && rm "$tmpf"
exit 1
fi
if [[ "$(grep "V" <<< "$bemenet")" ]];then
juk="$(echo $jeeee)"
(ffmpeg -hide_banner -i "${@}" -user_agent "${array[$index]}" $video_option - & echo $! >&3 ) 3> "$HOME"/"$juk"pideges.txt |
{ sleep 15 && ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 32M -re -i - $output -vf scale=600:-1 "ffmpegTv-$PIPEWIRE$sound_server-$display$title";} &
export pidder="$(cat "$HOME"/"$juk"pideges.txt)"
sleep 20
else
"$TERM" "$kapcsolo" ffmpeg -hide_banner -rtbufsize 1G -thread_queue_size 32M -i "${@}" -user_agent "${array[$index]}" $output &
kill -9 "$pidrem" && rm "$HOME"/"$jukka"pideges.txt && rm "$tmpf"
fi
if [[ "$pidder" != "" ]];then
if ps -p "$pidder" > /dev/null ;then
kill -9 "$pidrem" && rm "$HOME"/"$jukka"pideges.txt && rm "$tmpf"
export MAIN_DIALOG="
<window title=\"$kuka\" icon-name=\"gtk-disconnect\" resizable=\"true\">
<vbox width-request=\"100\" height-request=\"20\">
<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>
<hbox>
<button><input file stock=\"gtk-quit\"></input><label>$(gettext 'QUIT')</label></button>
</hbox>
</vbox></window>"
gtkdialog --program=MAIN_DIALOG --center
rm "$HOME"/"$juk"pideges.txt
fi
fi
Kód: Egész kijelölése
#!/bin/sh
A=''
while [ -z "$A" ];do
echo "Fő ciklus"
CNT=0
while [ -z "$A" ] && [ "$CNT" -lt "5" ];do
((CNT++))
read -s -n 1 -t 1 A
echo "Al ciklus számláló: $CNT , gomb: $A"
done
done
echo "Fő ciklus vége"