On Mon, 16 Mar 2015, Tim Beyer wrote:
thanks for that! One problem is still consistent - when I reattach to that
window, how can I deattach again? The while loop always kicks me back into
the process - I can't end it with "q", neither can I deattach with "ctrl+a
and d" or "ctrl+c".
Why do you need the while loop? Try getting rid of it.
And it's not kicking you "back" into the process, it's creating a new one. You
may have hundreds of sessions running by now.:)
(screen -list)
Btw, they don't like the top posting on this list.
#!/bin/bash
# Start the screen (w/one shell window) but instantly detach it
screen -dmS vod
for file in $(ls * | shuf -n 1)
do
# For each file, create a window in the running screen,
# named with the filename, and running the ffmpeg command
screen -S vod -X screen -h 0 -t "$file" \
ffmpeg -re -i "$file" \
-acodec copy -vcodec copy -f flv ServerAddress
done
# Delete the useless shell in the first screen window
screen -S vod -p 0 -X kill
# Attach to the screen for actual access of the running processes
screen -r vod
_______________________________________________
ffmpeg-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-user