Skip to content

Instantly share code, notes, and snippets.

@zue666
zue666 / encode.sh
Created April 24, 2017 00:40 — forked from lisamelton/encode.sh
This is the shell script I use to drive HandBrakeCLI to re-encode video files in a format suitable for playback on Apple TV, Roku 3, iOS, OS X, etc.
#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
root /home/whk/public;
index index.php index.html index.htm;
server_name server_domain_or_IP;
location / {
server {
server_name domain.tld www.domain.tld;
listen 80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name domain.tld www.domain.tld;
ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;
server {
listen 80;
listen [::]:80;
root /home/public;
index index.html index.htm index.php;
server_name localhost;
location / {