ffmpeg->rtp

Having trouble with the swarm & choppy video.

Starting at the top, we throw this to janus:
/opt/ffmpeg/bin/ffmpeg -ss 00:00:00 -re -i file:///usr4/mydetv/webm/archive.org/Drive-inIntermission2/Drive-inIntermission2.ogv.vp8-opus.webm -vcodec copy -an -f rtp rtp://10.11.1.96:5024 -acodec copy -vn -f rtp rtp://10.11.1.96:5022

on mac, play file:
ffplay -protocol_whitelist “file,rtp,udp” -i /private/nfs/a6/usr6/mydetv/webm/clips/fireworks.mp4.vp8-opus.webm -strict -2
not choppy

/opt/ffmpeg/bin/ffmpeg -re -i /usr4/mydetv/webm/archive.org/TarzanoftheApes1918AndyDivx_512kb.mp4.vp8-opus.webm -vcodec copy -an -f rtp rtp://10.11.1.96:5124 -acodec copy -vn -f rtp rtp://10.11.1.96:5122

swarm – lowest common denominator

I’m looking to feed all those fringe devices.
https://caniuse.com/#feat=webm

Once again, I give up. Seems the only way to do it is create fragmented mp4’s and send them so the browser can play the current live piece instead of playing from the beginning. We’ll just wait for webm to be supported everywhere.

wait wait, maybe DashCast.

sudo apt-get install make pkg-config g++ zlib1g-dev firefox-dev libfreetype6-dev libjpeg62-dev libpng12-dev libopenjpeg-dev libmad0-dev libfaad-dev libogg-dev libvorbis-dev libtheora-dev liba52-0.7.4-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libavresample-dev libxv-dev x11proto-video-dev libgl1-mesa-dev x11proto-gl-dev linux-sound-base libxvidcore-dev libssl-dev libjack-dev libasound2-dev libpulse-dev libsdl1.2-dev dvb-apps libavcodec-extra-53 libavdevice-dev libmozjs185-dev

DashCast -vf video4linux2 -v4l2f mjpeg -vfr 30 -vres 1280×720 -v /dev/video0 -af alsa -a plughw:2,0 -conf dashcast.conf -live
DashCast -vf video4linux2 -v4l2f yuyv422 -vfr 30 -vres 720×480 -v /dev/video0 -af alsa -a plughw:2,0 -conf dashcast.conf -live

DashCast -av out.mpg -seg-dur 500 -live-media

*** I did try… Did the conversions fine but then had no way to live stream it to the browser.

Steps: decide on the container (mp4) and codecs, perhaps h264 and aac
janus can’t ‘do’ aac, le’s try opus

ffmpeg -i input.mov  -acodec aac -strict -2 output.mp4

ffmpeg -i people -c:v libx264 -preset slow -crf 22
ffmpeg -y -i /private/nfs/a6/usr4/mydetv/videos/clips/people.mp4 -c:v libx264 -b:v 512k -c:a libfdk_aac -b:a 128k -pass 1 -f mp4 out.mpg
ffmpeg -y -i /private/nfs/a6/usr4/mydetv/videos/clips/people.mp4 -c:v libx264 -b:v 512k -c:a libfdk_aac -b:a 128k -pass 2 -f mp4 out.mpg

ffmpeg -i people -c:v libx264 -preset slow -crf 22
ffmpeg -y -i /private/nfs/a6/usr4/mydetv/videos/clips/people.mp4 -c:v libx264 -b:v 512k -c:a libfdk_aac -b:a 128k -pass 1 -f mp4 out.mpg
ffmpeg -y -i /private/nfs/a6/usr4/mydetv/videos/clips/people.mp4 -c:v libx264 -b:v 512k -c:a libfdk_aac -b:a 128k -pass 2 -f mp4 out.mpg

ffmpeg -y -i /usr4/mydetv/videos/clips/people.mp4 -c:v libx264 -b:v 512k -c:a aac -b:a 128k -pass 2 -f mp4 out.mp4

gstreamer

https://gstreamer.freedesktop.org/
https://github.com/GStreamer/gstreamer

for mac:
brew install gstreamer

debian

Goal: swarm can use
tried:
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio

failed!

tried
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-pulseaudio

******
apt-get install automake autopoint libtool bison flex
apt-get install gtk-doc-tools liborc-0.4-0 liborc-0.4-dev libvorbis-dev libcdparanoia-dev libcdparanoia0 cdparanoia libvisual-0.4-0 libvisual-0.4-dev libvisual-0.4-plugins libvisual-projectm vorbis-tools vorbisgain libopus-dev libopus-doc libopus0 libopusfile-dev libopusfile0 libtheora-bin libtheora-dev libtheora-doc libflac++-dev libavc1394-dev libraw1394-dev libraw1394-tools libraw1394-doc libraw1394-tools libtag1-dev libtagc0-dev libwavpack-dev wavpack

for linux roll your own:
https://gstreamer.freedesktop.org/documentation/frequently-asked-questions/git.html

a6 Ubuntu 16.04.5 LTS \n \l

what a pain, the doc’s first line to install dependencies tries to install gstreamer! I don’t want to install it, I just want to build it. talk about the chicken and the egg!

so here is what I did:
sudo apt-get install gtk-doc-tools liborc-0.4-0 liborc-0.4-dev libvorbis-dev libcdparanoia-dev libcdparanoia0 cdparanoia libvisual-0.4-0 libvisual-0.4-dev libvisual-0.4-plugins libvisual-projectm vorbis-tools vorbisgain libopus-dev libopus-doc libopus0 libopusfile-dev libopusfile0 libtheora-bin libtheora-dev libtheora-doc libflac++-dev libavc1394-dev libraw1394-dev libraw1394-tools libraw1394-doc libraw1394-tools libtag1-dev libtagc0-dev libwavpack-dev wavpack
and I did this:
sudo apt-get install libasound2-dev libavcodec-dev libavformat-dev libswscale-dev

but still no joy, so I admitted defeat and
sudo apt-get install libgstreamer1.0-0

and then the same crap with the plugins, gave up for now

revisited 12/21/2018
I gave up on not installing gstreamer from packages. So a gstreamer exists in /usr/local/bin and another one I copiled myself in /opt/gstreamer

apt-get install gstreamer1.0-0
apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad

export PKG_CONFIG_PATH=/opt/gstreamer/lib/pkgconfig
./autogen.sh –prefix=/opt/gstreamer –enable-gtk-doc –enable-iso-codes –enable-orc
./autogen.sh –prefix=/opt/gstreamer –disable-gtk-doc
my version is shit, had to change /opt/gstreamer/lib/pkgconfig/gstreamer-1.0.pc
from
prefix=/opt/gstreamer
libexecdir=${exec_prefix}/libexec
exec_prefix=${prefix}
to
prefix=/opt/gstreamer
exec_prefix=${prefix}
libexecdir=${exec_prefix}/libexec

hauppauge pvr-350

pvr350

Update 2020-03-21

v4l2-ctl command set changed.  Many of the commands we had documented have changed

 

 

v4l2-ctl -d /dev/video0 –log-status

v4l2-ctl -d /dev/video0 –set-standard=ntsc
v4l2-ctl -d /dev/video0 –set-ctrl=mute=0
v4l2-ctl -d /dev/video0 –set-input 1
v4l2-ctl -d /dev/video0 –set-audio-input 1
v4l2-ctl -d /dev/video0 –set-ctrl=video_bitrate=8000000,video_peak_bitrate=12000000
v4l2-ctl -d /dev/video0 –set-ctrl=audio_layer_ii_bitrate=13

phomlish@a2:~$ v4l2-ctl –log-status

Status Log:

[2226091.504363] ivtv0: ================= START STATUS =================
[2226091.504370] ivtv0: Version: 1.4.3 Card: Hauppauge WinTV PVR-350
[2226091.562698] tveeprom 2-0050: Hauppauge model 48132, rev K168, serial# 7336201
[2226091.562704] tveeprom 2-0050: tuner model is LG TAPE H001F MK3 (idx 68, type 47)
[2226091.562709] tveeprom 2-0050: TV standards NTSC(M) (eeprom 0x08)
[2226091.562713] tveeprom 2-0050: audio processor is MSP4448 (idx 27)
[2226091.562716] tveeprom 2-0050: decoder processor is SAA7115 (idx 19)
[2226091.562720] tveeprom 2-0050: has radio, has IR receiver, has no IR transmitter
[2226091.562724] saa7115 2-0021: Audio frequency: 48000 Hz
[2226091.564756] saa7115 2-0021: Input: S-Video 0
[2226091.564763] saa7115 2-0021: Video signal: broadcast/DVD
[2226091.564766] saa7115 2-0021: Frequency: 60 Hz
[2226091.564769] saa7115 2-0021: Detected format: NTSC
[2226091.564772] saa7115 2-0021: Width, Height: 720, 480
[2226091.564776] saa7115 2-0021: Brightness: 128
[2226091.564781] saa7115 2-0021: Contrast: 64
[2226091.564785] saa7115 2-0021: Saturation: 64
[2226091.564788] saa7115 2-0021: Hue: 0
[2226091.564791] saa7115 2-0021: Chroma AGC: true
[2226091.564794] saa7115 2-0021: Chroma Gain: 40 inactive volatile
[2226091.564800] saa7127 2-0044: Standard: 60 Hz
[2226091.564802] saa7127 2-0044: Input: normal
[2226091.564805] saa7127 2-0044: Output: S-Video + Composite
[2226091.564807] saa7127 2-0044: WSS: disabled
[2226091.564809] saa7127 2-0044: VPS: disabled
[2226091.564812] saa7127 2-0044: CC: disabled
[2226091.566401] msp3400 2-0040: msp3400 rev1 = 0x0117 rev2 = 0x3042
[2226091.566405] msp3400 2-0040: Audio: Volume: 58880
[2226091.566409] msp3400 2-0040: Audio: Balance: 32768
[2226091.566412] msp3400 2-0040: Audio: Mute: false
[2226091.566416] msp3400 2-0040: Mode: External input
[2226091.566419] msp3400 2-0040: Audmode: 0x0001
[2226091.566423] msp3400 2-0040: Routing: 0x00222220 (input) 0x00000044 (output)
[2226091.566425] msp3400 2-0040: ACB: 0x0c00
[2226091.566430] tda9887 2-0043: Data bytes: b=0x14 c=0x30 e=0x44
[2226091.566434] tuner 2-0061: Tuner mode: analog TV
[2226091.566437] tuner 2-0061: Frequency: 67.25 MHz
[2226091.566440] tuner 2-0061: Standard: 0x0000b000
[2226091.566444] ivtv0: Video Input: S-Video 1
[2226091.566446] ivtv0: Audio Input: Line In 1
[2226091.566449] ivtv0: Video Output: S-Video + Composite
[2226091.566451] ivtv0: Output Mode: None
[2226091.566625] ivtv0: Overlay: Off, Alpha: Global, Pixel Format: ARGB 8:8:8:8
[2226091.566627] ivtv0: Tuner: TV
[2226091.566630] ivtv0: Stream Type: MPEG-2 Program Stream
[2226091.566634] ivtv0: Stream VBI Format: No VBI
[2226091.566637] ivtv0: Audio Sampling Frequency: 48 kHz
[2226091.566640] ivtv0: Audio Encoding: MPEG-1/2 Layer II
[2226091.566643] ivtv0: Audio Layer II Bitrate: 384 kbps
[2226091.566647] ivtv0: Audio Stereo Mode: Stereo
[2226091.566650] ivtv0: Audio Stereo Mode Extension: Bound 4 inactive
[2226091.566653] ivtv0: Audio Emphasis: No Emphasis
[2226091.566656] ivtv0: Audio CRC: No CRC
[2226091.566659] ivtv0: Audio Mute: false
[2226091.566662] ivtv0: Video Encoding: MPEG-2
[2226091.566665] ivtv0: Video Aspect: 4×3
[2226091.566668] ivtv0: Video B Frames: 2
[2226091.566671] ivtv0: Video GOP Size: 15
[2226091.566674] ivtv0: Video GOP Closure: true
[2226091.566677] ivtv0: Video Bitrate Mode: Variable Bitrate
[2226091.566680] ivtv0: Video Bitrate: 8000000
[2226091.566683] ivtv0: Video Peak Bitrate: 12000000
[2226091.566686] ivtv0: Video Temporal Decimation: 0
[2226091.566689] ivtv0: Video Mute: false
[2226091.566692] ivtv0: Video Mute YUV: 32896
[2226091.566695] ivtv0: Spatial Filter Mode: Manual
[2226091.566698] ivtv0: Spatial Filter: 0
[2226091.566701] ivtv0: Spatial Luma Filter Type: 1D Horizontal
[2226091.566704] ivtv0: Spatial Chroma Filter Type: 1D Horizontal
[2226091.566707] ivtv0: Temporal Filter Mode: Manual
[2226091.566710] ivtv0: Temporal Filter: 8
[2226091.566713] ivtv0: Median Filter Type: Off
[2226091.566716] ivtv0: Median Luma Filter Minimum: 0 inactive
[2226091.566719] ivtv0: Median Luma Filter Maximum: 255 inactive
[2226091.566723] ivtv0: Median Chroma Filter Minimum: 0 inactive
[2226091.566726] ivtv0: Median Chroma Filter Maximum: 255 inactive
[2226091.566730] ivtv0: Insert Navigation Packets: false
[2226091.566733] ivtv0: Video Decoder PTS: 0 volatile
[2226091.566737] ivtv0: Video Decoder Frame Count: 0 volatile
[2226091.566741] ivtv0: Audio Playback: Stereo
[2226091.566744] ivtv0: Audio Multilingual Playback: Left
[2226091.566748] ivtv0: Status flags: 0x00200080
[2226091.566752] ivtv0: Stream encoder MPG: status 0x0000, 0% of 4096 KiB (128 buffers) in use
[2226091.566756] ivtv0: Stream encoder YUV: status 0x0000, 0% of 2048 KiB (64 buffers) in use
[2226091.566759] ivtv0: Stream encoder VBI: status 0x0000, 0% of 1040 KiB (61 buffers) in use
[2226091.566763] ivtv0: Stream encoder PCM: status 0x0000, 0% of 324 KiB (72 buffers) in use
[2226091.566766] ivtv0: Stream decoder MPG: status 0x0000, 0% of 1024 KiB (16 buffers) in use
[2226091.566770] ivtv0: Stream decoder VBI: status 0x0000, 0% of 65 KiB (29 buffers) in use
[2226091.566773] ivtv0: Stream decoder YUV: status 0x0000, 0% of 1024 KiB (16 buffers) in use
[2226091.566776] ivtv0: Read MPG/VBI: 68661184/0 bytes
[2226091.566779] ivtv0: ================== END STATUS ==================

[2224705.806491] ivtv0: Video Bitrate: 6000000
[2224705.806495] ivtv0: Video Peak Bitrate: 8000000
video_bitrate (int) : min=0 max=27000000 step=1 default=6000000 value=6000000
video_peak_bitrate (int) : min=0 max=27000000 step=1 default=8000000 value=8000000

v4l2-ctl –get-ctrl=video_bitrate,video_peak_bitrate
v4l2-ctl –get-ctrl=video_peak_bitrate

v4l2-ctl -d /dev/video0 –list-audio-input
ioctl: VIDIOC_ENUMAUDIO
Input : 0
Name : Tuner 1

Input : 1
Name : Line In 1

Input : 2
Name : Line In 2

v4l2-ctl -d /dev/video0 –list-inputs
ioctl: VIDIOC_ENUMINPUT
Input : 0
Name : Tuner 1
Type : 0x00000001
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000001000 (NTSC-M)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

Input : 1
Name : S-Video 1
Type : 0x00000002
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000FFFFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/443/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

Input : 2
Name : Composite 1
Type : 0x00000002
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000FFFFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/443/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

Input : 3
Name : S-Video 2
Type : 0x00000002
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000FFFFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/443/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

Input : 4
Name : Composite 2
Type : 0x00000002
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000FFFFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/443/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

Input : 5
Name : Composite 3
Type : 0x00000002
Audioset : 0x00000007
Tuner : 0x00000000
Standard : 0x0000000000FFFFFF (PAL-B/B1/G/H/I/D/D1/K/M/N/Nc/60 NTSC-M/M-JP/443/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
Status : 0x00000000 (ok)
Capabilities: 0x00000004 (SDTV standards)

phomlish@a2:~$ v4l2-ctl -d /dev/video0 –all
Driver Info (not using libv4l2):
Driver name : ivtv
Card type : Hauppauge WinTV PVR-350
Bus info : PCI:0000:02:05.0
Driver version: 4.4.95
Capabilities : 0x812702D3
Video Capture
Video Output
Video Output Overlay
VBI Capture
Sliced VBI Capture
Sliced VBI Output
Tuner
Audio
Radio
Read/Write
Extended Pix Format
Device Capabilities
Device Caps : 0x01230001
Video Capture
Tuner
Audio
Read/Write
Extended Pix Format
Priority: 2
Frequency for tuner 0: 1076 (67.250000 MHz)
Tuner 0:
Name : ivtv TV Tuner
Type : Analog TV
Capabilities : 62.5 kHz multi-standard stereo lang1 lang2 freq-bands
Frequency range : 44.000 MHz – 958.000 MHz
Signal strength/AFC : 0%/0
Current audio mode : stereo
Available subchannels: mono
Video input : 0 (Tuner 1: ok)
Audio input : 0 (Tuner 1)
Video Standard = 0x00001000
NTSC-M
Format Video Capture:
Width/Height : 720/480
Pixel Format : ‘MPEG’
Field : Interlaced
Bytes per Line : 0
Size Image : 131072
Colorspace : SMPTE 170M
Transfer Function : Default
YCbCr Encoding : Default
Quantization : Default
Flags :
Crop Capability Video Capture:
Bounds : Left 0, Top 0, Width 720, Height 480
Default : Left 0, Top 0, Width 720, Height 480
Pixel Aspect: 10/11
Crop Capability Video Output:
Bounds : Left 0, Top 0, Width 720, Height 480
Default : Left 0, Top 0, Width 720, Height 480
Pixel Aspect: 10/11
Selection: crop_default, Left 0, Top 0, Width 720, Height 480
Selection: crop_bounds, Left 0, Top 0, Width 720, Height 480
Selection: compose, Left 0, Top 0, Width 720, Height 480
Selection: compose_default, Left 0, Top 0, Width 720, Height 480
Selection: compose_bounds, Left 0, Top 0, Width 720, Height 480
Streaming Parameters Video Capture:
Frames per second: 29.970 (30000/1001)
Read buffers : 2

User Controls

brightness (int) : min=0 max=255 step=1 default=128 value=128 flags=slider
contrast (int) : min=0 max=127 step=1 default=64 value=64 flags=slider
saturation (int) : min=0 max=127 step=1 default=64 value=64 flags=slider
hue (int) : min=-128 max=127 step=1 default=0 value=0 flags=slider
volume (int) : min=0 max=65535 step=655 default=58880 value=58880 flags=slider
balance (int) : min=0 max=65535 step=655 default=32768 value=32768 flags=slider
mute (bool) : default=0 value=1
chroma_agc (bool) : default=1 value=1 flags=update
chroma_gain (int) : min=0 max=127 step=1 default=40 value=15 flags=inactive, slider, volatile

Codec Controls

stream_type (menu) : min=0 max=5 default=0 value=0 flags=update
stream_vbi_format (menu) : min=0 max=1 default=0 value=0
audio_sampling_frequency (menu) : min=0 max=2 default=1 value=1
audio_encoding (menu) : min=0 max=4 default=1 value=1 flags=update
audio_layer_ii_bitrate (menu) : min=0 max=13 default=10 value=10
audio_stereo_mode (menu) : min=0 max=3 default=0 value=0 flags=update
audio_stereo_mode_extension (menu) : min=0 max=3 default=0 value=0 flags=inactive
audio_emphasis (menu) : min=0 max=2 default=0 value=0
audio_crc (menu) : min=0 max=1 default=0 value=0
audio_mute (bool) : default=0 value=0
audio_playback (menu) : min=0 max=5 default=1 value=1
audio_multilingual_playback (menu) : min=0 max=5 default=2 value=2
video_encoding (menu) : min=0 max=1 default=1 value=1
video_aspect (menu) : min=0 max=3 default=1 value=1
video_b_frames (int) : min=0 max=33 step=1 default=2 value=2 flags=update
video_gop_size (int) : min=1 max=34 step=1 default=15 value=15
video_gop_closure (bool) : default=1 value=1
video_bitrate_mode (menu) : min=0 max=1 default=0 value=0 flags=update
video_bitrate (int) : min=0 max=27000000 step=1 default=6000000 value=6000000
video_peak_bitrate (int) : min=0 max=27000000 step=1 default=8000000 value=8000000
video_temporal_decimation (int) : min=0 max=255 step=1 default=0 value=0
video_mute (bool) : default=0 value=0
video_mute_yuv (int) : min=0 max=16777215 step=1 default=32896 value=32896
video_decoder_pts (int64) : min=0 max=8589934591 step=1 default=0 value=0 flags=read-only, volatile
video_decoder_frame_count (int64) : min=0 max=9223372036854775807 step=1 default=0 value=0 flags=read-only, volatile
spatial_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
spatial_filter (int) : min=0 max=15 step=1 default=0 value=0 flags=slider
spatial_luma_filter_type (menu) : min=0 max=4 default=1 value=1
spatial_chroma_filter_type (menu) : min=0 max=1 default=1 value=1
temporal_filter_mode (menu) : min=0 max=1 default=0 value=0 flags=update
temporal_filter (int) : min=0 max=31 step=1 default=8 value=8 flags=slider
median_filter_type (menu) : min=0 max=4 default=0 value=0 flags=update
median_luma_filter_minimum (int) : min=0 max=255 step=1 default=0 value=0 flags=inactive, slider
median_luma_filter_maximum (int) : min=0 max=255 step=1 default=255 value=255 flags=inactive, slider
median_chroma_filter_minimum (int) : min=0 max=255 step=1 default=0 value=0 flags=inactive, slider
median_chroma_filter_maximum (int) : min=0 max=255 step=1 default=255 value=255 flags=inactive, slider
insert_navigation_packets (bool) : default=0 value=0

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