| | 51 | |
| | 52 | == Streaming a simple RTP audio stream from ffmpeg == |
| | 53 | |
| | 54 | FFmpeg 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 | |
| | 56 | For example the following command will generate a signal, and will stream it to the port 1234 on localhost: |
| | 57 | {{{ |
| | 58 | ffmpeg -re -f lavfi -i aevalsrc="sin(400*2*PI*t)" -ar 8000 -f mulaw -f rtp rtp://127.0.0.1:1234 |
| | 59 | }}} |
| | 60 | |
| | 61 | To play the stream with ffplay, run the command: |
| | 62 | {{{ |
| | 63 | ffplay rtp://127.0.0.1:1234 |
| | 64 | }}} |