Changes between Version 11 and Version 12 of StreamingGuide


Ignore:
Timestamp:
Jun 29, 2012, 3:36:22 PM (4 years ago)
Author:
saste
Comment:

Add a section showing a simple RTP streaming example.

Legend:

Unmodified
Added
Removed
Modified
  • StreamingGuide

    v11 v12  
    4949== Latency == 
    5050You can decrease latency by specify that I-frames come "more frequently" (or always, in the case of x264's zerolatency), though this can increase frame size/decrease quality, see [http://mewiki.project357.com/wiki/X264_Encoding_Suggestions here] for alternatives. 
     51 
     52== Streaming a simple RTP audio stream from ffmpeg == 
     53 
     54FFmpeg can stream a single stream using the RTP protocol. In order to avoid buffering problems on the other hand, the streaming should be done through the -re option, which means that the stream will be streamed in real-time. 
     55 
     56For example the following command will generate a signal, and will stream it to the port 1234 on localhost: 
     57{{{ 
     58ffmpeg -re -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -f mulaw -f rtp rtp://127.0.0.1:1234 
     59}}} 
     60 
     61To play the stream with ffplay, run the command: 
     62{{{ 
     63ffplay rtp://127.0.0.1:1234 
     64}}}