首页 > 其他分享 >ffmpeg Synopsis

ffmpeg Synopsis

时间:2024-11-10 10:29:44浏览次数:1  
标签:files ffmpeg Synopsis file input output options

1 Synopsis
ffmpeg [global_options] {[input_file_options] -i input_url} ... {[output_file_options] output_url} ...

2 Description
ffmpeg is a universal media converter. It can read a wide variety of inputs - including live grabbing/recording devices - filter, and transcode them into a plethora of output formats.

ffmpeg reads from an arbitrary number of inputs (which can be regular files, pipes, network streams, grabbing devices, etc.), specified by the -i option, and writes to an arbitrary number of outputs, which are specified by a plain output url. Anything found on the command line which cannot be interpreted as an option is considered to be an output url.

Each input or output can, in principle, contain any number of elementary streams of different types (video/audio/subtitle/attachment/data), though the allowed stream counts and/or types may be limited by the container format. Selecting which streams from which inputs will go into which output is either done automatically or with the -map option (see the Stream selection chapter).

To refer to inputs/outputs in options, you must use their indices (0-based). E.g. the first input is 0, the second is 1, etc. Similarly, streams within an input/output are referred to by their indices. E.g. 2:3 refers to the fourth stream in the third input or output. Also see the Stream specifiers chapter.

As a general rule, options are applied to the next specified file. Therefore, order is important, and you can have the same option on the command line multiple times. Each occurrence is then applied to the next input or output file. Exceptions from this rule are the global options (e.g. verbosity level), which should be specified first.

Do not mix input and output files – first specify all input files, then all output files. Also do not mix options which belong to different files. All options apply ONLY to the next input or output file and are reset between files.

Some simple examples follow.

Convert an input media file to a different format, by re-encoding media streams:
ffmpeg -i input.avi output.mp4
Set the video bitrate of the output file to 64 kbit/s:
ffmpeg -i input.avi -b:v 64k -bufsize 64k output.mp4
Force the frame rate of the output file to 24 fps:
ffmpeg -i input.avi -r 24 output.mp4
Force the frame rate of the input file (valid for raw formats only) to 1 fps and the frame rate of the output file to 24 fps:
ffmpeg -r 1 -i input.m2v -r 24 output.mp4
The format option may be needed for raw input files.

https://www.octfgroup.com/

标签:files,ffmpeg,Synopsis,file,input,output,options
From: https://www.cnblogs.com/sathcal/p/18537700

相关文章

  • About FFmpeg
    FFmpegistheleadingmultimediaframework,abletodecode,encode,transcode,mux,demux,stream,filterandplayprettymuchanythingthathumansandmachineshavecreated.Itsupportsthemostobscureancientformatsuptothecuttingedge.Nomatteri......
  • FFmpeg Libraries for developers
    libavutilisalibrarycontainingfunctionsforsimplifyingprogramming,includingrandomnumbergenerators,datastructures,mathematicsroutines,coremultimediautilities,andmuchmore.libavcodecisalibrarycontainingdecodersandencodersforaudio......
  • php使用ffmpeg实现向视频中添加文字字幕的方法
    这篇文章主要介绍了PHP使用ffmpeg给视频增加字幕显示的方法,实例分析了php操作ffmpeg给视频增加字母的技巧,具有一定参考借鉴价值,需要的朋友可以参考下。具体如下:$dir='./';if($handle=opendir($dir)){while(false!==($file=readdir($handle))){if(is_file($dir.$......
  • PHP中的FFmpeg安装及使用
    FFmpeg简介FFmpeg是视频处理最常用的开源软件。它功能强大,用途广泛,大量用于视频网站和商业软件(比如Youtube和iTunes),也是许多音频和视频格式的标准编码/解码实现。关于FFMPEG视音频编解码的知识可以参考大神雷霄骅的系列教程https://blog.csdn.net/leixiaohua1020/article/detai......
  • FFmpeg 简单介绍及使用
    1.简介FFmpeg是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。采用LGPL或GPL许可证。它提供了录制、转换以及流化音视频的完整解决方案。它包含了非常先进的音频/视频编解码库libavcodec,为了保证高可移植性和编解码质量,libavcodec里很多code都是从头开......
  • PHP ffmpeg 视频合并
    随着互联网的发展和视频技术的不断完善,视频在我们的生活中扮演着越来越重要的角色。但是,当前视频处理和编辑的需求也在不断增加,这就需要我们使用到一些专业的工具来帮助我们完成这项工作。其中,ffmpeg是一个非常流行的视频处理工具,它支持多种视频编解码格式,可以对视频进行编辑、剪......
  • php 安装ffmpeg扩展
    在使用PHP的ffmpeg扩展之前,我们首先需要安装它。1.下载ffmpeg源码我们可以在https://www.ffmpeg.org/download.html这个网址上下载最新的ffmpeg源码。2.安装ffmpeg在安装之前,我们需要安装一些必要的依赖库和工具:sudoapt-getupdatesudoapt-getinstallautoconfautomakeb......
  • PHP ffmpeg 剪辑视频
    随着互联网的发展和视频技术的不断完善,视频在我们的生活中扮演着越来越重要的角色。但是,当前视频处理和编辑的需求也在不断增加,这就需要我们使用到一些专业的工具来帮助我们完成这项工作。其中,ffmpeg是一个非常流行的视频处理工具,它支持多种视频编解码格式,可以对视频进行编辑、剪......
  • PHP中的FFmpeg操作指南
    FFmpeg是一种基于命令行的音视频处理工具,可以用于转码、剪辑、裁剪、合并、加速、调节音量等多种功能,广泛应用于多媒体领域。在PHP中,我们也可以通过调用FFmpeg的命令行参数来实现音视频处理功能。本文将介绍如何在PHP中使用FFmpeg操作音视频。一、安装FFmpeg扩展在PHP中使用FFmp......
  • 音视频入门基础:FLV专题(24)——FFmpeg源码中,获取FLV文件视频信息的实现
    =================================================================音视频入门基础:FLV专题系列文章:音视频入门基础:FLV专题(1)——FLV官方文档下载音视频入门基础:FLV专题(2)——使用FFmpeg命令生成flv文件音视频入门基础:FLV专题(3)——FLVheader简介音视频入门基础:FLV专题(4)—......