[FFmpeg-user] help with ffserver streaming over LAN

John Robinson jrobinsonmedia at gmail.com
Fri Mar 6 19:53:37 CET 2015


I've got two machines on the same local network, both wired via ethernet to my router. I'm trying to stream from my mac mini, to a raspberry pi running xbmc. I've had some success, but the video quality is horrible. I'm using ffmpeg + ffserver on the mini with flv format. Below is how I've set everything up:

FFMPEG:
./ffmpeg -f avfoundation -i "0:1"  http://localhost:8090/feed1.ffm

FFSERVER config:

Port 8090
BindAddress 0.0.0.0
MaxHTTPConnections 50
MaxClients 50
MaxBandwidth 100000
CustomLog -
#NoDaemon

<Feed feed1.ffm>
    File /tmp/feed1.ffm
    #FileMaxSize 20m
    ACL allow 127.0.0.1
</Feed>

# if you want to use mpegts format instead of flv
# then change "live.flv" to "live.ts"
# and also change "Format flv" to "Format mpegts"
<Stream live.flv>
    Format flv
    Feed feed1.ffm
    VideoFrameRate 30
    VideoBitRate 1024
    VideoSize 720x576
    VideoBufferSize 2048  
    AVOptionVideo flags +global_header

    AudioCodec aac
    Strict -2
    AudioBitRate 96
    AudioChannels 2
    AudioSampleRate 44100
    AVOptionAudio flags +global_header
</Stream>

With the above config, I get what looks like decent picture quality, but tons of buffering in xbmc. I don't feel like I'm maxing out bandwidth anywhere, but I could be missing something fundamental (highly likely!). If I take out the "VideoSize" param, I get good sound but super low resolution video. 

If I add a codec, say... libx264 to the ffserver config, everything sort of grinds to a halt. My gut tells me the mini is having a hard time keeping up (it's rather old) but it still doesn't make much sense. Is there a way to increase some buffers somewhere that I'm missing? I would be ok if the xbmc playback was a few seconds behind what's actually on the mini's screen, since this isn't really a time sensitive setup. I've tried reading up on ffserver but I'm just as confused there as I am with ffmpeg.

Thanks!
-JR


More information about the ffmpeg-user mailing list