root@localhost:/app# python inference.py --checkpoint_path checkpoints/wav2lip_gan.pth --face temp/video2.mp4 --audio temp/voice.mp3
Using cuda for inference.
Reading video frames...
Number of frames available for inference: 288
Extracting raw audio...
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
[mp3 @ 0x55d99a6f7a80] Estimating duration from bitrate, this may be inaccurate
Input #0, mp3, from 'temp/voice.mp3':
Duration: 00:00:21.84, start: 0.000000, bitrate: 48 kb/s
Stream #0:0: Audio: mp3, 24000 Hz, mono, fltp, 48 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (mp3 (mp3float) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to 'temp/temp.wav':
Metadata:
ISFT : Lavf58.45.100
Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 24000 Hz, mono, s16, 384 kb/s
Metadata:
encoder : Lavc58.91.100 pcm_s16le
[mp3float @ 0x55d99a716340] overread, skip -5 enddists: -4 -4
[mp3float @ 0x55d99a716340] overread, skip -8 enddists: -5 -5
[mp3float @ 0x55d99a716340] overread, skip -7 enddists: -3 -3
[mp3float @ 0x55d99a716340] overread, skip -5 enddists: -1 -1
[mp3float @ 0x55d99a716340] overread, skip -6 enddists: -2 -2
[mp3float @ 0x55d99a716340] overread, skip -6 enddists: -4 -4
size= 1024kB time=00:00:21.84 bitrate= 384.0kbits/s speed= 489x
video:0kB audio:1024kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.007440%
(80, 1748)
Length of mel chunks: 523
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:06<00:00, 2.69it/s]
Load checkpoint from: checkpoints/wav2lip_gan.pth██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:06<00:00, 4.01it/s]
Model loaded
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:13<00:00, 2.74s/it]
ffmpeg version 4.3.6-0+deb11u1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 10 (Debian 10.2.1-6)
configuration: --prefix=/usr --extra-version=0+deb11u1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Guessed Channel Layout for Input Stream #0.0 : mono
Input #0, wav, from 'temp/temp.wav':
Metadata:
encoder : Lavf58.45.100
Duration: 00:00:21.84, 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.35.101
Duration: 00:00:21.73, start: 0.000000, bitrate: 395 kb/s
Stream #1:0: Video: mpeg4 (Simple Profile) (DIVX / 0x58564944), yuv420p, 268x444 [SAR 1:1 DAR 67:111], 389 kb/s, 24.07 fps, 24.08 tbr, 24.07 tbn, 2407 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 @ 0x55d5d8c53580] -qscale is ignored, -crf is recommended.
[libx264 @ 0x55d5d8c53580] using SAR=1/1
[libx264 @ 0x55d5d8c53580] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x55d5d8c53580] profile High, level 2.1, 4:2:0, 8-bit
[libx264 @ 0x55d5d8c53580] 264 - core 160 r3011 cde9a93 - H.264/MPEG-4 AVC codec - Copyleft 2003-2020 - 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=14 lookahead_threads=2 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=24 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 'results/result_voice.mp4':
Metadata:
encoder : Lavf58.45.100
Stream #0:0: Video: h264 (libx264) (avc1 / 0x31637661), yuv420p(progressive), 268x444 [SAR 1:1 DAR 67:111], q=-1--1, 24.08 fps, 18496 tbn, 24.08 tbc
Metadata:
encoder : Lavc58.91.100 libx264
Side data:
cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
Stream #0:1: Audio: aac (LC) (mp4a / 0x6134706D), 24000 Hz, mono, fltp, 69 kb/s
Metadata:
encoder : Lavc58.91.100 aac
frame= 523 fps=0.0 q=-1.0 Lsize= 759kB time=00:00:21.84 bitrate= 284.7kbits/s speed=23.5x
video:530kB audio:217kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 1.767610%
[libx264 @ 0x55d5d8c53580] frame I:3 Avg QP:19.23 size: 9958
[libx264 @ 0x55d5d8c53580] frame P:254 Avg QP:21.49 size: 1793
[libx264 @ 0x55d5d8c53580] frame B:266 Avg QP:25.12 size: 212
[libx264 @ 0x55d5d8c53580] consecutive B-frames: 22.4% 22.6% 20.7% 34.4%
[libx264 @ 0x55d5d8c53580] mb I I16..4: 11.2% 76.5% 12.3%
[libx264 @ 0x55d5d8c53580] mb P I16..4: 0.7% 4.3% 0.3% P16..4: 27.6% 10.6% 6.4% 0.0% 0.0% skip:50.1%
[libx264 @ 0x55d5d8c53580] mb B I16..4: 0.1% 0.4% 0.0% B16..8: 26.2% 1.1% 0.1% direct: 0.2% skip:72.0% L0:50.9% L1:44.4% BI: 4.7%
[libx264 @ 0x55d5d8c53580] 8x8 transform intra:80.4% inter:74.3%
[libx264 @ 0x55d5d8c53580] coded y,uvDC,uvAC intra: 71.3% 69.0% 14.6% inter: 8.7% 7.1% 0.1%
[libx264 @ 0x55d5d8c53580] i16 v,h,dc,p: 34% 30% 14% 23%
[libx264 @ 0x55d5d8c53580] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 27% 27% 3% 2% 3% 2% 3% 3%
[libx264 @ 0x55d5d8c53580] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 47% 21% 11% 3% 3% 6% 3% 4% 2%
[libx264 @ 0x55d5d8c53580] i8c dc,h,v,p: 39% 24% 32% 4%
[libx264 @ 0x55d5d8c53580] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x55d5d8c53580] ref P L0: 70.8% 12.7% 10.9% 5.5%
[libx264 @ 0x55d5d8c53580] ref B L0: 83.4% 13.1% 3.5%
[libx264 @ 0x55d5d8c53580] ref B L1: 98.5% 1.5%
[libx264 @ 0x55d5d8c53580] kb/s:199.50
[aac @ 0x55d5d8c4e3c0] Qavg: 5514.899