0
Long story short; I'm running this command to stream a forever growing audio file audio.mpg
into ffmpeg
tail -F audio.mp3 | ffmpeg -i - http://127.0.0.1:8090/feed1.ffm
audio.mp3
is being SSH'd from another server which has a capture device feeding the data through.
This is working correctly, however audio.mp3
is constantly growing, and all I really need is to send the tail mp3
data to ffmpeg
in order encode and send it to ffserver
on the same machine.
Is there a command I can run to output tail -F and also remove the outputted data from audio.mp3
.
In essence, I want to put a 1MB limit on the file size of audio.mp3
Thanks in advance
1(1) Rather than
cat < my_pipe | ffmpeg -i - http://127.0.0.1:8090/feed1.ffm
, you could sayffmpeg -i - http://127.0.0.1:8090/feed1.ffm < my_pipe
or< my_pipe ffmpeg -i - http://127.0.0.1:8090/feed1.ffm
. (2) When the process that writes data has completed, an EOF will appear in the pipe, andffmpeg
should terminate, just as it would if it were reading from an ordinary file. You shouldn’t need Ctrl+C. – Scott – 2013-10-16T00:25:50.507good point, ty. – MariusMatutiae – 2013-10-16T04:23:39.620
Thanks Marius, I never knew FIFO's existed, but upon searching about them, I can see how handy they can be! – Moe – 2013-10-16T12:19:59.623
They are used for inter-process communication, of which this is but a simple example. There are spiffier ones. – MariusMatutiae – 2013-10-16T12:58:15.193