我的目标很简单,我有几个webm文件需要合并,但首先我需要确定它们的持续时间.
似乎webm文件作为流播放,因此无法分辨每个文件的长度.
我一直在使用ffprobe来完成这项工作,但返回的持续时间是N/A.我使用的命令是:
ffprobe -i input.file -show_format | grep duration
Run Code Online (Sandbox Code Playgroud)
谢谢.
ffprobe列表的完整输出如下:
ffprobe version 2.6.2 Copyright (c) 2007-2015 the FFmpeg developers
built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
configuration: --prefix=/usr/local/Cellar/ffmpeg/2.6.2 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libmp3lame --enable-libvo-aacenc --enable-libxvid --enable-libtheora --enable-libvorbis --enable-libvpx --enable-vda
libavutil 54. 20.100 / 54. 20.100
libavcodec 56. 26.100 / 56. 26.100
libavformat 56. 25.101 / 56. 25.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 11.102 / 5. …
Run Code Online (Sandbox Code Playgroud) 在Google io 2011中,David Chandler提到您可以使用append()方法链接不同的请求上下文,但在实践中,我不知道如何在它们具有不同的接收器时将它们链接起来,使用to()然后触发( )?
请帮忙.
我最近研究了一个大量使用Guava提供的集合过滤功能的项目,但我发现这样的东西不会产生预期的行为:
Predicate<ProductClassDTO> secLevelPredicate = new Predicate<ProductClassDTO>() {
@Override
public boolean apply(ProductClassDTO pcLevel2) {
if (pcLevel2.getFatherNodeSid() != null)
return pcLevel2.getFatherNodeSid() == dto.getSid();
else
return false;
}
};
Run Code Online (Sandbox Code Playgroud)
dto object是外部循环中的对象,但仍可访问.
返回那个apply方法永远不会得到True,但是如果我用实数来替换dto.getSid(),比如1740,这是父节点数从db得到的,结果很好.
所以我认为我无法在apply()中评估变量?
我注意到apply() javadoc有一行说:
它的执行不会引起任何可观察到的副作用
这应该是这个问题的关键吗?