3 ms·
I've actually used ffmpeg + GNU screen to do something very similar in the past. The benefit of using GNU screen is that the "tape" can be a shell script. I su
by taviso 4y ago
I've actually used ffmpeg + GNU screen to do something very similar in the past.
The benefit of using GNU screen is that the "tape" can be a shell script. I suppose if you don't like shell scripts that's not a benefit, but I do like them.
For example, instead of:
Type "echo 'Welcome to VHS!'"
# Pause for dramatic effect...
Sleep 500ms
Enter
With GNU screen, you would write:
#!/bin/sh
screen -d -m -S whatever -- bash
screen -S whatever -X stuff "echo Welcome to screen"
sleep 0.5
screen -S whatever -X stuff $'\n'
If you want to start interacting with the session, just do screen -r whatever
You can also read what is in the screen with -X hardcopy, then do something with the output, like verify the output is correct or adjust the input.
- maaslalani 4y agoThis is actually really cool. Thanks for sharing this!
- ComputerGuru 4y agoWhere/how does ffmpeg come in? How are you connecting screen output to ffmpeg input?
- taviso 4y agoffmpeg can capture an xterm as a source, it's called x11grab.
- ComputerGuru 4y agoTIL! Thanks for sharing! Edit: X11 as a source, not xterm. At least from what I can see.