python blur_faces.py media/friends.mp4 --mode all --censor-type pixelation
media/friends.mp4
mode='all', model='hog', censor_type='pixelation', count=1, in_face_file=None
width=1280, height=720, length=157, fps=23.976, codec='avc1'
[ERROR:0@0.024] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2927) open Could not find encoder for codec_id=27, error: Encoder not found
[ERROR:0@0.024] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (3002) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 157/158 [01:13<00:00, 2.13it/s]
ffmpeg version N-114385-g4743c9e87a Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 59. 7.100 / 59. 7.100
libavcodec 61. 2.100 / 61. 2.100
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5609d1e68000] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5609d1e68000] moov atom not found
[in#0 @ 0x5609d1e67cc0] Error opening input: Invalid data found when processing input
Error opening input file /tmp/tmpf9ffrai0.mp4.
Error opening input files: Invalid data found when processing input
Traceback (most recent call last):
File "blur_faces.py", line 143, in
blurfaces()
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "blur_faces.py", line 137, in blurfaces
ffmpeg.run(stream)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/ffmpeg/_run.py", line 325, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)
My ffmpeg
ffmpeg -hwaccels
ffmpeg version N-114385-g4743c9e87a Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 59. 7.100 / 59. 7.100
libavcodec 61. 2.100 / 61. 2.100
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
Hardware acceleration methods:
vdpau
cuda
drm
python blur_faces.py media/friends.mp4 --mode all --censor-type pixelation
media/friends.mp4
mode='all', model='hog', censor_type='pixelation', count=1, in_face_file=None
width=1280, height=720, length=157, fps=23.976, codec='avc1'
[ERROR:0@0.024] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (2927) open Could not find encoder for codec_id=27, error: Encoder not found
[ERROR:0@0.024] global /io/opencv/modules/videoio/src/cap_ffmpeg_impl.hpp (3002) open VIDEOIO/FFMPEG: Failed to initialize VideoWriter
99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 157/158 [01:13<00:00, 2.13it/s]
ffmpeg version N-114385-g4743c9e87a Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 59. 7.100 / 59. 7.100
libavcodec 61. 2.100 / 61. 2.100
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5609d1e68000] Format mov,mp4,m4a,3gp,3g2,mj2 detected only with low score of 1, misdetection possible!
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x5609d1e68000] moov atom not found
[in#0 @ 0x5609d1e67cc0] Error opening input: Invalid data found when processing input
Error opening input file /tmp/tmpf9ffrai0.mp4.
Error opening input files: Invalid data found when processing input
Traceback (most recent call last):
File "blur_faces.py", line 143, in
blurfaces()
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "blur_faces.py", line 137, in blurfaces
ffmpeg.run(stream)
File "/opt/BlurryFaces/src/env/lib/python3.8/site-packages/ffmpeg/_run.py", line 325, in run
raise Error('ffmpeg', out, err)
ffmpeg._run.Error: ffmpeg error (see stderr output for detail)
My ffmpeg
ffmpeg -hwaccels
ffmpeg version N-114385-g4743c9e87a Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.2)
configuration: --enable-cuda-nvcc --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
libavutil 59. 7.100 / 59. 7.100
libavcodec 61. 2.100 / 61. 2.100
libavformat 61. 0.100 / 61. 0.100
libavdevice 61. 0.100 / 61. 0.100
libavfilter 10. 0.100 / 10. 0.100
libswscale 8. 0.100 / 8. 0.100
libswresample 5. 0.100 / 5. 0.100
Hardware acceleration methods:
vdpau
cuda
drm