Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

生成耗时太长了 #59

Open
SnowFlowers opened this issue Apr 18, 2023 · 3 comments
Open

生成耗时太长了 #59

SnowFlowers opened this issue Apr 18, 2023 · 3 comments

Comments

@SnowFlowers
Copy link

No description provided.

@SnowFlowers
Copy link
Author

运行等待的时间太长了。大家也是这样吗。预计半个小时生成一个视频
image

@Xienqing
Copy link

运行等待的时间太长了。大家也是这样吗。预计半个小时生成一个视频 image

请问您的电脑配置能说下嘛?我想试试在本地跑下

@lilongwei5054
Copy link

@SnowFlowers 可能是你的电脑配置问题,我本地显卡 用的tesla v100 32G,很快,以下输出信息,在Model loaded 处用时大概1分钟不到,这个加载完成后,后面的几乎一下子就生成了,1秒钟都不到。

(base) root@ThinkStation-K-C2:/home/pypro/paddlebobo/PaddleBoBo# python general_demo.py --human ./file/input/test.mp4 --output output.mp4 --text 今天中东发 生一起恐怖袭击事件,造成100多人死亡,300多人受伤。
/usr/local/software/anaconda/install/lib/python3.9/site-packages/librosa/core/constantq.py:1059: DeprecationWarning: np.complex is a deprecated alias for the builtin complex. To silence this warning, use complex by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.complex128 here.
Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
dtype=np.complex,
[05/27 17:21:14] ppgan INFO: Found /root/.cache/ppgan/GPEN-512.pdparams
W0527 17:21:15.271505 143807 gpu_resources.cc:61] Please NOTE: device: 0, GPU Compute Capability: 7.0, Driver API Version: 11.4, Runtime API Version: 10.2
W0527 17:21:15.271950 143807 gpu_resources.cc:91] device: 0, cuDNN Version: 8.4.
[2023-05-27 17:21:19,607] [ INFO] - Already cached /root/.paddlenlp/models/bert-base-chinese/bert-base-chinese-vocab.txt
[2023-05-27 17:21:19,611] [ INFO] - tokenizer config file saved in /root/.paddlenlp/models/bert-base-chinese/tokenizer_config.json
[2023-05-27 17:21:19,611] [ INFO] - Special tokens file saved in /root/.paddlenlp/models/bert-base-chinese/special_tokens_map.json
Building prefix dict from the default dictionary ...
[2023-05-27 17:21:19,678] [ DEBUG] init.py:113 - Building prefix dict from the default dictionary ...
Loading model from cache /tmp/jieba.cache
[2023-05-27 17:21:19,678] [ DEBUG] init.py:132 - Loading model from cache /tmp/jieba.cache
Loading model cost 0.247 seconds.
[2023-05-27 17:21:19,925] [ DEBUG] init.py:164 - Loading model cost 0.247 seconds.
Prefix dict has been built successfully.
[2023-05-27 17:21:19,925] [ DEBUG] init.py:166 - Prefix dict has been built successfully.
Reading video frames...
Number of frames available for inference: 300
Length of mel chunks: 172
Model loaded
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 86/86 [00:17<00:00, 4.85it/s]
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:27<00:00, 2.52s/it]
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=/tmp/build/80754af9/ffmpeg_1587154242452/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho --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
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'output.wav':
Duration: 00:00:05.85, bitrate: 384 kb/s
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
Input #1, avi, from 'temp/result.avi':
Metadata:
encoder : Lavf58.76.100
Duration: 00:00:05.73, start: 0.000000, bitrate: 2958 kb/s
Stream #1:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 1488x832 [SAR 1:1 DAR 93:52], 2959 kb/s, 30 fps, 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #1:0 -> #0:0 (mpeg4 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (pcm_s16le (native) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x563e78d1a000] -qscale is ignored, -crf is recommended.
[libx264 @ 0x563e78d1a000] using SAR=1/1
[libx264 @ 0x563e78d1a000] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x563e78d1a000] profile High, level 3.2, 4:2:0, 8-bit
[libx264 @ 0x563e78d1a000] 264 - core 157 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=26 lookahead_threads=4 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'output.mp4':
Metadata:
encoder : Lavf58.29.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 1488x832 [SAR 1:1 DAR 93:52], q=-1--1, 30 fps, 15360 tbn, 30 tbc
Metadata:
encoder : Lavc58.54.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.54.100 aac
frame= 172 fps=0.0 q=-1.0 Lsize= 476kB time=00:00:05.88 bitrate= 662.5kbits/s speed=13.6x
video:419kB audio:51kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.234583%
[libx264 @ 0x563e78d1a000] frame I:1 Avg QP:19.39 size: 59581
[libx264 @ 0x563e78d1a000] frame P:50 Avg QP:18.48 size: 5252
[libx264 @ 0x563e78d1a000] frame B:121 Avg QP:26.00 size: 879
[libx264 @ 0x563e78d1a000] consecutive B-frames: 5.8% 1.2% 0.0% 93.0%
[libx264 @ 0x563e78d1a000] mb I I16..4: 37.1% 60.7% 2.2%
[libx264 @ 0x563e78d1a000] mb P I16..4: 0.5% 1.5% 0.1% P16..4: 9.5% 3.1% 1.7% 0.0% 0.0% skip:83.7%
[libx264 @ 0x563e78d1a000] mb B I16..4: 0.1% 0.2% 0.0% B16..8: 7.7% 0.5% 0.1% direct: 0.1% skip:91.3% L0:48.5% L1:48.4% BI: 3.1%
[libx264 @ 0x563e78d1a000] 8x8 transform intra:67.4% inter:79.2%
[libx264 @ 0x563e78d1a000] coded y,uvDC,uvAC intra: 36.3% 70.7% 24.5% inter: 1.7% 2.3% 0.3%
[libx264 @ 0x563e78d1a000] i16 v,h,dc,p: 35% 45% 17% 3%
[libx264 @ 0x563e78d1a000] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 23% 28% 38% 2% 1% 2% 1% 2% 3%
[libx264 @ 0x563e78d1a000] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 26% 38% 12% 3% 6% 3% 6% 2% 5%
[libx264 @ 0x563e78d1a000] i8c dc,h,v,p: 32% 39% 23% 6%
[libx264 @ 0x563e78d1a000] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x563e78d1a000] ref P L0: 68.2% 8.1% 15.8% 7.9%
[libx264 @ 0x563e78d1a000] ref B L0: 82.5% 14.6% 3.0%
[libx264 @ 0x563e78d1a000] ref B L1: 95.1% 4.9%
[libx264 @ 0x563e78d1a000] kb/s:597.85
[aac @ 0x563e78d27a00] Qavg: 616.704
视频生成完毕,输出路径为:output.mp4
(base) root@ThinkStation-K-C2:/home/pypro/paddlebobo/PaddleBoBo#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants