QNA > C > Come Trasmettere Un Gioco In Streaming Ad Un Amico Con Un Ritardo Minimo

Come trasmettere un gioco in streaming ad un amico con un ritardo minimo

Ho prima testato alcune diverse opzioni comunemente note per questo:

  • Twitch ha circa 12-15 secondi di ritardo.
  • Hitbox ha circa 5 secondi di ritardo.
  • Steam Broadcasting ha circa 5 secondi di ritardo. Questa è probabilmente l'opzione migliore per la maggior parte delle persone.
  • Google Hangouts e Skype screen sharing non hanno quasi nessun ritardo, ma la compressione che questi programmi usano non è adatta al gioco. Molto probabilmente avrete problemi di framerate con queste soluzioni.

Il miglior risultato che ho trovato è stato quello di trasmettere da OBS in modalità "zerolatency" ad un server RTMP in esecuzione sul computer con cui si visualizza il flusso, e poi visualizzare il flusso utilizzando ffplay (parte del pacchetto ffmpeg) con il flag nobuffer. Usando questa soluzione, ottengo un frame rate piuttosto ragionevole con < 1 secondo di ritardo durante lo streaming su localhost.

Ho trovato più facile impostare la visualizzazione su OS X, e fornirò i passi di configurazione qui sotto. Potete anche trovare le istruzioni per Linux qui. Windows is probably more difficult to set up, but the basic idea is the same.

On the viewing computer:

  • Port forward port 1935 to the viewing machine. You’ll need to look up how to do this for your router.
  • Install homebrew if needed.
  • Install ngnix with the rtmp module (simple web server).
    • brew tap homebrew/nginx
    • brew install nginx-full --with-rtmp-module
  • Install ffmpeg with ffplay.
    • brew install ffmpeg —with-ffplay
  • Add the following to the bottom of /usr/local/etc/nginx/nginx.conf :
  1. rtmp { 
  2. server { 
  3. listen 1935; 
  4. chunk_size 4096; 
  5. application live { 
  6. live on; 
  7. record off; 
  • Restart nginx:
    • sudo nginx -s stop
    • sudo nginx
  • Once the broadcasting computer is streaming, start viewing with:
    • ffplay -fflags nobuffer rtmp://127.0.0.1/live/game
    • I use ffplay and not VLC, because I couldn’t figure out how to disable buffering on VLC.

On the broadcasting computer:

  • Download/Open Open Broadcaster Software.
  • Setup stream on OBS.
  • In settings, change the stream “tune” zerolatency (location of this menu varies).
  • Set the stream type to custom with url “rtmp:///live” with stream key/path of “game”.
    • I’ve found that you need the IPv4 address, not IPv6.
  • Start streaming with OBS.

Di Channing Schnitz

Qual è il grande cambiamento nel telefono OnePlus 8 Pro? :: Quale telefono comprare sotto ₹11000/- con processore Snapdragon?
Link utili