各位大佬,小弟最近在研究KVS系统,因为不确定KVS是否能满足自己的需求,所以先购买了一个月的使用期,在搬瓦工上弄了个4G内存的vps测试研究系统。
结果各种KVS需要的环境安装出错,无奈只能花了99美元请KVS的官方配置服务器,到了安装配置ffmpeg的时候KVS后台一直报错,KVS技术说是服务器CPU指令集权限不够,让我找VPS的技术支持要更高的指令集权限,然后搬瓦工那边又告诉我不能提供最高的CPU指令集权限。。。。WTF,前后各种花费快小两千了,结果现在一个完整的站点还没搭起来。。。请教各位大佬,有没有在搬瓦工上完整配置过ffmpeg的?系统是CentOS 7
具体报错的错误提示如下:
nice -n 4 /usr/bin/ffmpeg -y -i /home/admin/web/xxxx.com/public_html/admin/data/plugins/audit/test_video-11577847.tmp -vcodec libx264 -movflags +faststart -threads 0 -r 25 -g 50 -crf 25 -me_method hex -trellis 0 -bf 8 -acodec aac -strict -2 -ar 44100 -ab 128k -f mp4 /home/admin/web/xxxx.com/public_html/admin/data/plugins/audit/test_video-11577847_720p.mp4 2>&1: ffmpeg version 2.8.15 Copyright (c) 2000-2018 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-36)
configuration: –prefix=/usr –bindir=/usr/bin –datadir=/usr/share/ffmpeg –incdir=/usr/include/ffmpeg –libdir=/usr/lib64 –mandir=/usr/share/man –arch=x86_64 –optflags=’-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong –param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic’ –extra-ldflags=’-Wl,-z,relro ‘ –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libvo-amrwbenc –enable-version3 –enable-bzlib –disable-crystalhd –enable-gnutls –enable-ladspa –enable-libass –enable-libcdio –enable-libdc1394 –enable-libfdk-aac –enable-nonfree –disable-indev=jack –enable-libfreetype –enable-libgsm –enable-libmp3lame –enable-openal –enable-libopenjpeg –enable-libopus –enable-libpulse –enable-libschroedinger –enable-libsoxr –enable-libspeex –enable-libtheora –enable-libvorbis –enable-libv4l2 –enable-libx264 –enable-libx265 –enable-libxvid –enable-x11grab –enable-avfilter –enable-avresample –enable-postproc –enable-pthreads –disable-static –enable-shared –enable-gpl –disable-debug –disable-stripping –shlibdir=/usr/lib64 –enable-runtime-cpudetect
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
Input #0, avi, from ‘/home/admin/web/xxxx.com/public_html/admin/data/plugins/audit/test_video-11577847.tmp’:
Metadata:
encoder : Lavf52.78.3
Duration: 00:00:31.07, start: 0.000000, bitrate: 348 kb/s
Stream #0:0: Video: mpeg4 (Simple Profile) (FMP4 / 0x34504D46), yuv420p, 320×240 [SAR 1:1 DAR 4:3], 270 kb/s, 23.98 fps, 23.98 tbr, 23.98 tbn, 24k tbc
Stream #0:1: Audio: mp2 (P[0][0][0] / 0x0050), 48000 Hz, stereo, s16p, 64 kb/s
ffmpeg: common/cpu.c:251: x264_cpu_detect: Assertion `!(cpu&(0x0000040|0x0000080))’ failed.
KVS技术跟我说如下:
Please ask your host support to switch the processor emulation mode on this server to host-passthrough , we need this for correct works of ffmpeg library.
We need this for ffmpeg, now we see error "ffmpeg: common/cpu.c:251: x264_cpu_detect: Assertion `!(cpu&(0x0000040|0x0000080))’ failed." – that’s easy to switch from "QEMU Virtual CPU version (cpu64-rhel6)" to " host-passthrough" or host support can’t make this?
然后搬瓦工跟我说:
Unfortunately we are not able to offer host-passthrough cpuid at this time. Do you know what specific flag ffmpeg is looking for?
崩溃中。。。
上海网友:我知道用VPS搭视频站不现实,我只是先来测试一下,看下系统如何,回头存储和转码肯定要用独立服务器的。
四川网友:Bwg 那破机器不能正经用的,
湖南网友:也知道VPS可能会有权限问题,但是没想到一个站点环境都没办法搭建。。。唉。
山西网友:
理论上要CPU特性是因为指令集能加速转码,去掉对应参数也能转,就是速度可能会低一点
虚拟化是可以提供CPU特性的,但是因为有不同CPU指令集不同的原因,不能动态迁移,所以很多商家默认都是关的,也有一部分原因是防止挖矿,这个功能完全就看商家怎么做了
天津网友:感谢大佬回复,如果说找到ffmpeg需要具体哪条指令集,让搬瓦工客服打开对应的特性,也就可以解决了是么?
澳门网友:瓦工只适合挂个55 正经作战换个别的吧
上海网友:瓦工大部分套餐都是限制CPU的,计算你装上跑一会儿就给你警告了。
贵州网友:这个价格。。不是可以上杜甫吗
山西网友:
直接用二进制包不行么?
用VPS做视频站的路过
瓦工18刀款
ffmpeg参数太多,懒得一个个查是什么东西,直接复制过来
随便找了个MP4,好像没啥问题