Skip to content

Instantly share code, notes, and snippets.

pip install -e git+https://github.com/CompVis/taming-transformers.git@master#egg=taming-transformers -e git+https://github.com/openai/CLIP.git@main#egg=clip

Manually install

   git clone https://github.com/CompVis/taming-transformers.git
   git clone https://github.com/openai/CLIP.git
   cd /path/to/taming-transformers
   pip install -e .

RPC failed; curl 18 transfer closed with outstanding read data remaining.
SOLUTION:

(venv) sdtv@sdtv-Precision-7920-Tower:~/MGLD-VSR$ git config --list --global
http.postbuffer=1048576000
http.maxrequestbuffer=100M
http.version=HTTP/2
core.compression=0
self = <torch.utils.file_baton.FileBaton object at 0x7f7418fe1fa0>

    def wait(self):
        '''
        Periodically sleeps for a certain amount until the baton is released.
    
        The amount of time slept depends on the ``wait_seconds`` parameter
        passed to the constructor.
 '''
@meisa233
meisa233 / install_cuda.md
Created December 6, 2023 09:06
Install CUDA and Uninstall CUDA
  1. Uninstall cuda
run cuda-uninstaller in /usr/local/cuda/bin using root user
  1. Install Cuda Download runfile from cuda official website.
    sudo sh cuda_xxx.run.
    Note that don't select nvidia driver!
  2. Configuration add these lines to the end of ~/.bashrc
  1. 安装依赖
# yum install autoconf automake bzip2 bzip2-devel cmake freetype-devel gcc gcc-c++ git libtool make pkgconfig zlib-devel libvorbis-devel wget
  1. 建立需要用来存放源码、build和可执行文件的文件夹
# 存放各种组件的源码包
mkdir -p ~/ffmpeg_sources
# 存放编译后的文件
mkdir -p ~/ffmpeg_build

yuv420p

YUV420P又叫plane平面模式,Y , U , V分别在不同平面,也就是有三个平面,它是YUV标准格式4:2:0,主要分为:YU12和YV12
YU12
在android平台下也叫作I420格式,首先是所有Y值,然后是所有U值,最后是所有V值
YV12
YV12格式与YU12基本相同,首先是所有Y值,然后是所有V值,最后是所有U值。只要注意从适当的位置提取U和V值,YU12和YV12都可以使用相同的算法进行处理。

NV12

@meisa233
meisa233 / Repear_tip1.md
Created September 17, 2023 02:46
How to make recording monitor off (default)?

Options -> Preferences
Project -> Track/Send Defaults
Modify the Record config
Cancel the "Monitor Input"

  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/
@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
@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