ffmpeg -fflags +genpts -i infile.mp4 -f srt -i subtitles.srt \
-map 0:0 -map 0:1 -map 1:0 -c:v copy -c:a copy -c:s srt outfile.mkv
-fflags +genpts
necessary if you get Can't write packet with unknown timestamp
errors.
body { | |
color: #333; | |
font-family: Arial, sans-serif; | |
max-width: 7.5in; | |
margin: 0 auto; | |
} | |
a:link, a:visited { | |
color: #1B70D1; | |
text-decoration: none; |
#!/bin/php | |
<?php | |
# | |
# Generate a HTML page showing which extensions are idle and which are busy, together with number dialled | |
# Run this from crontab and redirect stdout to a file in /var/www/html | |
# | |
$Outfile = "/var/www/html/busy.html"; | |
error_reporting(E_ALL & ~E_NOTICE); |
#!/bin/ash | |
# | |
# Track bytes in/out on selected interface | |
# | |
# Run this script once a month/week/day to calculate how much data usage occuring | |
# on given interface | |
# | |
STOR="bwmon.store" | |
STAT_DIR="/sys/class/net/$1/statistics/" |
Retrieve hosted zones with aws route53 list-hosted-zones
then enter the zone Id below:
aws route53 list-resource-record-sets --hosted-zone-id "/hostedzone/xxxxxxxxxxx" | \
jq -r '.ResourceRecordSets[] | [.Name, .Type, (.ResourceRecords[]? | .Value), .AliasTarget.DNSName?] | @tsv'
#!/bin/bash | |
# | |
# Update the ipset that iptables references for allowing/blocking based on country. | |
# Takes 2 parameters: ipset name (no spaces), country name e.g. 'Australia' | |
# | |
# iptables should have an existing '--match-set' rule e.g | |
# $ iptables -I INPUT -p tcp --dport 22 -m set --match-set australia4 src -j ACCEPT | |
# $ ip6tables -I INPUT -p tcp --dport 22 -m set --match-set australia6 src -j ACCEPT | |
# |
sed ':a $!N;s/\n\s*{/ {/;ta P;D' <inputfile>
function()
{
Using ffmpeg-3.1.6-1.fc25.x86_64
on Fedora 25, available from rpmfusion-free repo. It has been built with va-api support.
The following ffmpeg invocation works for me.
ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vaapi_device /dev/dri/renderD128 \
-i input.mkv -vf 'format=nv12,hwupload' -map 0:0 -map 0:1 -threads 4 \
-acodec copy -vcodec h264_vaapi -qp:v 23 \
output.mp4