服务器:ubuntu20.04
驱动:CUDA11.4 + Driver470.161.03 + Cudnn8.2.4
Ubuntu 20.04, Python3.10, Pytorch 1.12 and CUDA 11.3
服务端需要开放端口 tcp:8000,8010,1985; udp:8000
文档地址:https://livetalking-doc.readthedocs.io/en/latest/feature.html
项目地址:https://github.com/lipku/LiveTalking
安装:
conda create -n nerfstream python=3.10 conda activate nerfstream conda install pytorch==1.12.1 torchvision==0.13.1 cudatoolkit=11.3 -c pytorch pip install -r requirements.txt #如果不训练ernerf模型,不需要安装下面的库 pip install "git+https://github.com/facebookresearch/pytorch3d.git" pip install tensorflow-gpu==2.8.0 pip install --upgrade "protobuf<=3.20.1"
安装docker
apt install docker.io
运行srs
export CANDIDATE='<服务器外网ip>' docker run -d --rm --env CANDIDATE=$CANDIDATE -p 1935:1935 -p 8080:8080 -p 1985:1985 -p 8000:8000/udp ossrs/srs:5 objs/srs -c conf/rtc.conf
降级numpy
pip install 'numpy<2'
启动数字人
python app.py
避坑指南
1. rtmp推流时ffmpeg版本不对需要4.2.2版本。原则是运行一下ffmpeg,打印的信息里需要有libx264,如果没有肯定不行
(nerfstream) root@iZmj7glpiqwd2p2ey0w9d5Z:/home/LiveTalking# ffmpeg ffmpeg version 4.2.2 Copyright (c) 2000-2019 the FFmpeg developers built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0) configuration: --prefix=/root/miniconda3/envs/nerfstream --cc=/tmp/build/80754af9/ffmpeg_1587154242452/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --enable-avresample --enable-gmp --enable-hardcoded-tables --enable-libfreetype --enable-libvpx --enable-pthreads --enable-libopus --enable-postproc --enable-pic --enable-pthreads --enable-shared --enable-static --enable-version3 --enable-zlib --enable-libmp3lame --disable-nonfree --enable-gpl --enable-gnutls --disable-openssl --enable-libopenh264 --enable-libx264 libavutil 56. 31.100 / 56. 31.100 libavcodec 58. 54.100 / 58. 54.100 libavformat 58. 29.100 / 58. 29.100 libavdevice 58. 8.100 / 58. 8.100 libavfilter 7. 57.100 / 7. 57.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Hyper fast Audio and Video encoder usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... Use -h to get full help or, even better, run 'man ffmpeg'
一定包含 --enable-libx264
2. websocket连接报错
修改python/site-packages/flask_sockets.py
self.url_map.add(Rule(rule, endpoint=f)) 改成 self.url_map.add(Rule(rule, endpoint=f, websocket=True))
本文地址:https://www.stayed.cn/item/27878
转载请注明出处。
本站部分内容来源于网络,如侵犯到您的权益,请 联系我