eluv-io / blind-video-watermark

Blind video watermarking with great invisibility and robustness.
https://github.com/eluv-io/blind-video-watermark
MIT License
67 stars 16 forks source link

no output file with cli #5

Open AlexanderKozhevin opened 1 month ago

AlexanderKozhevin commented 1 month ago

!bvw embed -a seq -wm 2012 -i test.mp4 -o smalltest_output.mp4 -k 123 456 789 -j 8

OpenCV: FFMPEG: tag 0x34363268/'h264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1' [ERROR:0@0.175] global cap_ffmpeg_impl.hpp:3133 open Could not find encoder for codec_id=27, error: Encoder not found [ERROR:0@0.175] global cap_ffmpeg_impl.hpp:3211 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter Reading:: 0%| | 0/154 [00:00<?, ?it/s] Reading:: 91%|███████████████████████████▎ | 140/154 [00:00<00:00, 313.27it/s] Writing:: 1%|▏ | 1/154 [00:01<02:51, 1.12s/it] Writing:: 1%|▍ | 2/154 [00:01<01:35, 1.59it/s] Writing:: 5%|█▋ | 8/154 [00:01<00:17, 8.38it/s] Writing:: 7%|██▎ | 11/154 [00:02<00:25, 5.69it/s] Writing:: 9%|██▉ | 14/154 [00:02<00:17, 7.93it/s] Writing:: 11%|███▌ | 17/154 [00:03<00:25, 5.47it/s] Writing:: 12%|███▉ | 19/154 [00:03<00:20, 6.60it/s] Writing:: 14%|████▌ | 22/154 [00:03<00:14, 8.93it/s] Writing:: 16%|█████▏ | 25/154 [00:04<00:23, 5.55it/s] Writing:: 19%|██████▏ | 30/154 [00:04<00:13, 8.91it/s] Writing:: 21%|██████▊ | 33/154 [00:05<00:20, 6.03it/s] Writing:: 23%|███████▍ | 36/154 [00:05<00:16, 7.25it/s] Writing:: 26%|████████▎ | 40/154 [00:05<00:12, 9.33it/s] Writing:: 27%|████████▋ | 42/154 [00:06<00:18, 5.94it/s] Writing:: 29%|█████████▎ | 45/154 [00:06<00:14, 7.61it/s] Writing:: 32%|██████████▏ | 49/154 [00:07<00:16, 6.47it/s] Writing:: 33%|██████████▌ | 51/154 [00:07<00:15, 6.48it/s] Writing:: 36%|███████████▋ | 56/154 [00:08<00:09, 10.18it/s] Writing:: 38%|████████████▎ | 59/154 [00:08<00:14, 6.64it/s] Writing:: 40%|████████████▋ | 61/154 [00:09<00:12, 7.42it/s] Writing:: 42%|█████████████▌ | 65/154 [00:09<00:13, 6.55it/s] Writing:: 44%|█████████████▉ | 67/154 [00:10<00:12, 6.82it/s] Writing:: 45%|██████████████▌ | 70/154 [00:10<00:09, 8.95it/s] Writing:: 47%|███████████████▏ | 73/154 [00:10<00:12, 6.55it/s] Writing:: 49%|███████████████▌ | 75/154 [00:11<00:12, 6.27it/s] Writing:: 53%|████████████████▊ | 81/154 [00:12<00:10, 6.93it/s] Writing:: 54%|█████████████████▏ | 83/154 [00:12<00:10, 7.00it/s] Writing:: 56%|█████████████████▊ | 86/154 [00:12<00:07, 8.94it/s] Writing:: 58%|██████████████████▍ | 89/154 [00:13<00:09, 6.84it/s] Writing:: 59%|██████████████████▉ | 91/154 [00:13<00:09, 6.60it/s] Writing:: 62%|███████████████████▋ | 95/154 [00:13<00:06, 9.48it/s] Writing:: 63%|████████████████████▏ | 97/154 [00:14<00:08, 6.66it/s] Writing:: 64%|████████████████████▌ | 99/154 [00:14<00:08, 6.64it/s] Writing:: 66%|████████████████████▎ | 101/154 [00:14<00:06, 7.70it/s] Writing:: 68%|█████████████████████▏ | 105/154 [00:15<00:07, 6.73it/s] Writing:: 69%|█████████████████████▌ | 107/154 [00:15<00:08, 5.85it/s] Writing:: 73%|██████████████████████▋ | 113/154 [00:16<00:05, 7.40it/s] Writing:: 75%|███████████████████████▏ | 115/154 [00:16<00:05, 7.35it/s] Writing:: 76%|███████████████████████▌ | 117/154 [00:16<00:04, 7.63it/s] Writing:: 79%|████████████████████████▎ | 121/154 [00:17<00:04, 7.42it/s] Writing:: 80%|████████████████████████▊ | 123/154 [00:17<00:04, 7.27it/s] Writing:: 81%|█████████████████████████▏ | 125/154 [00:18<00:03, 7.79it/s] Writing:: 84%|█████████████████████████▉ | 129/154 [00:18<00:03, 7.43it/s] Writing:: 85%|██████████████████████████▎ | 131/154 [00:18<00:03, 7.32it/s] Writing:: 86%|██████████████████████████▊ | 133/154 [00:19<00:02, 7.79it/s] Writing:: 88%|███████████████████████████▏ | 135/154 [00:19<00:02, 8.85it/s] Writing:: 89%|███████████████████████████▌ | 137/154 [00:19<00:02, 6.77it/s] Reading:: 100%|██████████████████████████████| 154/154 [00:20<00:00, 313.27it/s] Writing:: 90%|███████████████████████████▉ | 139/154 [00:20<00:02, 6.75it/s] Writing:: 92%|████████████████████████████▍ | 141/154 [00:20<00:01, 8.17it/s] Writing:: 92%|████████████████████████████▌ | 142/154 [00:20<00:01, 6.91it/s] Writing:: 94%|█████████████████████████████▏ | 145/154 [00:20<00:01, 6.93it/s] Writing:: 95%|█████████████████████████████▍ | 146/154 [00:20<00:01, 6.88it/s] Writing:: 95%|█████████████████████████████▌ | 147/154 [00:21<00:01, 6.83it/s] Writing:: 97%|██████████████████████████████▏| 150/154 [00:21<00:00, 9.25it/s] Reading:: 100%|███████████████████████████████| 154/154 [00:21<00:00, 7.13it/s] Writing:: 100%|███████████████████████████████| 154/154 [00:21<00:00, 7.12it/s]

Quakumei commented 1 month ago

OpenCV: FFMPEG: tag 0x34363268/'h264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)' OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1' [ERROR:0@0.175] global cap_ffmpeg_impl.hpp:3133 open Could not find encoder for codec_id=27, error: Encoder not found [ERROR:0@0.175] global cap_ffmpeg_impl.hpp:3211 open VIDEOIO/FFMPEG: Failed to initialize VideoWriter

h264 is unavailable in simple pip install opencv-python. You need to build the package yourself with mp4 support.

This helped me:

sudo apt install build-essential cmake git python3-dev python3-numpy \
libavcodec-dev libavformat-dev libswscale-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer1.0-dev libgtk-3-dev \
libpng-dev libjpeg-dev libopenexr-dev libtiff-dev libwebp-dev \
libopencv-dev x264 libx264-dev libssl-dev ffmpeg

python -m pip install --no-binary opencv-python opencv-python

source: https://github.com/opencv/opencv-python/issues/207 https://stackoverflow.com/questions/70247344/save-video-in-opencv-with-h264-codec https://github.com/opencv/opencv-python/issues/299