Link Diary April 2022
Videos, articles and other links I stumbled upon in april 2022, which I want to remember and share.
ffmpeg: Get an Image off a video at an exact time
https://superuser.com/questions/1009969/how-to-extract-a-frame-out-of-a-video-using-ffmpeg
ffmpeg -ss 00:00:05.01 -i myvideo.avi -frames:v 1 myimage.jpg
Mount a directory as Docker volume
https://docs.docker.com/engine/reference/commandline/run/#mount-volume--v---read-only
docker run -v /local:/remote -i -t ubuntu bash
Start Docker container without a server:
https://devopscube.com/keep-docker-container-running/
docker run -d ubuntu sleep infinity
Suppress questions during apt installations for automation:
DEBIAN_FRONTEND="noninteractive" apt-get install --yes python-opencv
Video picks
- Provider returned HTTP Status 403 for
- All resolution methods failed
(german) Report on protests in Russland
I did not know "Caging"
Options of strptime
https://www.programiz.com/python-programming/datetime/strptime
Python: Time from string without dateutil
import datetime datetime.datetime.strptime("2022-04-21T20:30:00", "%Y-%m-%dT%H:%M:%S")
(german) Generator for legally correct imprint and data security policy
Determine SATA version on Linux
https://www.cyberciti.biz/faq/linux-command-to-find-sata-harddisk-link-speed/
dmesg | grep -i sata | grep 'link up'
Image upscaling
https://github.com/xinntao/Real-ESRGAN
Needed lower versions than I would have with Ubuntu 20.04, so i dockered 18.04 and configured all packages accordingly.
- Dockerfile
FROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu18.04 RUN apt update RUN apt install git python3 python3-pip -y RUN pip3 install torch RUN pip3 install --upgrade pip RUN pip3 install numpy opencv-python RUN apt install libsm6 libxext6 libxrender-dev -y RUN ln -s /usr/bin/python3 /usr/bin/python RUN ln -s /usr/bin/pip3 /usr/bin/pip RUN pip install basicsr RUN pip install facexlib RUN pip install gfpgan RUN git clone https://github.com/xinntao/Real-ESRGAN.git WORKDIR /Real-ESRGAN RUN pip install -r requirements.txt RUN python setup.py develop RUN apt install wget -y RUN wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P experiments/pretrained_models RUN mkdir -p inputs results RUN DEBIAN_FRONTEND="noninteractive" apt-get install python3-opencv -y VOLUME /Real-ESRGAN/inputs VOLUME /Real-ESRGAN/results WORKDIR /usr/local/lib/python3.6/dist-packages/facexlib/weights/ RUN wget https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth WORKDIR /usr/local/lib/python3.6/dist-packages/gfpgan/weights/ RUN wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth WORKDIR /Real-ESRGAN
- Prepare_NVIDIA_for_container_sharing_on_Host
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \ sudo apt-key add - distribution=$(. /etc/os-release;echo $ID$VERSION_ID) curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \ sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list sudo apt-get update apt-get install nvidia-container-runtime service docker restart
> docker run --gpus all -v "inputs":"/Real-ESRGAN/inputs" -t keinerweiss/esrgan python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs --face_enhance --tile 256
(german) List of games featuring raytracing or DLSS
Megabyte ... MB oder MiB?
https://www.majordifferences.com/2018/03/differences-between-megabyte-and.html
1 MiB = 1 MebiByte = 1024 Kilobyte (never 1000)
Insert Emojis with Ubuntu Gnome
https://www.omgubuntu.co.uk/2018/06/use-emoji-linux-ubuntu-apps
Strg + .
(in many applications)