I'm running a centos 6 server (command line only) with ffmpeg and I want to create a script that will switch between a video file and live camera and back again.
what I've done already:
1) I have scripts for both the mp4 video and the live camera that will stream them to red5 server like so:
# etc/init.d/stream start <-- this streams the live cam to red5 media server and it works fine
# /etc/init.d/video start <-- this starts the mp4 video and does the same.
I've also done:
#/etc/init.d/mylist start <-- this starts a file called mylist.txt which plays a set of mp4's in sequence and stream them to red5 server. It works fine and mylist.txt contains this:
Code:
file 'video1.mp4'
file 'video2.mp4'
file 'video3.mp4'
the problem with mylist.txt is it only caters for files and I don't know if it's possible to syntax this file to play a live camera stream for a certain time.
All the above scripts work fine, I just need to work out a way to switch from one to the other. I have done a search on google but couldn't find any examples that did this. Thanks for any help.