Hello Victor,
I have a bash script for OpenVPN, that I was wondering if it could be converted to run ffmpeg inside yad the same way as OpenVPN?
I've been trying to make this work, but without sucess, I'm assuming this should work the same way, since both applications run in a termianl.
function confirm_close () {
yad --title="OpenVPN Shutdown" --window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png" \
--center --width="360" --height="100" --image="dialog-question" \
--text="Click 'OK' To Shutdown OpenVPN\nClick 'Cancel' to Keep OpenVPN Running"
[[ $? -eq 0 ]] && kill -USR1 $YAD_PID
}
export -f confirm_close
sudo -b openvpn --config /etc/openvpn/openvpn.conf \
--up /home/foo/.config/openbox/vpn_up --down /home/foo/.config/openbox/vpn_dn | \
yad --fontname=Aller --text-info --wrap --fore="#ababab" --back="#264d74" --button="Close:bash -c confirm_close" \
--center --width="700" --height="450" --title="OpenVPN" \
--window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/openvpn.png"
[[ $? -eq 0 ]] && sudo killall openvpn 2>/dev/null
Can this be changed slightly to work?
Thank you very much for your time and help Victor,
I went back looking how my OpenVPN script was created at ticket #84 and noticed after the openvpn cmd was run it had a pipe | placed at the end like below.
But if I do it this way, a terminal and a yad gui both open, I'm not sure how to confine ffmpeg to pipe it's output into yad...
Hmm
function confirm_close () {
yad --title="FFmpeg Close" --window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/avidemux.png" \
--center --width="360" --height="100" --image="dialog-question" \
--text="Click 'OK' To Close FFmpeg\nClick 'Cancel' to Keep FFmpeg Running"
[[ $? -eq 0 ]] && kill -USR1 $YAD_PID
}
export -f confirm_close
ffmpeg -i /home/$USER/Videos/*.mp4 -vcodec copy -af volume=18dB /home/$USER/Videos/FFmpeg_output/1.mp4 |
yad --fontname=Aller --text-info --wrap --fore="#ababab" --back="#264d74" --button="Close:bash -c confirm_close" \
--center --width="700" --height="450" --title="FFMpeg" \
--window-icon="/home/foo/.icons/AwOken/clear/128x128/apps/avidemux.png"
[[ $? -eq 0 ]] && killall ffmpeg 2>/dev/null
Last edit: SourceBugs 2016-08-12
Hello Victor,
I don't mean to bother, I'm trying really hard to figure this out with no success, and I really need your help.
Thank you