Slow/Choppy stream for small videos

Hello friends,

So question for you concerning my peertube instance. I’ve got a good mix of large and small videos and the large videos stream really well. But I’ve got small videos that are super choppy. Most of my small videos are private that I share with family and the response is generally that the videos are « choppy ».

I’ve got a public video that can demonstrate the issue here: Hate Dept @ Brass Rail, Fort Wayne Indiana December 15 2013 - Fedi Vidi

If you download the video, it’s super fast. If you watch any of the longer public videos, they are stream great as well. No idea what i can change to avoid this. Are there more controls I can adjust somewhere concerning small(short/size) streaming rates?

My setup is I have a separate nginx web proxy front ending my dedicated peertube server.

Can you show us the nginx proxy config?
The download seems really really slow (about 120kbps from where I am, in France). Are the rate limit parameters in the nginx config correct?
See these lines:

Hello,

Enabling HLS in the admin should fix your issue. See PeerTube documentation

I do not have any of the rate limiting enabled in my nginx config.

server {
  listen 443 ssl http2;
  server_name vid.garwood.io;

  ssl_certificate /etc/letsencrypt/live/vid.garwood.io/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/vid.garwood.io/privkey.pem;

  ssl_protocols TLSv1.2;
  ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384;
  ssl_prefer_server_ciphers on;
  ssl_session_timeout  10m;
  ssl_session_cache shared:SSL:10m;
  ssl_stapling on; # Requires nginx >= 1.3.7
  ssl_stapling_verify on; # Requires nginx => 1.3.7
  ssl_trusted_certificate ssl/lets-encrypt-x3-cross-signed.pem;
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

  gzip on;
  gzip_types text/css application/javascript;
  gzip_vary on;

  access_log /var/log/nginx/vid.garwood.io.access.log;
  error_log /var/log/nginx/vid.garwood.io.error.log;

  location ^~ '/.well-known/acme-challenge' {
    default_type "text/plain";
    root /var/www/certbot;
  }

  location / {
    proxy_pass http://vid.fi.garwood.local:9000;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    client_max_body_size 8G;

    proxy_connect_timeout       600;
    proxy_send_timeout          600;
    proxy_read_timeout          600;
    send_timeout                600;
  }

  # Websocket tracker
  location /tracker/socket {
    proxy_read_timeout 1200s;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
    proxy_http_version 1.1;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;
    proxy_pass http://vid.fi.garwood.local:9000;
  }

  location /socket.io {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Host $host;

    proxy_pass http://vid.fi.garwood.local:9000;

    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
  }

}

server {
    if ($host = vid.garwood.io) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


  listen 80;
  server_name vid.garwood.io;
    return 404; # managed by Certbot
}

I actually enabled this a few days ago and when I review the peertube log, I see some video’s are fragmented when played and others are not. Do I need to manually re-encode these?

Thanks for helping me review my issue. I’ve made a small financial contribution to offset my interruption. <3 Peertube.

Yep. You can use CLI tools guide | PeerTube documentation or wait v4 that will have an option in admin to run transcoding jobs.

Thanks!

1 « J'aime »

Thanks @Chocobozzz. Working exactly how I’d expect it now. I’m currently transcoding all of my videos.