View previous topic :: View next topic |
Author |
Message |
paziu Tux's lil' helper

Joined: 24 Nov 2006 Posts: 78 Location: Phlorida
|
Posted: Wed Sep 29, 2010 6:34 pm Post subject: TIP: ffserver+ffmpeg "repeating" captured stream |
|
|
ffmpeg is able to handle inputs such as device, or file, unfortunately is unable to capture a stream and process it in real-time...
after a day of messing with ffmpeg i thought about pipes (fifo)
mplayer is doing the stream capture job, and feeding a pipe instead of writing to a file,
on the other side of the pipe ffmeg is reading it as it would be a local file, transcoding and feeding ffserver, which is able broadcast the stream(s)...
this can be used to change the destination format of the stream / lower the bandwidth by changing the set of codecs used and/or bitrate, lower the downstream consumed by several simultaneous remote connections - one is enough.
( streaming AVI with ffserver is cool )
to do :
0> configure /etc/ffserver.conf for your result stream(s)
1> create a fifo
2> start ffserver
3> start mplayer and feed the pipe
4> start ffmpeg to transode the stream from the pipe and send it to ffserver
Code: |
# mkfifo fifo
# ffserver&
# mplayer -dumpstream http://10.0.0.198:28080/a.asf -dumpfile fifo
# ffmpeg -loglevel debug -i fifo http://127.0.0.1:8090/feed1.ffm
|
in this example it receives asf stream, ffmpeg sends it to ffserver, which in can broadcast in several different formats ( even several dfifferent at the same time ) -> customize /etc/ffserver.conf
if you get a segmentation fault, use one of the newer SVN snapshots from FFmpeg site instead of ffmpeg-0.6 ( I had to use SVN-r25242 )
hope this helps in your project  |
|
Back to top |
|
 |
cach0rr0 Bodhisattva


Joined: 13 Nov 2008 Posts: 4123 Location: Houston, Republic of Texas
|
Posted: Thu Sep 30, 2010 2:27 am Post subject: |
|
|
Thanks for the write-up. I've moved it to the Documentation topic so that it doesn't get lost with the high volume of other posts in Multimedia. _________________ Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|