在视频转码过程中,如何确定ffmpeg使用哪些编解码器对视频进行解码和转码。
例如。当我做ffmpeg -i input.mp4 output.avi
我如何知道哪些编解码器用于解码输入文件并编码到输出?
答案 0 :(得分:2)
@Koby Douek的回答不适用于此。
Mediainfo和ffprobe将指示比特流语法,但要回答OP的问题:" 如何知道哪些编解码器用于解码输入文件并编码到输出?",可以运行
ffmpeg -i input.mp4 output.avi 2>&1 | sed -n "/Stream mapping/,/Press/p"
其输出将类似于
Stream #0:1 -> #0:0 (h264 (native) -> h264 (libx264))
Stream #0:0 -> #0:1 (aac (native) -> aac (native))
Press [q] to stop, [?] for help
这告诉我们映射的第一个输出流是H.264类型的第二个输入流,并使用ffmpeg的原生H.264解码器进行解码。使用libx264编码器将此流编码为H.264。
给定命令实际执行转换,但映射信息在处理开始之前显示,因此要么中止命令,要么通过添加-report
将日志重定向到文件并解析该文件以获取信息。
答案 1 :(得分:1)
如果你有<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup>
<VisualState x:Name="Narrow">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="0" />
</VisualState.StateTriggers>
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="SliderProgress" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="TimeProgress" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="btnPlayList" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
<VisualState x:Name="Wide">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="600" />
</VisualState.StateTriggers>
<Storyboard>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="SliderProgress" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="TimeProgress" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="btnPlayList" Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid>
...
</Grid>
</Grid>
:
auto get_the_correct_x=[](){
const auto temp=foo();
return temp==0?bar():temp;
}
const auto x=get_the_correct_x();
如果没有,请使用ffprobe
(get_the_correct_x
安装附带):
mediainfo