linux packaging

this taught me a bit about how:
https://gist.github.com/faleev/3435377

sudo checkinstall –pkgname=x264 –pkgversion=”3:$(./version.sh | \
awk -F'[” ]’ ‘/POINT/{print $4″+git”$5}’)” –backup=no –deldoc=yes \
–fstrans=no –default

Trying this for libvpx. When I try to uninstall it also wants to uninstall a bunch of programs I need.
The following packages will be REMOVED:
colord colord-sensor-argyll gphoto2 gstreamer1.0-plugins-good hplip kamera libgd-tools libgd3 libgphoto2-6 libgraphviz-dev libgvc6
libgvc6-plugins-gtk libmagick++-6.q16-dev libmagick++-dev libmagickcore-6.q16-dev libmagickwand-6.q16-dev libsane libvpx libvpx3
libzbar-dev printer-driver-postscript-hp sane-utils

checkinstall –pkgname=libvpx –pkgversion=”4.1.0″ –backup=no –deldoc=yes \
–fstrans=no –default
checkinstall –pkgname=libvpx3 –pkgversion=”4.1.0″ –backup=no –deldoc=yes \
–fstrans=no –default
apt-get install libmagick++-6.q16-dev libmagick++-dev libmagickcore-6.q16-dev

**** November 2018

needed a new one

just removed the old one and installed the latest for 16.04.5 and it gave me vp9

apache redirect http to https

notes 2021-01-13:
the firewall forwards ALL port 80 to a0 apache
apache only accepts and allows to

commands:
/home/phomlish/certbot/venv3/bin/certbot renew –dry-run
/home/phomlish/certbot/venv3/bin/certbot certonly –webroot -w /usr3/web/http -d homlish.net –dry-run
/home/phomlish/certbot/venv3/bin/certbot certonly –webroot -w /usr3/web/http -d matomo.homlish.net –dry-run
/home/phomlish/certbot/venv3/bin/certbot certonly –webroot -w /usr3/web/http -d matomo.homlish.net –dry-run

root@a0:/usr/local/apache2/conf# ls -1 /etc/letsencrypt/live/
homlish.net
images.homlish.net
joesfigtrees.com
madbuffaloproductions.com
matomo.homlish.net
mydelawaretv.com
mydetv.com
README
secure.homlish.net

root@a0:/usr/local/apache2/conf# cat /etc/letsencrypt/renewal/homlish.net.conf
# renew_before_expiry = 30 days
version = 0.31.0
archive_dir = /etc/letsencrypt/archive/homlish.net
cert = /etc/letsencrypt/live/homlish.net/cert.pem
privkey = /etc/letsencrypt/live/homlish.net/privkey.pem
chain = /etc/letsencrypt/live/homlish.net/chain.pem
fullchain = /etc/letsencrypt/live/homlish.net/fullchain.pem

# Options used in the renewal process
[renewalparams]
account = 143fcb98d222c080f3639f5de51ee07a
server = https://acme-v02.api.letsencrypt.org/directory
authenticator = webroot
rsa_key_size = 4096
[[webroot_map]]
homlish.net = /usr3/web/http
mail.homlish.net = /usr3/web/http
www.homlish.net = /usr3/web/http
www.joesfigtrees.com = /usr3/web/http
blog.homlish.net = /usr3/web/http
mail.joesfigtrees.com = /usr3/web/http
joesfigtrees.com = /usr3/web/http
recipes.homlish.net = /usr3/web/http
pjhiii.homlish.net = /usr3/web/http

and this is all I needed:
root@a0:/usr/local/apache2/conf# cat httpd.conf.80
Listen 10.11.1.200:80


RewriteEngine On
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge [NC]
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}/$1
CustomLog “logs/homlish.net” combinedvhost

Continue reading “apache redirect http to https”

webm – opus

trying to get rid of the opus garbled sound when sending from the v4l2 capture card

started here:
ffmpeg \
-f alsa -thread_queue_size 2048 -channels 2 -channel_layout stereo -i default:CARD=DVC100 \
-c:a libopus -ac 2 -b:a 48k \
-vn -f rtp rtp://10.11.1.96:5118
ffmpeg \
-f alsa -thread_queue_size 2048 -channels 2 -channel_layout stereo -i default:CARD=DVC100 \
-c:a libopus -ac 2 -b:a 48k -vbr off -compression_level 5 \
-vn -f rtp rtp://10.11.1.96:5122
and a gazillion permutations of that

ffmpeg -h encoder=libopus
Encoder libopus [libopus Opus]:
General capabilities: delay small
Threading capabilities: none
Supported sample rates: 48000 24000 16000 12000 8000
Supported sample formats: s16 flt
libopus AVOptions:
-application E…A… Intended application type (from 2048 to 2051) (default audio)
voip E…A… Favor improved speech intelligibility
audio E…A… Favor faithfulness to the input
lowdelay E…A… Restrict to only the lowest delay modes
-frame_duration E…A… Duration of a frame in milliseconds (from 2.5 to 60) (default 20)
-packet_loss E…A… Expected packet loss percentage (from 0 to 100) (default 0)
-vbr E…A… Variable bit rate mode (from 0 to 2) (default on)
off E…A… Use constant bit rate
on E…A… Use variable bit rate
constrained E…A… Use constrained VBR
-mapping_family E…A… Channel Mapping Family (from -1 to 255) (default -1)

Lorenzo told me to try this, but how does it work?
opusrtp – encapsulate Opus audio in RTP
Docs are very light.

our actual goal will be to record a high quality file for making a dvd. Perhaps we can do that and send it as it is being created

starting with low quality:
ffmpeg -re -f alsa -thread_queue_size 2048 -channels 2 -channel_layout stereo -i default:CARD=DVC100 -c:a libopus -ac 2 -vn -f webm 2.webm

ffmpeg -f alsa -thread_queue_size 2048 -channels 2 -channel_layout stereo -i 2.webm -c:a libopus -ac 2 -b:a 48k -vbr off -compression_level 10 -vn -f rtp rtp://10.11.1.96:5118

ffmpeg -i 2.webm \
-vn -f rtp rtp://10.11.1.96:5118

ffmpeg -f alsa -i default:CARD=DVC100 -acodec libopus -ac 2 -b:a 48k -vbr on -compression_level 10 -y out.webm

also bad:
/usr/local/bin/gst-launch-1.0 videotestsrc ! jpegenc ! rtpjpegpay ! udpsink host=10.11.1.96 port=5122

/usr/local/bin/gst-launch-1.0 videotestsrc ! jpegenc ! rtpjpegpay ! udpsink host=10.11.1.96 port=5122

https://github.com/GStreamer/gst-plugins-good/blob/master/tests/examples/rtp/client-VP8-OPUS.sh
[swarm mydetv channel 0]
type = rtp
id = 11
description = swarm mydetv channel 0 remote
audio = yes
video = yes
audioport = 5018
audiopt = 111
audiortpmap = opus/48000/2
videoport = 5020
videopt = 100
videortpmap = vp8/90000

#!/bin/sh
#
# A simple RTP receiver
#

VIDEO_CAPS=”application/x-rtp,media=(string)video,clock-rate=(int)90000,encoding-name=(string)VP8″
AUDIO_CAPS=”application/x-rtp,media=(string)audio,clock-rate=(int)48000,encoding-name=(string)OPUS”

SRC=localhost
DEST=localhost

VIDEO_DEC=”rtpvp8depay ! vp8dec”
AUDIO_DEC=”rtpopusdepay ! opusdec”

VIDEO_SINK=”videoconvert ! autovideosink”
AUDIO_SINK=”audioconvert ! audioresample ! autoaudiosink”

LATENCY=100

gst-launch-1.0 -v rtpbin name=rtpbin latency=$LATENCY \
udpsrc caps=$VIDEO_CAPS address=$SRC port=5000 ! rtpbin.recv_rtp_sink_0 \
rtpbin. ! $VIDEO_DEC ! $VIDEO_SINK \
udpsrc address=$SRC port=5001 ! rtpbin.recv_rtcp_sink_0 \
rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5005 sync=false async=false \
udpsrc caps=$AUDIO_CAPS address=$SRC port=5002 ! rtpbin.recv_rtp_sink_1 \
rtpbin. ! $AUDIO_DEC ! $AUDIO_SINK \
udpsrc address=$SRC port=5003 ! rtpbin.recv_rtcp_sink_1 \
rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5007 sync=false async=false

WHAT DOES THAT MEAN? and how do we make it work for our dvc?

gst-launch-1.0 -v rtpbin name=rtpbin latency=$LATENCY \
udpsrc caps=$VIDEO_CAPS address=$SRC port=5000 \
! rtpbin.recv_rtp_sink_0 rtpbin. \
! $VIDEO_DEC \
! $VIDEO_SINK udpsrc address=$SRC port=5001 \
! rtpbin.recv_rtcp_sink_0 rtpbin.send_rtcp_src_0 \
! udpsink host=$DEST port=5005 sync=false async=false udpsrc caps=$AUDIO_CAPS address=$SRC port=5002 \
! rtpbin.recv_rtp_sink_1 rtpbin. \
! $AUDIO_DEC \
! $AUDIO_SINK udpsrc address=$SRC port=5003 \
! rtpbin.recv_rtcp_sink_1 rtpbin.send_rtcp_src_1 \
! udpsink host=$DEST port=5007 sync=false async=false

Oh yeah, there is also this completely undocumented script:
#!/bin/sh
#
# A simple RTP server
#

SRC=localhost
DEST=localhost
VCAPS=”video/x-raw,width=352,height=288,framerate=15/1″

gst-launch-1.0 -v rtpbin name=rtpbin \
videotestsrc ! $VCAPS ! vp8enc ! rtpvp8pay ! rtpbin.send_rtp_sink_0 \
rtpbin.send_rtp_src_0 ! udpsink host=$DEST port=5000 \
rtpbin.send_rtcp_src_0 ! udpsink host=$DEST port=5001 sync=false async=false \
udpsrc address=$SRC port=5005 ! rtpbin.recv_rtcp_sink_0 \
audiotestsrc ! opusenc ! rtpopuspay ! rtpbin.send_rtp_sink_1 \
rtpbin.send_rtp_src_1 ! udpsink host=$DEST port=5002 \
rtpbin.send_rtcp_src_1 ! udpsink host=$DEST port=5003 sync=false async=false \
udpsrc address=$SRC port=5007 ! rtpbin.recv_rtcp_sink_1

and we keep googling
gst-launch-1.0 audiotestsrc ! audioconvert ! audioresample !opusenc ! rtpopuspay !udpsink host=reciver port=5122

ios facetime camera

ffmpeg -f avfoundation -list_devices true -i “”
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: –prefix=/usr/local/Cellar/ffmpeg/3.3.4 –enable-shared –enable-pthreads –enable-gpl –enable-version3 –enable-hardcoded-tables –enable-avresample –cc=clang –host-cflags= –host-ldflags= –enable-libass –enable-libmp3lame –enable-libopus –enable-libtheora –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libxvid –enable-opencl –enable-videotoolbox –enable-openssl –disable-lzma –enable-nonfree –enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100
[AVFoundation input device @ 0x7f93ae40ee80] AVFoundation video devices:
[AVFoundation input device @ 0x7f93ae40ee80] [0] FaceTime HD Camera (Built-in)
[AVFoundation input device @ 0x7f93ae40ee80] [1] Capture screen 0
[AVFoundation input device @ 0x7f93ae40ee80] AVFoundation audio devices:
[AVFoundation input device @ 0x7f93ae40ee80] [0] Built-in Microphone

# worked for audio and video
ffmpeg -f avfoundation -i “0:0” -y cqm.mov

ffmpeg -f avfoundation -i “0:0” \
-c:v libvpx -crf 10 -b:v 256K \
-an -f rtp rtp://10.11.1.96:5122 \
-c:a libopus -b:a 64k -vbr on -compression_level 10 \
-vn -f rtp rtp://10.11.1.96:5120
Overriding selected pixel format to use uyvy422 instead.

ffmpeg -f avfoundation -i “0:0” -framerate 25 -pix_fmt yuv420p \
-c:v libvpx -crf 40 -b:v 256K \
-an -f rtp rtp://10.11.1.96:5122 \
-c:a libopus -b:a 64k \
-vn -f rtp rtp://10.11.1.96:5118

# never did get any joy