与独立的Dell-Precision-T1700(Quadro-k620)相比,使用以下选项编译时的FFMPEG会在Amazon G2实例(g2.2xlarge,GRID K520)上产生极佳的性能
"--enable-nonfree --enable-gpl --enable-version3 --enable-shared --enable pthreads [b]--enable-nvenc[/b] --enable-runtime-cpudetect --disable-doc --enable-libmp3lame"
Run Code Online (Sandbox Code Playgroud)
在ffmpeg二进制文件上花了66秒用以下命令转码5.22分钟BVE_Localize.mp4文件.
时间ffmpeg -y -i BVE_Localize.mp4 -strict -2 -vcodec nvenc_h264 -b 5000k -acodec aac -ab 256k -f mpegts BVELocalize.ts(在G2上花费1m6.990s)
在Dell-Precision-T1700(基于Xeon双核,Quadro K620)的工作站上执行相同的ffmpeg命令时,需要0m41.572秒.
我希望ffmpeg在Amazon G2实例上表现更好.你觉得我怎么会失踪?我的Amazon G2实例配置是Ubuntu 14.04 64位,Cuda 7.0,352.55驱动程序,MSI禁用,NVIDIA SDK 5.0.1
在下面的代码示例中,我正在尝试获取员工记录流{Country,Employer,Name,Salary,Age}并在每个国家/地区倾销最高薪员工.不幸的是,多个键不起作用.
只有KeyBy(雇主)反映,因此我得不到正确的结果.我错过了什么?
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
DataStream<Employee> streamEmployee = env.addSource(
new FlinkKafkaConsumer010<ObjectNode>("flink-demo", new JSONDeserializationSchema(), properties))
.map(new MapFunction<ObjectNode, Employee>() {
private static final long serialVersionUID = 6111226274068863916L;
@Override
public Employee map(ObjectNode value) throws Exception {
final Gson gson = new GsonBuilder().create();
Employee uMsg = gson.fromJson(value.toString(), Employee.class);
return uMsg;
}
});
KeyedStream<Employee, String> employeesKeyedByCountryndEmployer = streamEmployee
.keyBy(new KeySelector<Employee, String>() {
private static final long serialVersionUID = -6867736771747690202L;
@Override
public String getKey(Employee value) throws Exception {
// TODO Auto-generated method stub
return value.getCountry(); …Run Code Online (Sandbox Code Playgroud)