Skip to content

Instantly share code, notes, and snippets.

  1. Compile davs2
git clone https://github.com/pkuvcl/davs2.git
cd davs2/build/linux
./configure --prefix=/home/sdtv/ffmpeg_build --enable-pic --enable-shared
make -j8
make install
  1. Compile xavs2
@meisa233
meisa233 / Compile Pytorch 1.4.0 with CUDA 11.md
Last active June 12, 2023 02:56
Compile Pytorch 1.4.0 with CUDA 11

SOME FEATURES NOT AVAILABLE.
Python version:3.8.10

  1. Install Requirements
sudo apt-get install python3-dev python3-pip python3-setuptools \
                     build-essential cmake libatlas-base-dev \
                     libavcodec-dev libavformat-dev libavutil-dev \
                     libswscale-dev libjpeg-dev libpng-dev libtiff-dev \
                     libv4l-dev libxvidcore-dev libx264-dev \
                     libopenblas-dev liblapack-dev libhdf5-dev \
@meisa233
meisa233 / Awesome-Video-Restoration.md
Last active June 21, 2023 09:51
Awesome Video Restoration
@meisa233
meisa233 / Pytorch_error.md
Created July 6, 2023 06:41
PyTorch RuntimeError: cuDNN error: CUDNN_STATUS_NOT_SUPPORTED.

add this line after import torch

torch.backends.cudnn.enabled = False
@meisa233
meisa233 / ffmpeg_extract_frames.md
Last active July 9, 2024 06:54
use ffmpeg to extract frames and convert image sequence to video

extract fixed number frames

ffmpeg -ss 00:00:00 -i input.mp4 -vsync 0 -an -vframes 600 -f image2 -start_number 0 %05d.png

start time: 00:00:00
frame number: 600
output format: %05d.png
start_number: start number of output images
extract frames by specified duration

  1. Install dependency packages
sudo apt update
sudo apt install build-essential cmake pkg-config
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libatlas-base-dev gfortran
sudo apt-get install libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libgtk-3-dev
sudo apt-get install libatlas-base-dev gfortran
@meisa233
meisa233 / compile_python.md
Created July 26, 2023 06:13
Compile Python From Souce Code

1.update apt

ChangeAptSource

sudo apt update
sudo apt upgrade

Install dependencies

sudo apt-get install zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev
@meisa233
meisa233 / Bugs_about_pyqt5.md
Created August 24, 2023 06:41
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

This answer is from Chatgpt 3.5. The information about error:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

Answer:

export QT_PLUGIN_PATH=/path/to/Qt/plugins
E.g. export QT_PLUGIN_PATH=/media/sdtv/新加卷/MyCode/MiVOS/venv/lib/python3.7/site-packages/PyQt5/Qt5/plugins
@meisa233
meisa233 / Compile_vlc.md
Last active September 6, 2023 08:11
Compile vlc from source code

本次文档测试的系统为Ubuntu 16.04,很多通过apt install安装的库都很破旧
想要vlc实现解码稀有编码格式必须能够完整地安装vlc,通过snap或apt安装的vlc没有办法以root用户运行,因此只能重新编译vlc,并在编译前配置时加入允许root用户运行的选项(enable-run-as-root),当然如果转码程序本身可以在不用root用户运行的情况下就能够正常运行的话直接通过snap install vlc就可以(通过apt安装的vlc十分破旧),不需要再按照这个文档编译vlc

  1. 安装依赖
    (Install Requirements)
sudo apt-get install build-essential pkg-config libfreetype6-dev libfontconfig1-dev libx11-dev libxext-dev libxinerama-dev \
libv4l-dev libxcb-shm0-dev libxcb-xv0-dev libav-tools libavcodec-dev \
libavformat-dev zoo libswscale-dev libqt4-dev autopoint flex gettext bison \ 
liblua5.2-dev lua5.2 luajit libxcb-composite0-dev libxcb-xkb-dev
  1. Install nv-codec-headers
   git clone https://github.com/FFmpeg/nv-codec-headers.git
   cd nv-codec-headers
   # Check the lowest version of nvidia driver in README
   # If you need to switch to ohter branch
   git branch -a
   git checkout remotes/origin/sdk/11.1 
   make
   sudo make install PREFIX=~/ffmpeg_build/