This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
from io import StringIO | |
from lxml import etree | |
SPECIAL_CHARACTERS = { | |
7: 'a', # BELL | |
8: 'b', # BS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *.mp4; do | |
ffmpeg -i "$i" -c:v libx265 -crf 30 -c:a copy -color_primaries bt2020 -colorspace bt2020nc -color_trc arib-std-b67 -map_metadata 0 -max_muxing_queue_size 1024 -n Compressed/${i::-4}.mp4; | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://gitlab.com/openconnect/ocserv.git | |
cd ocserv/ | |
apt install autoconf pkg-config libev-dev libwrap0-dev libpam0g-dev liblz4-dev libseccomp-dev libreadline-dev libnl-route-3-dev libkrb5-dev liboath-dev libradcli-dev libsystemd-dev protobuf-c-compiler gperf libprotobuf-c-dev libtalloc-dev libhttp-parser-dev libpcl1-dev libopts25-dev liblockfile-bin nuttcp lcov libuid-wrapper libpam-wrapper libnss-wrapper libsocket-wrapper gss-ntlmssp libpam-oath autogen | |
sh autogen.sh | |
./configure | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# With Apache | |
# apt install php composer | |
# Without Apache | |
apt install php-fpm composer | |
# Install dependencies | |
apt install php-curl php-xml php-mbstring php-imagick php-mysql | |
# With PostgreSQL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Refer to https://www.v2ray.com/developer/intro/compile.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone '[email protected]:trojan-gfw/trojan.git' | |
sudo apt install cmake default-libmysqlclient-dev libboost-program-options-dev libboost-system-dev libssl-dev | |
# Oops, the boost version shipped with Ubuntu 18.04 is too old for trojan. | |
wget 'https://dl.bintray.com/boostorg/release/1.72.0/source/boost_1_72_0.tar.bz2' | |
tar xvf boost_1_72_0.tar.bz2 -C /usr/local/ | |
cd trojan/ | |
git checkout v1.14.1 | |
cmake -D CMAKE_INSTALL_PREFIX:PATH=/usr/local -D BOOST_ROOT:PATH=/usr/local/boost_1_72_0/ . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Convert HLS stream from m3u8 to MP4 | |
gst-launch-1.0 -v mp4mux name=mux ! filesink location=output.mp4 filesrc location=GOPR7003.m3u8 ! hlsdemux ! decodebin name=decoder decoder. ! queue ! videoconvert ! x264enc ! mux. decoder. ! queue ! audioconvert ! voaacenc ! mux. | |
# Combine normal TS files into MP4 | |
cvlc -v segment-*.ts \ | |
--sout='#gather:file{dst=output.mp4}' \ | |
--sout-keep \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Please refer to the manual section from the site | |
# https://pagure.io/pagure | |
# python3-gdbm is not found in trisquel by default but preinstalled on | |
# ubuntu. | |
sudo apt install python3-dev python3-pip python3-venv python3-gdbm \ | |
libgit2-dev redis-server libjpeg-dev libffi-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mencoder input -o output.mp4 \ | |
-of lavf -lavfopts format=mp4 \ | |
-ovc x264 -x264encopts bframes=0:global_header \ | |
# -ss 5:00 -endpos 5:00 \ | |
-oac lavc -lavcopts acodec=ac3 | |
# NOTE: THE OPTION -ovc copy SIMPLY DOES NOT WORK AND MENCODER CANNOT | |
# USE LIBAVCODEC PROPERLY. DO NOT WASTE TIME ON MENCODER LEARN ffmpeg | |
# INSTEAD. |
NewerOlder