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

Too many print message broken VsPipe #7

Open
dan64 opened this issue Feb 14, 2024 · 0 comments
Open

Too many print message broken VsPipe #7

dan64 opened this issue Feb 14, 2024 · 0 comments

Comments

@dan64
Copy link

dan64 commented Feb 14, 2024

In your code there any many "print" messages, which are good for the development, but they can cause problem with "VSPipe" and in general with any "pipe" solution because too many messages in few time can broken the "pipe".
I experienced that with the CUDA version of "dlib" where the messages are written every 0.4 secs. It seems that the CPU version of "dlib" is not causing this kind of problem because the messages are written every 20 secs.

With the CUDA enabled version the are some clips where the encoding stop with the following error message:

Error: fwrite() call failed when writing frame: xxx, plane: 0, errno: 32

To fix this issue I commented out the "print" in the following lines

->face_restoration_helper.py
Line 183: print('No face detected. Try to increase upsample_num_times.')
Line 187: print('Detect several faces and only keep the largest.')
->matlab_cp2tform.py
Line 282: print('\n--->uv:')
Line 283: print(uv)
Line 284: print('\n--->xy:')
Line 285: print(xy)
Line 289: print('\n--->trans matrix:')
Line 290: print(trans)
Line 292: print('\n--->trans_inv matrix:')
Line 293: print(trans_inv)
Line 295: print('\n---> apply transform to uv')
Line 296: print('\nxy_m = uv_augmented * trans')
Line 299: print(xy_m)
Line 301: print('\nxy_m = tformfwd(trans, uv)')
Line 303: print(xy_m)
Line 305: print('\n---> apply inverse transform to xy')
Line 306: print('\nuv_m = xy_augmented * trans_inv')
Line 309: print(uv_m)
Line 311: print('\nuv_m = tformfwd(trans_inv, xy)')
Line 313: print(uv_m)
Line 316: print('\nuv_m = tforminv(trans, xy)')
Line 317: print(uv_m)

and then cleared the cache.

Now the vspipe is working as expected.

Please apply the same changes on your version, or add an option in your filter to disable the debug messages.

Thanks
Dan

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

1 participant