Code Monkey home page Code Monkey logo

Comments (42)

levongh avatar levongh commented on June 15, 2024 6

Hi All, I have tried to run v4l2-ctl --list-devices and it shows
avatarify (platform:v4l2loopback-000): /dev/video2

after that I have changed run.sh file FFCMD='ffmpeg -re -i pipe:0 -vf format=pix_fmts=yuv420p -f v4l2 /dev/video2'
Now it works as expected

from avatarify-python.

alievk avatar alievk commented on June 15, 2024 4

1790535 Added simple workaround by assigning virtual camera id 9 (hope you don't have 10 cameras) and option --no-stream.

from avatarify-python.

WinoGarcia avatar WinoGarcia commented on June 15, 2024 3

Need fix cam_fomm.py
Replace sys.stdout.buffer.write(buf) to sys.stderr.buffer.write(buf) in 185 line

from avatarify-python.

alievk avatar alievk commented on June 15, 2024 2

Broken pipe happens because something prints into stdout, ffmpeg reads stdin and crash with deprecated pixel format used

I substituted all prints to stdout to stderr, please try.

from avatarify-python.

lxblvs avatar lxblvs commented on June 15, 2024 1

Pulled the new version, still have this

cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
[mjpeg @ 0x55cdf42e3900] Format mjpeg detected only with low score of 25, misdetection possible!
Input #0, mjpeg, from 'pipe:0':
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 1200k tbn, 25 tbc
Stream mapping:
  Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
[swscaler @ 0x55cdf4351a40] deprecated pixel format used, make sure you did set range correctly
[v4l2 @ 0x55cdf42eda60] ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 -- 
Conversion failed!
Traceback (most recent call last):
  File "cam_fomm.py", line 185, in <module>
    sys.stdout.buffer.write(buf)
BrokenPipeError: [Errno 32] Broken pipe

commenting the run command fixes it

from avatarify-python.

alievk avatar alievk commented on June 15, 2024 1

@LugarkPirog @Defolters
try download checkpoint manually
https://drive.google.com/file/d/1L8P-hpBhZi8Q_1vP2KlQ4N6dvlzpYBvZ/view

from avatarify-python.

huan avatar huan commented on June 15, 2024 1

I believe that would not be a problem in most of the scenarios!

BTW: Thank you very much for this great work in this repo! @alievk

from avatarify-python.

LugarkPirog avatar LugarkPirog commented on June 15, 2024

same here :(

from avatarify-python.

alievk avatar alievk commented on June 15, 2024
  1. make sure code is up to date
  2. comment https://github.com/alievk/avatarify/blob/master/run.sh#L11 and uncomment https://github.com/alievk/avatarify/blob/master/run.sh#L12 and see if it works without streaming

from avatarify-python.

freemsk1 avatar freemsk1 commented on June 15, 2024
  1. make sure code is up to date
  2. comment https://github.com/alievk/avatarify/blob/master/run.sh#L11 and uncomment https://github.com/alievk/avatarify/blob/master/run.sh#L12 and see if it works without streaming

Had the same Broken pipe error, can confirm that commenting like you say above works, but yes, without streaming

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

656b6d6

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

Could you provide full output without streaming?

from avatarify-python.

Defolters avatar Defolters commented on June 15, 2024

The same:

ffmpeg version 4.1.4-1build2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 9 (Ubuntu 9.2.1-4ubuntu1)
configuration: --prefix=/usr --extra-version=1build2 --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-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --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-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --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-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100
0: ./avatars/einstein.jpg
(1200, 1200, 3)
1: ./avatars/eminem.jpg
(412, 412, 3)
2: ./avatars/jobs.jpg
(624, 624, 3)
3: ./avatars/mona.jpg
(602, 602, 3)
4: ./avatars/obama.jpg
(929, 930, 3)
5: ./avatars/potter.jpg
(724, 722, 3)
6: ./avatars/ronaldo.png
(301, 301, 4)
7: ./avatars/schwarzenegger.png
(250, 250, 4)
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
[mjpeg @ 0x556a6005fa00] Format mjpeg detected only with low score of 25, misdetection possible!
Input #0, mjpeg, from 'pipe:0':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: mjpeg, yuvj420p(pc, bt470bg/unknown/unknown), 640x480 [SAR 1:1 DAR 4:3], 25 tbr, 1200k tbn, 25 tbc
Stream mapping:
Stream #0:0 -> #0:0 (mjpeg (native) -> rawvideo (native))
[swscaler @ 0x556a600ce2c0] deprecated pixel format used, make sure you did set range correctly
[video4linux2,v4l2 @ 0x556a60065680] ioctl(VIDIOC_G_FMT): Invalid argument
Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument
Error initializing output stream 0:0 --
Conversion failed!
Traceback (most recent call last):
File "cam_fomm.py", line 181, in
sys.stdout.buffer.write(buf)
BrokenPipeError: [Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe

from avatarify-python.

liviniuk avatar liviniuk commented on June 15, 2024

Could you provide full output without streaming?

Same issue. Here's what I get when running without streaming.

0: ./avatars/einstein.jpg
1: ./avatars/eminem.jpg
2: ./avatars/jobs.jpg
3: ./avatars/mona.jpg
4: ./avatars/obama.jpg
5: ./avatars/potter.jpg
6: ./avatars/ronaldo.png
7: ./avatars/schwarzenegger.png
load checkpoints..
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2705: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  warnings.warn("Default grid_sample and affine_grid behavior has changed "
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2503: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  warnings.warn("Default upsampling behavior when mode={} is changed "
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:1351: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")

from avatarify-python.

belskikh avatar belskikh commented on June 15, 2024

same here

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

Need fix cam_fomm.py
Replace sys.stdout.buffer.write(buf) to sys.stderr.buffer.write(buf) in 185 line

this is interesting, ffmpeg should read from stdin. what OS do you have?

from avatarify-python.

WinoGarcia avatar WinoGarcia commented on June 15, 2024

this is interesting, ffmpeg should read from stdout. what OS do you have?

I have Ubuntu 19.10
Perhaps, this is a "feature" of my environment)

from avatarify-python.

LugarkPirog avatar LugarkPirog commented on June 15, 2024

fetched last code, switched to non-streaming version, got new error:

1: ./avatars/eminem.jpg
2: ./avatars/jobs.jpg
3: ./avatars/mona.jpg
4: ./avatars/musk.jpg
5: ./avatars/obama.jpg
6: ./avatars/potter.jpg
7: ./avatars/ronaldo.png
8: ./avatars/schwarzenegger.png
load checkpoints..
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
Traceback (most recent call last):
  File "cam_fomm.py", line 130, in <module>
    generator, kp_detector = load_checkpoints(config_path=opt.config, checkpoint_path=opt.checkpoint, device=device)
  File "cam_fomm.py", line 36, in load_checkpoints
    checkpoint = torch.load(checkpoint_path, map_location=device)
  File "/home/lugark/.conda/envs/avatarify/lib/python3.8/site-packages/torch/serialization.py", line 526, in load
    if _is_zipfile(opened_file):
  File "/home/lugark/.conda/envs/avatarify/lib/python3.8/site-packages/torch/serialization.py", line 76, in _is_zipfile
    if ord(magic_byte) != ord(read_byte):
TypeError: ord() expected a character, but string of length 0 found```

from avatarify-python.

Defolters avatar Defolters commented on June 15, 2024

Last commit:

7: ./avatars/schwarzenegger.png
load checkpoints..
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
Traceback (most recent call last):
File "cam_fomm.py", line 130, in
generator, kp_detector = load_checkpoints(config_path=opt.config, checkpoint_path=opt.checkpoint, device=device)
File "cam_fomm.py", line 36, in load_checkpoints
checkpoint = torch.load(checkpoint_path, map_location=device)
File "/home/osboxes/miniconda3/envs/avatarify/lib/python3.8/site-packages/torch/serialization.py", line 529, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File "/home/osboxes/miniconda3/envs/avatarify/lib/python3.8/site-packages/torch/serialization.py", line 692, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, '<'.
pipe:0: Invalid data found when processing input

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

@LugarkPirog @Defolters make sure model checkpoint is not broken. Check md5sum:
46b26eabacbcf1533ac66dc5cf234c5e vox-adv-cpk.pth.tar

from avatarify-python.

no-karma-no-cry avatar no-karma-no-cry commented on June 15, 2024

And I have interesting error:
[ERROR:0] global /Users/travis/build/skvark/opencv-python/opencv/modules/videoio/src/cap.cpp (193) open VIDEOIO(AVFOUNDATION): raised unknown C++ exception! Cannot open camera
I don't have any users named "travis" on my Mac

from avatarify-python.

LugarkPirog avatar LugarkPirog commented on June 15, 2024

@LugarkPirog @Defolters make sure model checkpoint is not broken. Check md5sum:
46b26eabacbcf1533ac66dc5cf234c5e vox-adv-cpk.pth.tar

d41d8cd98f00b204e9800998ecf8427e vox-adv-cpk.pth.tar
deleted the file and reloaded it via download_data.sh, thats the result

from avatarify-python.

karfly avatar karfly commented on June 15, 2024

Hi, @no-karma-no-cry!
Try to change CAMID in run_mac.sh script from 0 to 1 or 2.

from avatarify-python.

Defolters avatar Defolters commented on June 15, 2024

@LugarkPirog As I understand, size of vox-adv-cpk.pth.tar should be 750.9 MB.

from avatarify-python.

zbershadsky avatar zbershadsky commented on June 15, 2024

Hello @karfly. Have you faced this error?

0: ./avatars/einstein.jpg
1: ./avatars/eminem.jpg
2: ./avatars/jobs.jpg
3: ./avatars/mona.jpg
4: ./avatars/obama.jpg
5: ./avatars/potter.jpg
6: ./avatars/ronaldo.png
7: ./avatars/schwarzenegger.png
load checkpoints..
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
config = yaml.load(f)
2020-04-08 23:27:05.985 python[51869:4970703] alloc
2020-04-08 23:27:05.985 python[51869:4970703] query 2
2020-04-08 23:27:05.985 python[51869:4970703] release 2
2020-04-08 23:27:05.985 python[51869:4970703] ** MyPlugInitializeWithObjectID
2020-04-08 23:27:05.986 python[51869:4970703] init
2020-04-08 23:27:05.986 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:05.986 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:05.986 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.072 python[51869:4970703] Trying to get Surface
2020-04-08 23:27:06.088 python[51869:4970703] Found Surface
2020-04-08 23:27:06.088 python[51869:4970703] Surface is not in use
2020-04-08 23:27:06.088 python[51869:4970703] Surface is 0x140243500813216
2020-04-08 23:27:06.089 python[51869:4970703] Driver name is 8 CamTwist
2020-04-08 23:27:06.090 python[51869:4970703] <CMVideoFormatDescription 0x7f8cfc7c2f00 [0x7fff9019fd10]> {
mediaType:'vide'
mediaSubType:'BGRA'
mediaSpecific: {
codecType: 'BGRA' dimensions: 320 x 240
}
extensions: {{
CVBytesPerRow = 1280;
CVFieldCount = 1;
FormatName = "Component Video - CCIR-601 RGB";
"com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-08 23:27:06.090 python[51869:4970703] Name CamTwist
2020-04-08 23:27:06.090 python[51869:4970703] alloc
2020-04-08 23:27:06.090 python[51869:4970703] query 2
2020-04-08 23:27:06.090 python[51869:4970703] release 2
2020-04-08 23:27:06.090 python[51869:4970703] ** MyPlugInitializeWithObjectID
2020-04-08 23:27:06.090 python[51869:4970703] init
2020-04-08 23:27:06.097 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.098 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.098 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.098 python[51869:4970703] <CMVideoFormatDescription 0x7f8cfc7c7ae0 [0x7fff9019fd10]> {
mediaType:'vide'
mediaSubType:'2vuy'
mediaSpecific: {
codecType: '2vuy' dimensions: 320 x 240
}
extensions: {{
CVFieldCount = 1;
CVImageBufferColorPrimaries = "SMPTE_C";
CVImageBufferTransferFunction = "ITU_R_709_2";
CVImageBufferYCbCrMatrix = "ITU_R_601_4";
FormatName = "Component Video - CCIR-601 uyvy";
"com.apple.cmio.format_extension.video.only_has_i_frames" = 1;
}}
}
2020-04-08 23:27:06.098 python[51869:4970703] Name CamTwist (2VUY)
2020-04-08 23:27:06.131 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.132 python[51869:4970703] enog
2020-04-08 23:27:06.132 python[51869:4970703] bolg
2020-04-08 23:27:06.132 python[51869:4970703] 0
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.132 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.132 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.132 python[51869:4970703] scope bolg
2020-04-08 23:27:06.133 python[51869:4970703] elt 0
2020-04-08 23:27:06.134 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.134 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.134 python[51869:4970703] scope bolg
2020-04-08 23:27:06.153 python[51869:4970703] elt 0
2020-04-08 23:27:06.153 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.153 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.153 python[51869:4970703] scope bolg
2020-04-08 23:27:06.153 python[51869:4970703] elt 0
2020-04-08 23:27:06.153 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.153 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.153 python[51869:4970703] scope bolg
2020-04-08 23:27:06.153 python[51869:4970703] elt 0
2020-04-08 23:27:06.153 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.153 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.153 python[51869:4970703] scope bolg
2020-04-08 23:27:06.153 python[51869:4970703] elt 0
2020-04-08 23:27:06.153 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.153 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.153 python[51869:4970703] scope bolg
2020-04-08 23:27:06.153 python[51869:4970703] elt 0
2020-04-08 23:27:06.158 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.158 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.158 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.158 python[51869:4970703] scope bolg
2020-04-08 23:27:06.158 python[51869:4970703] elt 0
2020-04-08 23:27:06.158 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.158 python[51869:4970703] grrf
2020-04-08 23:27:06.158 python[51869:4970703] bolg
2020-04-08 23:27:06.158 python[51869:4970703] 0
2020-04-08 23:27:06.158 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.158 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.158 python[51869:4970703] scope bolg
2020-04-08 23:27:06.158 python[51869:4970703] elt 0
2020-04-08 23:27:06.159 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.159 python[51869:4970703] grrf
2020-04-08 23:27:06.159 python[51869:4970703] bolg
2020-04-08 23:27:06.159 python[51869:4970703] 0
2020-04-08 23:27:06.160 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.160 python[51869:4970703] trfn
2020-04-08 23:27:06.160 python[51869:4970703] bolg
2020-04-08 23:27:06.160 python[51869:4970703] 0
2020-04-08 23:27:06.160 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.160 python[51869:4970703] trfm
2020-04-08 23:27:06.160 python[51869:4970703] bolg
2020-04-08 23:27:06.160 python[51869:4970703] 0
2020-04-08 23:27:06.160 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.160 python[51869:4970703] trfn
2020-04-08 23:27:06.160 python[51869:4970703] bolg
2020-04-08 23:27:06.160 python[51869:4970703] 0
2020-04-08 23:27:06.161 python[51869:4970703] DN: CamTwist
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.161 python[51869:4970703] dulp
2020-04-08 23:27:06.161 python[51869:4970703] tpni
2020-04-08 23:27:06.161 python[51869:4970703] 0
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.161 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.161 python[51869:4970703] scope bolg
2020-04-08 23:27:06.161 python[51869:4970703] elt 0
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.161 python[51869:4970703] enog
2020-04-08 23:27:06.161 python[51869:4970703] bolg
2020-04-08 23:27:06.161 python[51869:4970703] 0
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.161 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.163 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.163 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.163 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.163 python[51869:4970703] scope bolg
2020-04-08 23:27:06.163 python[51869:4970703] elt 0
2020-04-08 23:27:06.164 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.164 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.164 python[51869:4970703] scope bolg
2020-04-08 23:27:06.164 python[51869:4970703] elt 0
2020-04-08 23:27:06.164 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.164 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.164 python[51869:4970703] scope bolg
2020-04-08 23:27:06.164 python[51869:4970703] elt 0
2020-04-08 23:27:06.164 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.164 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.164 python[51869:4970703] scope bolg
2020-04-08 23:27:06.222 python[51869:4970703] elt 0
2020-04-08 23:27:06.222 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.222 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.222 python[51869:4970703] scope bolg
2020-04-08 23:27:06.222 python[51869:4970703] elt 0
2020-04-08 23:27:06.222 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.222 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.222 python[51869:4970703] scope bolg
2020-04-08 23:27:06.222 python[51869:4970703] elt 0
2020-04-08 23:27:06.222 python[51869:4970703] MyPlugObjectSetPropertyData
2020-04-08 23:27:06.222 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.222 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.222 python[51869:4970703] scope bolg
2020-04-08 23:27:06.222 python[51869:4970703] elt 0
2020-04-08 23:27:06.223 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.223 python[51869:4970703] grrf
2020-04-08 23:27:06.223 python[51869:4970703] bolg
2020-04-08 23:27:06.251 python[51869:4970703] 0
2020-04-08 23:27:06.252 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.252 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.252 python[51869:4970703] scope bolg
2020-04-08 23:27:06.252 python[51869:4970703] elt 0
2020-04-08 23:27:06.252 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.252 python[51869:4970703] grrf
2020-04-08 23:27:06.252 python[51869:4970703] bolg
2020-04-08 23:27:06.252 python[51869:4970703] 0
2020-04-08 23:27:06.252 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.252 python[51869:4970703] trfn
2020-04-08 23:27:06.252 python[51869:4970703] bolg
2020-04-08 23:27:06.252 python[51869:4970703] 0
2020-04-08 23:27:06.252 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.252 python[51869:4970703] trfm
2020-04-08 23:27:06.252 python[51869:4970703] bolg
2020-04-08 23:27:06.252 python[51869:4970703] 0
2020-04-08 23:27:06.252 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.268 python[51869:4970703] trfn
2020-04-08 23:27:06.268 python[51869:4970703] bolg
2020-04-08 23:27:06.269 python[51869:4970703] 0
2020-04-08 23:27:06.269 python[51869:4970703] DN: CamTwist (2VUY)
2020-04-08 23:27:06.269 python[51869:4970703] MyPlugObjectHasProperty
2020-04-08 23:27:06.269 python[51869:4970703] dulp
2020-04-08 23:27:06.269 python[51869:4970703] tpni
2020-04-08 23:27:06.269 python[51869:4970703] 0
2020-04-08 23:27:06.269 python[51869:4970703] MyPlugObjectGetPropertyDataSize
2020-04-08 23:27:06.269 python[51869:4970703] sel dnwo
2020-04-08 23:27:06.269 python[51869:4970703] scope bolg
2020-04-08 23:27:06.269 python[51869:4970703] elt 0
2020-04-08 23:27:06.473 python[51869:4970703] MyPlugObjectIsPropertySettable
2020-04-08 23:27:06.473 python[51869:4970703] MyPlugObjectIsPropertySettable
2020-04-08 23:27:06.473 python[51869:4970703] MyPlugObjectIsPropertySettable
2020-04-08 23:27:06.473 python[51869:4970703] MyPlugObjectSetPropertyData
run_mac.sh: line 6: 51869 Abort trap: 6 python cam_fomm.py --config $CONFIG --checkpoint $CKPT --cam $CAMID --relative --adapt_scale --no-pad

from avatarify-python.

no-karma-no-cry avatar no-karma-no-cry commented on June 15, 2024

Hi, @no-karma-no-cry!
Try to change CAMID in run_mac.sh script from 0 to 1 or 2.

Thanks! Camera works now

from avatarify-python.

karfly avatar karfly commented on June 15, 2024

If you experience problems with streaming using ffmpeg (like Broken pipe), you can try a different method for streaming, which we used for Mac.

You need any software that can capture a separate window and stream it to a virtual camera. For Mac we use CamTwist, and I believe there're many alternatives for Linux (e.g. WebcamStudio).

So just follow Mac installation and running instructions but change CamTwist to some alternative software.

from avatarify-python.

Defolters avatar Defolters commented on June 15, 2024

@alievk Now it works, thank you!

from avatarify-python.

freemsk1 avatar freemsk1 commented on June 15, 2024

run.sh file FFCMD='ffmpeg -re -i pipe:0 -vf format=pix_fmts=yuv420p -f v4l2 /dev/video2'

Works like a charm! thank you

from avatarify-python.

liviniuk avatar liviniuk commented on June 15, 2024

Did anyone figure out a fix for the BrokenPipeError?

from avatarify-python.

ZackPashkin avatar ZackPashkin commented on June 15, 2024

I was able to fix the BrokenPipeError and run the script but neither skype or zoop doesn't see avatarify
Ubuntu 18.04

from avatarify-python.

liviniuk avatar liviniuk commented on June 15, 2024

@ZackPashkin how did you fix it?

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

I was able to fix the BrokenPipeError and run the script but neither skype or zoop doesn't see avatarify
Ubuntu 18.04

Please describe the steps you follow. Do you see avatar image in the popup window?

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

We're preparing a substitution to ffmpeg, so BrokenPipe error should be eliminated.

from avatarify-python.

freemsk1 avatar freemsk1 commented on June 15, 2024

Linux Mint 19.3
I followed the setup guide
then changed to /dev/video2 in this line FFCMD='ffmpeg -re -i pipe:0 -vf format=pix_fmts=yuv420p -f v4l2 /dev/video2' in run.sh (CAMID=0)
and it is working. Both, skype and zoom see the camera

from avatarify-python.

huan avatar huan commented on June 15, 2024

@levongh Thanks for your solution, it saved my avatar today.

It would be great if we can check in the shell script to decide whether we should use /dev/video1 or /dev/video2 because the system camera numbers are variable.

from avatarify-python.

IvoPereira avatar IvoPereira commented on June 15, 2024

@alievk I have been able to run it with the workaround, however the Virtual Camera does not appear in Zoom neither in Skype.

Ubuntu 18.04 here. Any logs I may provide you?

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

@IvoPereira Please show output of v4l2-ctl --list-devices and bash run.sh.

from avatarify-python.

carayi avatar carayi commented on June 15, 2024

Could you provide full output without streaming?

Same issue. Here's what I get when running without streaming.

0: ./avatars/einstein.jpg
1: ./avatars/eminem.jpg
2: ./avatars/jobs.jpg
3: ./avatars/mona.jpg
4: ./avatars/obama.jpg
5: ./avatars/potter.jpg
6: ./avatars/ronaldo.png
7: ./avatars/schwarzenegger.png
load checkpoints..
cam_fomm.py:26: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2705: UserWarning: Default grid_sample and affine_grid behavior has changed to align_corners=False since 1.3.0. Please specify align_corners=True if the old behavior is desired. See the documentation of grid_sample for details.
  warnings.warn("Default grid_sample and affine_grid behavior has changed "
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:2503: UserWarning: Default upsampling behavior when mode=bilinear is changed to align_corners=False since 0.4.0. Please specify align_corners=True if the old behavior is desired. See the documentation of nn.Upsample for details.
  warnings.warn("Default upsampling behavior when mode={} is changed "
/home/viktor/anaconda3/envs/avatarify/lib/python3.8/site-packages/torch/nn/functional.py:1351: UserWarning: nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.
  warnings.warn("nn.functional.sigmoid is deprecated. Use torch.sigmoid instead.")

I am facing the same issue, how did you solve it?

from avatarify-python.

jjenly avatar jjenly commented on June 15, 2024

Hi!
The same issue
Linux 5.3.0-42-generic #34~18.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

try catch as temporary fix works for me
:290 try:
sys.stdout.buffer.write(buf)
except (BrokenPipeError):
pass

But skype, zoom didnt see avatarify (platform:v4l2loopback-000):/dev/video9

Devices created as expected.
Its seems that they w8 on /dev/video0, but its busy and apps have no camera at all

from avatarify-python.

eltonnuness avatar eltonnuness commented on June 15, 2024

Hi!
The same issue
Linux 5.3.0-42-generic #34~18.04.1-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux

try catch as temporary fix works for me
:290 try:
sys.stdout.buffer.write(buf)
except (BrokenPipeError):
pass

But skype, zoom didnt see avatarify (platform:v4l2loopback-000):/dev/video9

Devices created as expected.
Its seems that they w8 on /dev/video0, but its busy and apps have no camera at all

Great, It's work here, but I can't select this camera in video apps.

from avatarify-python.

alievk avatar alievk commented on June 15, 2024

Closing this issue since ffmpeg piping is now replaced with pyfakewebcam.

Please update to the latest version.

from avatarify-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.