Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Video/video.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ function exit_on_max_session_reach() {

function stop_ffmpeg() {
while true; do
FFMPEG_PID=$(pgrep -f ffmpeg | tr '\n' ' ')
FFMPEG_PID=$(pgrep -f "ffmpeg -hide_banner" | tr '\n' ' ')
if [ -n "$FFMPEG_PID" ]; then
kill -SIGTERM $FFMPEG_PID
wait $FFMPEG_PID
fi
if ! pgrep -f ffmpeg >/dev/null; then
if ! pgrep -f "ffmpeg -hide_banner" >/dev/null; then
break
fi
sleep ${poll_interval}
Expand All @@ -169,7 +169,7 @@ function stop_recording() {
}

function check_if_ffmpeg_running() {
if pgrep -f ffmpeg >/dev/null; then
if pgrep -f "ffmpeg -hide_banner" >/dev/null; then
return 0
fi
return 1
Expand Down
Loading