pytorch-openpose icon indicating copy to clipboard operation
pytorch-openpose copied to clipboard

height not divisible by 2

Open zijin2 opened this issue 3 years ago • 7 comments

Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) [libx264 @ 0x55714fd995c0] height not divisible by 2 (400x711) Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed! Traceback (most recent call last): File "demo_video.py", line 132, in writer(posed_frame) File "demo_video.py", line 108, in call self.ff_proc.stdin.write(frame.tobytes()) BrokenPipeError: [Errno 32] Broken pipe

请教下711是怎么来的呢 输入的视频分明长宽都是偶数

zijin2 avatar Jul 13 '21 09:07 zijin2

Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) [libx264 @ 0x55714fd995c0] height not divisible by 2 (400x711) Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed! Traceback (most recent call last): File "demo_video.py", line 132, in writer(posed_frame) File "demo_video.py", line 108, in call self.ff_proc.stdin.write(frame.tobytes()) BrokenPipeError: [Errno 32] Broken pipe

请教下711是怎么来的呢 输入的视频分明长宽都是偶数

你后来解决这个问题了吗, 我遇到了相似的情况

VoidLLY avatar Sep 13 '21 13:09 VoidLLY

same problem

mnauf avatar Jan 21 '22 07:01 mnauf

any news on this?

ThanosUTH avatar Jun 06 '22 15:06 ThanosUTH

Dont care, use cv2.imencode(".jpg", frame)[1].tobytes() to replace frame.tobytes()

sibadakesi avatar Sep 13 '22 07:09 sibadakesi

input_frame[1] 换成(int)(input_frame[1]/2)*2

YatsenNo1 avatar Nov 18 '22 01:11 YatsenNo1

Dont care, use cv2.imencode(".jpg", frame)[1].tobytes() to replace frame.tobytes()

我替换了之后,产生下面的报错: ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 10.2.1 (GCC) 20200726 configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --enable-librav1e --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf 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 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 Input #0, rawvideo, from 'pipe:': Duration: N/A, start: 0.000000, bitrate: 294798 kb/s Stream #0:0: Video: rawvideo (BGR[24] / 0x18524742), bgr24, 853x480, 294798 kb/s, 30 tbr, 30 tbn, 30 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) [libx264 @ 00000234c0d49300] width not divisible by 2 (853x480) Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed! Traceback (most recent call last): File "demo_video.py", line 132, in writer(posed_frame) File "demo_video.py", line 108, in call self.ff_proc.stdin.write(cv2.imencode(".jpg", frame)[1].tobytes()) BrokenPipeError: [Errno 32] Broken pipe

vielleicht-fe avatar Mar 19 '23 09:03 vielleicht-fe

有解决的办法吗

zmhsmart avatar Apr 18 '23 12:04 zmhsmart