Answers.Body: <p>Unless you are on a network that supports multi-cast, the host computer needs to have sufficient bandwidth to send the video data independently to every single viewer.  If you have multiple viewers, this will rapidly overwhelm any slow connection (and your connection, even on the LAN, is exceptionally slow).</p>
  
  <p>What you need is a content delivery network or at least a media server with a sufficiently fast upload speed to feed the desired number of clients.  Your host would then upload to the media server or CDN and the clients would connect to the media server or CDN to get the relayed stream.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-11-20T14:59:51.190Z
Answers.LastActivityDate: 2017-11-20T14:59:51.190Z
Answers.UserDisplayName: AJ Henderson
Body: <p>I am using ffmpeg to stream my desktop. It works perfectly over the LAN with two connected PCs; however, over a WAN, the reciever gets unviewable shearing and tearing of the desktop. We figured it was because the LAN has a 5 MB/s bandwith and the WAN has a bandwidth limitation 1 MB/s. When I checked the ethernet output of the sending PC, the bandwidth was 1 MB/s +/- .02.</p>
  
  <p>The original ffmpeg script I used was within a batch file was:</p>
  
  <pre><code>ffmpeg -f dshow -i video="screen-capture-recorder"-vcodec
  libx264 -preset ultrafast -pix_fmt yuv420p -tune zerolatency -r 30 -b:v 750k -minrate 750k -maxrate 750k  -f mpegts udp://ip:port 
  </code></pre>
  
  <p>On the reciever side: 1. I opened the scream capture recorder GUI. 2. Inserted the appropriate udp address. 3. Hit "Start Recieving".</p>
  
  <p>I did a wireshark analysis and noticed most of the packets I saw were MPEG TS packets with had "MP2T fragment of a reassembled package" in the description column.</p>
  
  <p>My question is: has anyone been able to successful stream via ffmpeg over a wide area network with no issues of the recieving video? If so, what ffmpeg parameters did you use for consistent results?</p>
  
Tags: <ffmpeg>
Title: FFMPEG: Streaming over UDP over Wide Area Network
UserDisplayName: Megan
ThreadText: # FFMPEG: Streaming over UDP over Wide Area Network
  
  (Asked by: username_0 on 2017-11-20)
  
  I am using ffmpeg to stream my desktop. It works perfectly over the LAN with two connected PCs; however, over a WAN, the reciever gets unviewable shearing and tearing of the desktop. We figured it was because the LAN has a 5 MB/s bandwith and the WAN has a bandwidth limitation 1 MB/s. When I checked the ethernet output of the sending PC, the bandwidth was 1 MB/s +/- .02.
  
  The original ffmpeg script I used was within a batch file was:
  
  ```
  ffmpeg -f dshow -i video="screen-capture-recorder"-vcodec
  libx264 -preset ultrafast -pix_fmt yuv420p -tune zerolatency -r 30 -b:v 750k -minrate 750k -maxrate 750k  -f mpegts udp://ip:port 
  
  ```
  
  On the reciever side: 1. I opened the scream capture recorder GUI. 2. Inserted the appropriate udp address. 3. Hit "Start Recieving".
  
  I did a wireshark analysis and noticed most of the packets I saw were MPEG TS packets with had "MP2T fragment of a reassembled package" in the description column.
  
  My question is: has anyone been able to successful stream via ffmpeg over a wide area network with no issues of the recieving video? If so, what ffmpeg parameters did you use for consistent results?
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-11-20. Score: 1
  
  Unless you are on a network that supports multi-cast, the host computer needs to have sufficient bandwidth to send the video data independently to every single viewer. If you have multiple viewers, this will rapidly overwhelm any slow connection (and your connection, even on the LAN, is exceptionally slow).
  
  What you need is a content delivery network or at least a media server with a sufficiently fast upload speed to feed the desired number of clients. Your host would then upload to the media server or CDN and the clients would connect to the media server or CDN to get the relayed stream.
  
  
  ---
  
  