【问题标题】:Output format for a still image from avconv来自 avconv 的静止图像的输出格式
【发布时间】:2015-05-08 07:56:42
【问题描述】:

我想从我的 mpeg 视频中生成静止图像以进行管道传输,类似于

avconv -ss 0:01 -i my.mpg -frames:v 1 -f jpeg -

但是,avconv (ffmpeg) 在允许的输出格式中没有 jpeg。通过输出扩展名指定格式没有问题:

avconv -ss 0:01 -i my.mpg -frames:v 1 my.jpg; cat my.jpg

但我不想创建冗余文件。有什么提示吗?

【问题讨论】:

    标签: image format output avconv


    【解决方案1】:

    docs,您可以通过将输出文件名设置为管道协议来管道到标准输出,即pipe:1。尽管没有明确说明,但您可以将输出格式设置为文件扩展名,就像设置普通文件名一样:

    avconv -ss 0:01 -i my.mpg -frames:v 1 pipe:1.jpg
    

    旁注:

    请注意,某些格式(通常是 MOV)要求输出协议是可搜索的,因此它们会因管道输出协议而失败

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-12-11
      • 2019-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-23
      • 1970-01-01
      相关资源
      最近更新 更多