[FFmpeg-user] Using Jon Severinsson's PPA on Ubuntu 14.04, can't detach.
Luke Davis
l1 at newanswertech.com
Mon Mar 16 20:29:59 CET 2015
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
More information about the ffmpeg-user
mailing list