cpu.c:253: x264_cpu_detect: Assertion

ubuntu 16.04_x64 server
install ffmpeg through apt-get install
python 3

when I try

from moviepy.editor import * clip = VideoFileClip("/root/video.mp4") clip.ipython_display(width=280)

Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/html_tools.py", line 219, in ipython_display center=center, rd_kwargs=rd_kwargs, **html_kwargs)) File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/html_tools.py", line 97, in html_embed clip.write_videofile(**kwargs) File "", line 2, in write_videofile File "/usr/local/lib/python2.7/dist-packages/moviepy/decorators.py", line 54, in requires_duration return f(clip, *a, **k) File "", line 2, in write_videofile File "/usr/local/lib/python2.7/dist-packages/moviepy/decorators.py", line 137, in use_clip_fps_by_default return f(clip, *new_a, **new_kw) File "", line 2, in write_videofile File "/usr/local/lib/python2.7/dist-packages/moviepy/decorators.py", line 22, in convert_masks_to_RGB return f(clip, *a, **k) File "/usr/local/lib/python2.7/dist-packages/moviepy/video/VideoClip.py", line 349, in write_videofile progress_bar=progress_bar) File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 216, in ffmpeg_write_video writer.write_frame(frame) File "/usr/local/lib/python2.7/dist-packages/moviepy/video/io/ffmpeg_writer.py", line 178, in write_frame raise IOError(error) IOError: [Errno 32] Broken pipe

MoviePy error: FFMPEG encountered the following error while writing file temp.mp4:

ffmpeg: common/cpu.c:253: x264_cpu_detect: Assertion `!(cpu&(0x0000040|0x0000080))' failed.

what happend?

@Ronald S. Bultje

I am using a virtual machine

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : QEMU Virtual CPU version (cpu64-rhel6)
stepping : 3
microcode : 0x1
cpu MHz : 3504.000
cache size : 4096 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm fsgsbase bmi1 avx2 smep bmi2 xsaveopt
bugs :
bogomips : 7008.00
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual
power management:

1 answer

  • answered 2017-10-11 15:09 Ronald S. Bultje

    See the code, you appear to have a special (unexpected) type of processor (pentium-M, but one with SSSE3/SSE4 support). I'd get on IRC (freenode: #x264dev) or the mailinglist and ask the developers to fix it. Also provide the output of cat /proc/cpuinfo.


    Reflecting your cpuinfo, x264 indeed doesn't always work if the cpuinfo is "broken", and your qemu setup doesn't reflect an existing chip. I guess I agree that x264 shouldn't really break (there's no reason), so here is a patch to fix it going forward. However, for your current patch, I would simply change the model in your qemu setup (-cpu option, I believe) to accurately reflect that it is a Haswell.