Changes between Version 63 and Version 64 of StreamingGuide


Ignore:
Timestamp:
Jan 3, 2014, 9:59:22 PM (6 years ago)
Author:
rogerdpack
Comment:

my example

Legend:

Unmodified
Added
Removed
Modified
  • StreamingGuide

    v63 v64  
    213213   ffmpeg -i INPUT -f mpegts udp://host:port
    214214
    215 If you run into packet loss (since UDP is not guaranteed delivery, this might occur) first make sure your FFmpeg is compiled with pthreads support enabled (if it is, then it uses a separate thread to receive from the UDP port, which can cause less packet loss).  You can tell that it is by specifying a url like udp://host:post?fifo_size=10000 (if it accepts fifo_size, then you're good to go).  Similarly, for mplayer, you can use mplayer ffmpeg://udp://host:port?fifo-size=XXX for possibly better results on the receiving end.
     215If you run into packet loss (since UDP is not guaranteed delivery, this might occur) first make sure your FFmpeg is compiled with pthreads support enabled (if it is, then it uses a separate thread to receive from the UDP port, which can cause less packet loss).  You can tell that it is by specifying a url like udp://host:post?fifo_size=10000 (if it accepts fifo_size, then you're good to go).  Similarly, for mplayer, you can use mplayer ffmpeg://udp://host:port?fifo_size=XXX for possibly better results on the receiving end.  Alternatively, increase your buffer size, like mplayer ffmpeg://udp://host:port?buffer_size=10000000 (the default is 65K which is far too low for any reasonable transmission.
    216216
    217217Another option is to use some transmission type that uses TCP for your transport. (The rtmp protocol, popular in streaming to servers, uses TCP probably for this reason--you just can't use that for point to point streaming).
     
    250250See also the section on i-frames in [#Latency].
    251251
     252Final working p2p client, with multicast:
     253
     254server:
     255
     256ffmpeg -f dshow  -framerate 20 -i video=screen-capture-recorder -vf scale=1280:720 -vcodec libx264 -pix_fmt yuv420p -tune zerolatency -preset ultrafast -f mpegts udp://236.0.0.1:2000
     257
     258client:
     259
     260mplayer -demuxer +mpegts -framedrop -benchmark ffmpeg://udp://236.0.0.1:2000?fifo_size=100000&buffer_size=10000000
     261
    252262== External links ==
    253263