1. 查看视频信息 2. 截取一段视频 3. 提高音量 4. 去除水印 5. 批量处理 5.1 使用sh脚本批量去除片头固定时长片段 5.2 同时处理片头,片尾的 6. 合并 7. ffmpeg -help
本文主要记录 使用ffmpeg 处理视频文件 (去除 片头广告)
关于字幕的可参照:https://szosoft.blogspot.com/2019/11/ffmpeg-01-subtitle.html
或者这里:https://www.cnblogs.com/sztom/p/11964797.html
1. 查看视频信息
$ ffmpeg -i lamp.mp4Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'lamp.mp4': Metadata: major_brand : isom minor_version : 512 compatible_brands: isomiso2avc1mp41 encoder : Lavf58.29.100 Duration: 00:11:21.81, start: 0.000000, bitrate: 1637 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 1504 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc (default) Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s (default) Metadata: handler_name : SoundHandler At least one output file must be specified
2. 截取一段视频
先看表示时间的选项- -ss time_off set the start time offset 设置开始时间偏移
- -t duration record or transcode "duration" seconds of audio/video 记录或转码音频/视频的“持续时间”秒
- -to time_stop record or transcode stop time 记录或转码停止时间
截取开始到7分30秒的视频, 就是去除7分30秒后的所有内容.
$ ffmpeg -ss 00:00:00 -i lamp.mp4 -to 00:07:30 o730.mp4
这样的标准写法, 速度会有点慢.
快速去掉第一秒
$ ffmpeg -ss 00:00:01 -i o730-15.mp4 -c copy 0730-16.mp4
参考帮助信息
- -c codec codec name 编解码器名称
- -vcodec codec force video codec ('copy' to copy stream) 强制视频编解码器(“复制”以复制流)
- -acodec codec force audio codec ('copy' to copy stream) 强制音频编解码器(“复制”以复制流)
- -scodec codec force subtitle codec ('copy' to copy stream) 强制字幕编解码器(“复制”以复制流)
(也有后面这样的写法: -c:v copy -c:a copy 但这种写法之对部分文件有效, 对于美剧原始文件(包含更多的元数据,流数据)会报错.)
快速剪裁视频前100秒, 这种写法对于国内翻译网站编辑过的文件有效.
$ ffmpeg -ss 00:00:00 -i Devs.mp4 -t 100 -c:v copy -c:a copy Deus.mp4
3. 提高音量
-vol volume change audio volume (256=normal) 更改音量(256 =正常)参考以上帮助信息, 提高音量, 大于256即可. 具体多少合适, 要自己尝试了.
$ ffmpeg -ss 00:00:00 -i Devs.mp4 -vol 1024 Devs2.mp4
当有几个文件想要一起循环播放,但不同的文件音量差异很大时,这个就很有用了.
4. 去除水印
-vf filter_graph set video filters 设置视频过滤器查看相关可用滤镜
$ ffmpeg -filters |grep logo
T.. delogo V->V Remove logo from input video.
T.. removelogo V->V Remove a TV logo based on a mask image.
去掉指定坐标位置的静态水印
$ ffmpeg -i Devs.mp4 -vf "delogo=x=1:y=1:w=100:h=30:show=0" Deus.103.mp4
#-vf "delogo=x=1:y=1:w=100:h=30:show=0" 滤镜位置以视频左上角为(1,1)坐标; 大小:宽100,高30; show=0 无边框, show=1 会有绿色边框.
5. 批量处理
5.1 使用sh脚本批量去除片头固定时长片段
找到ffmpeg命令文件的位置$ whereis ffmpeg
ffmpeg: /usr/bin/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz
$ which ffmpeg
/usr/bin/ffmpeg
进入视频文件夹, 保存如下脚本到 ffmpeg-45.sh 文件,
#!/bin/bash #用 for 循环直接获取当前目录下的 mp4文件循环处理,去掉开头45 秒 for i in *.mp4 ; do /usr/bin/ffmpeg -ss 00:00:45 -i $i -c copy /home/mov/$i -y done执行, 大约复制一遍视频文件的时间就完成了. 看看结果,没问题,就可以删除原文件了.
$ bash ffmpeg-45.sh
5.2 同时处理片头,片尾的
参考这里: https://blog.csdn.net/wchenjt/article/details/105759542#!/bin/bash #我这里要切除的开头和结尾都是 7 秒 beg=7 end=7 #用 for 循环直接获取当前目录下的 mp4、mp3、avi 等文件循环处理,单个文件可以去掉 for 循环 for i in (*.mp4,*.mp3,*.avi ); do #将元数据信息临时保存到 tmp.log 文件中 nohup /usr/local/ffmpeg/bin/ffmpeg -i "$i" > tmp.log #获取视频的时长,格式为 00:00:10,10 (时:分:秒,微妙) time="`cat /usr/local/ffmpeg/tmp.log |grep Duration: |awk '{print $2}'|awk -F "," '{print $1}'|xargs`" echo $time #求视频的总时长,先分别求出小时、分、秒的值,这里不处理微秒,可以忽略 hour="`echo $time |awk -F ":" '{print $1}' `" min="`echo $time |awk -F ":" '{print $2}' `" sec="`echo $time |awk -F ":" '{print $3}'|awk -F "." '{print $1}' `" #echo $hour $min $sec num1=`expr $hour \* 3600` num2=`expr $min \* 60` num3=$sec #计算出视频的总时长(秒) sum=`expr $num1 + $num2 + $num3` #总时长减去开头和结尾就是截取后的视频时长,并且这里不需要再转回 hour:min:sec 的格式,直接使用结果即可 newtime=`expr $sum - $beg - $end` echo $newtime /usr/local/ffmpeg/bin/ffmpeg -ss 00:00:07 -i $i -t $newtime -c:v copy -c:a copy /data/tmp/$i -y done
6. 合并
-f fmt force format 强制格式1. 建立list.txt 文件,参照如下记录要合并的视频文件列表
file ./d1.mp4 file ./d2.mp4 file ./d3.mp42. 合并
$ ffmpeg -f concat -safe 0 -i list.txt -c copy con.mp4
或者用如下一条语句,需要bash
$ ffmpeg -f concat -safe 0 -i <(for f in /mnt/sa10/mv/*.mp4; do echo "file '$f'"; done) -c copy output.mp4
$ ffmpeg -f concat -safe 0 -i <(for f in /mnt/sa10/TDDownload/LinuxDownload/ffmpeg/c/*.mp4; do echo "file '$f'"; done) -c copy output.mp4
选的3个相同格式的文件,且都很小,所以瞬间完成了,不过报了一堆黄色字符信息, 不过没有错误或警告的关键字.
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x561923876f40] Auto-inserting h264_mp4toannexb bitstream filter Input #0, concat, from '/dev/fd/63': Duration: N/A, start: -0.021333, bitrate: 777 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, 648 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 47.95 tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: handler_name : SoundHandler Output #0, mp4, to 'output.mp4': Metadata: encoder : Lavf58.29.100 Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720, q=2-31, 648 kb/s, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc Metadata: handler_name : VideoHandler Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 128 kb/s Metadata: handler_name : SoundHandler Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56192387cc40] Auto-inserting h264_mp4toannexb bitstream filter [mp4 @ 0x56192388e780] Non-monotonous DTS in output stream 0:0; previous: 239751, current: 100626; changing to 239752. This may result in incorrect timestamps in the output file....
[mp4 @ 0x56192388e780] Non-monotonous DTS in output stream 0:0; previous: 239890, current: 239765; changing to 239891. This may result in incorrect timestamps in the output file. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x56192387a540] Auto-inserting h264_mp4toannexb bitstream filter [mp4 @ 0x56192388e780] Non-monotonous DTS in output stream 0:0; previous: 626151, current: 601136; changing to 626152. This may result in incorrect timestamps in the output file....
[mp4 @ 0x56192388e780] Non-monotonous DTS in output stream 0:0; previous: 626176, current: 626161; changing to 626177. This may result in incorrect timestamps in the output file. frame= 1319 fps=0.0 q=-1.0 Lsize= 7318kB time=00:00:48.03 bitrate=1248.2kbits/s speed= 168x video:6593kB audio:693kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.451475%
7. ffmpeg -help
Print help / information / capabilities: | 打印帮助/信息/功能: | |wc -l | |
-L | show license | 演出许可证 | |
-h | -- print basic options | -打印基本选项 | 110 |
-h long | -- print more options | -打印更多选项 | 222 |
-h full | -- print all options (including all format and codec specific options, very long) | 11352 | |
-h type=name | – print all options for the named decoder/encoder/demuxer/muxer/filter/bsf | ||
-version | show version | 显示版本 | |
-buildconf | show build configuration | 显示构建配置 | 47 |
-formats | show available formats | 显示可用格式 | 361 |
-muxers | show available muxers 复用器(mux) | 把不同的流按照某种容器的规则放入容器 | 172 |
-demuxers | show available demuxers 解复用(demux) | 把不同的流从某种容器中解析出来 | 311 |
-devices | show available devices 设备 | 显示可用设备 | 16 |
-codecs | show available codecs 编解码器(Codec) | 是对视频进行压缩或者解压缩 | 463 |
-decoders | show available decoders 解码器 | 显示可用的解码器 | 477 |
-encoders | show available encoders 编码器 | 显示可用的编码器 | 199 |
-bsfs | show available bit stream filters | 显示可用的比特流过滤器 | 35 |
-protocols | show available protocols | 显示可用的协议 | 64 |
-filters | show available filters 滤镜 | 显示可用的过滤器 | 395 |
-pix_fmts | show available pixel formats | 显示可用的像素格式 | 201 |
-layouts | show standard channel layouts | 显示标准频道布局 | 58 |
-sample_fmts | show available audio sample formats | 显示可用的音频样本格式 | 13 |
-colors | show available color names | 显示可用的颜色名称 | 141 |
-sources device | list sources of the input device | 列出输入设备的来源 | |
-sinks device | list sinks of the output device | 列出输出设备的接收器 | |
-hwaccels | show available HW acceleration methods | 显示可用的硬件加速方法 |
Global options (affect whole program instead of just one file: | 全局选项(影响整个程序,而不仅仅是一个文件: | |
-loglevel loglevel | set logging level | 设置日志记录级别 |
-v loglevel | set logging level | 设置日志记录级别 |
-report | generate a report | 生成报告 |
-max_alloc bytes | set maximum size of a single allocated block | 设置单个分配块的最大大小 |
-y | overwrite output files | 覆盖输出文件 |
-n | never overwrite output files | 永远不会覆盖输出文件 |
-ignore_unknown | Ignore unknown stream types | 忽略未知的流类型 |
-filter_threads | number of non-complex filter threads | 非复杂过滤器线程数 |
-filter_complex_threads | number of threads for -filter_complex | -filter_complex的线程数 |
-stats | print progress report during encoding | 编码过程中的打印进度报告 |
-max_error_rate maximum error rate | ratio of errors (0.0: no errors, 1.0: 100% errors) above which ffmpeg returns an error instead of success. | 错误率 (0.0: no errors, 1.0: 100% errors), ffmpeg高于该比率将返回错误而不是成功。 |
-bits_per_raw_sample | number set the number of bits per raw sample | 数字设置每个原始样本的位数 |
-vol volume | change audio volume (256=normal) | 更改音量(256 =正常) |
Advanced global options: | 高级全局选项: | |
-cpuflags flags | force specific cpu flags | 强制特定的cpu标志 |
-hide_banner hide_banner | do not show program banner | 不显示程序横幅 |
-copy_unknown | Copy unknown stream types | 复制未知的流类型 |
-benchmark | add timings for benchmarking | 添加基准测试时间 |
-benchmark_all | add timings for each task | 为每个任务添加时间 |
-progress url | write program-readable progress information | 编写程序可读的进度信息 |
-stdin | enable or disable interaction on standard input | 在标准输入上启用或禁用交互 |
-timelimit limit | set max runtime in seconds | 以秒为单位设置最大运行时间 |
-dump | dump each input packet | 转储每个输入数据包 |
-hex | when dumping packets, also dump the payload | 转储数据包时,也转储有效负载 |
-vsync | video sync method | 视频同步方式 |
-frame_drop_threshold | frame drop threshold | 丢帧阈值 |
-async | audio sync method | 音频同步方式 |
-adrift_threshold threshold | audio drift threshold | 音频漂移阈值 |
-copyts | copy timestamps | 复制时间戳记 |
-start_at_zero | shift input timestamps to start at 0 when using copyts | 使用copyts时,将输入时间戳转换为从0开始 |
-copytb mode | copy input stream time base when stream copying | 流复制时复制输入流的时基 |
-dts_delta_threshold threshold | timestamp discontinuity delta threshold | 时间戳不连续性增量阈值 |
-dts_error_threshold threshold | timestamp error delta threshold | 时间戳错误增量阈值 |
-xerror error | exit on error | 错误退出 |
-abort_on flags | abort on the specified condition flags | 在指定的条件标志上中止 |
-filter_complex graph_description | create a complex filtergraph | 创建一个复杂的filtergraph |
-lavfi graph_description | create a complex filtergraph | 创建一个复杂的filtergraph |
-filter_complex_script filename | read complex filtergraph description from a file | 从文件中读取复杂的filtergraph描述 |
-debug_ts | print timestamp debugging info | 打印时间戳调试信息 |
-intra | deprecated use -g 1 | 不推荐使用-g 1 |
-deinterlace | this option is deprecated, use the yadif filter instead | 不建议使用此选项,请改用yadif过滤器 |
-psnr | calculate PSNR of compressed frames | 计算压缩帧的PSNR |
-vstats | dump video coding statistics to file | 将视频编码统计信息转储到文件 |
-vstats_file file | dump video coding statistics to file | 将视频编码统计信息转储到文件 |
-vstats_version | Version of the vstats format to use. | 要使用的vstats格式的版本。 |
-qphist | show QP histogram | 显示QP直方图 |
-vc channel | deprecated, use -channel | 不推荐使用,使用-channel |
-tvstd standard | deprecated, use -standard | 不推荐使用,使用-standard |
-isync | this option is deprecated and does nothing | 此选项已弃用,不执行任何操作 |
-sdp_file file | specify a file in which to print sdp information | 指定要在其中打印sdp信息的文件 |
-vaapi_device device | set VAAPI hardware device (DRM path or X11 display name) | 设置VAAPI硬件设备(DRM路径或X11显示名称) |
-init_hw_device args | initialise hardware device | 初始化硬件设备 |
-filter_hw_device device | set hardware device used when filtering | 设置过滤时使用的硬件设备 |
Per-file main options: | 每个文件的主要选项: | |
-f fmt | force format | 强制格式 |
-c codec | codec name | 编解码器名称 |
-codec codec | codec name | 编解码器名称 |
-pre preset | preset name | 预设名称 |
-map_metadata outfile[,metadata]:infile[,metadata] | set metadata information of outfile from infile | 设置infile中outfile的元数据信息 |
-t duration | record or transcode "duration" seconds of audio/video | 记录或转码音频/视频的“持续时间”秒 |
-to time_stop | record or transcode stop time | 记录或转码停止时间 |
-fs limit_size | set the limit file size in bytes | 设置限制文件大小(以字节为单位) |
-ss time_off | set the start time offset | 设置开始时间偏移 |
-sseof time_off | set the start time offset relative to EOF | 设置相对于EOF的开始时间偏移 |
-seek_timestamp | enable/disable seeking by timestamp with -ss | 使用-ss按时间戳启用/禁用查找 |
-timestamp time | set the recording timestamp ('now' to set the current time) | 设置录制时间戳(“现在”设置当前时间) |
-metadata string=string | add metadata | 添加元数据 |
-program title=string:st=number... | add program with specified streams | 添加具有指定流的程序 |
-target type | specify target file type ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-") | 指定目标文件类型 ("vcd", "svcd", "dvd", "dv" or "dv50" with optional prefixes "pal-", "ntsc-" or "film-") |
-apad | audio pad | 音垫 |
-frames number | set the number of frames to output | 设置要输出的帧数 |
-filter filter_graph | set stream filtergraph | 设置流filtergraph |
-filter_script filename | read stream filtergraph description from a file | 从文件中读取流filtergraph描述 |
-reinit_filter | reinit filtergraph on input parameter changes | 输入参数更改时重新初始化filtergraph |
-discard | discard | 丢弃 |
-disposition | disposition | 部署 |
Advanced per-file options: | 每个文件的高级选项: | |
-map [-]input_file_id[:stream_specifier][,sync_file_id[:stream_s | set input stream mapping | 设置输入流映射 |
-map_channel file.stream.channel[:syncfile.syncstream] | map an audio channel from one stream to another | 将音频通道从一个流映射到另一个 |
-map_chapters input_file_index | set chapters mapping | 设置章节映射 |
-accurate_seek | enable/disable accurate seeking with -ss | 使用-ss启用/禁用精确搜索 |
-itsoffset time_off | set the input ts offset | 设置输入ts的偏移量 |
-itsscale scale | set the input ts scale | 设置输入ts比例 |
-dframes number | set the number of data frames to output | 设置要输出的数据帧数 |
-re | read input at native frame rate | 以原始帧速率读取输入 |
-shortest | finish encoding within shortest input | 在最短的输入内完成编码 |
-bitexact | bitexact mode | 位精确模式 |
-copyinkf | copy initial non-keyframes | 复制初始非关键帧 |
-copypriorss | copy or discard frames before start time | 在开始时间之前复制或丢弃帧 |
-tag fourcc/tag | force codec tag/fourcc | 强制编解码器标签/ fourcc |
-q q | use fixed quality scale (VBR) | 使用固定质量量表(VBR) |
-qscale q | use fixed quality scale (VBR) | 使用固定质量量表(VBR) |
-profile profile | set profile | 设定个人资料 |
-attach filename | add an attachment to the output file | 将附件添加到输出文件 |
-dump_attachment filename | extract an attachment into a file | 将附件提取到文件中 |
-stream_loop loop count | set number of times input stream shall be looped | 设置输入流应循环的次数 |
-thread_queue_size | set the maximum number of queued packets from the demuxer | 设置来自多路分解器的排队数据包的最大数量 |
-find_stream_info | read and decode the streams to fill missing information with heuristics | 读取和解码流以使用启发式方法填充丢失的信息 |
-autorotate | automatically insert correct rotate filters | 自动插入正确的旋转滤镜 |
-muxdelay seconds | set the maximum demux-decode delay | 设置最大多路分解解码延迟 |
-muxpreload seconds | set the initial demux-decode delay | 设置初始多路分配解码延迟 |
-time_base ratio | set the desired time base hint for output stream (1:24, 1:48000 or 0.04166, 2.0833e-5) | 设置输出流的所需时基提示 (1:24, 1:48000 or 0.04166, 2.0833e-5) |
-enc_time_base ratio | set the desired time base for the encoder (1:24, 1:48000 or 0.04166, 2.0833e-5). two special values are defined - 0 = use frame rate (video) or sample rate (audio),-1 = match source time base | 设置编码器所需的时基(1:24, 1:48000 or 0.04166, 2.0833e-5). 定义了两个特殊值-0 =使用帧率(视频)或采样率(音频),-1 =匹配源时基 |
-bsf bitstream_filters | A comma-separated list of bitstream filters | 以逗号分隔的位流过滤器列表 |
-fpre filename | set options from indicated preset file | 从指示的预设文件设置选项 |
-max_muxing_queue_size packets | maximum number of packets that can be buffered while waiting for all streams to initialize | 等待所有流初始化时可以缓冲的最大数据包数 |
-dcodec codec | force data codec ('copy' to copy stream) | 强制数据编解码器(“复制”以复制流) |
Video options: | 视频选项: | |
-vframes number | set the number of video frames to output | 设置要输出的视频帧数 |
-r rate | set frame rate (Hz value, fraction or abbreviation) | 设置帧频(Hz值,分数或缩写) |
-s size | set frame size (WxH or abbreviation) | 设置帧大小(WxH或缩写) |
-aspect aspect | set aspect ratio (4:3, 16:9 or 1.3333, 1.7777) | 设置纵横比(4:3、16:9或1.3333、1.7777) |
-bits_per_raw_sample | number set the number of bits per raw sample | 数字设置每个原始样本的位数 |
-vn | disable video | 禁用视频 |
-vcodec codec | force video codec ('copy' to copy stream) | 强制视频编解码器(“复制”以复制流) |
-timecode hh:mm:ss[:;.]ff | set initial TimeCode value. | 设置初始TimeCode值。 |
-pass n | select the pass number (1 to 3) | 选择通行证编号(1至3) |
-vf filter_graph | set video filters | 设置视频过滤器 |
-ab bitrate | audio bitrate (please use -b:a) | 音频比特率(请使用-b:a) |
-b bitrate | video bitrate (please use -b:v) | 视频比特率(请使用-b:v) |
-dn | disable data | 禁用数据 |
Advanced Video options: | 进阶影片选项: | |
-pix_fmt format | set pixel format | 设置像素格式 |
-intra | deprecated use -g 1 | 不推荐使用-g 1 |
-rc_override override | rate control override for specific intervals | 特定时间间隔的速率控制优先 |
-passlogfile prefix | select two pass log file name prefix | 选择两个通过日志文件名的前缀 |
-deinterlace | this option is deprecated, use the yadif filter instead | 不建议使用此选项,请改用yadif过滤器 |
-psnr | calculate PSNR of compressed frames | 计算压缩帧的PSNR |
-vstats | dump video coding statistics to file | 将视频编码统计信息转储到文件 |
-vstats_file file | dump video coding statistics to file | 将视频编码统计信息转储到文件 |
-vstats_version | Version of the vstats format to use. | 要使用的vstats格式的版本。 |
-intra_matrix matrix | specify intra matrix coeffs | 指定内部矩阵系数 |
-inter_matrix matrix | specify inter matrix coeffs | 指定矩阵间系数 |
-chroma_intra_matrix matrix | specify intra matrix coeffs | 指定内部矩阵系数 |
-top | top=1/bottom=0/auto=-1 field first | top = 1 / bottom = 0 / auto = -1首先 |
-vtag fourcc/tag | force video tag/fourcc | 强制视频标签/ fourcc |
-qphist | show QP histogram | 显示QP直方图 |
-force_fps | force the selected framerate, disable the best supported framerate selection | 强制选定帧率,禁用最佳支持的帧率选择 |
-streamid streamIndex:value | set the value of an outfile streamid | 设置输出文件流ID的值 |
-force_key_frames timestamps | force key frames at specified timestamps | 在指定的时间戳上强制关键帧 |
-hwaccel hwaccel name | use HW accelerated decoding | 使用硬件加速解码 |
-hwaccel_device devicename | select a device for HW acceleration | 选择用于硬件加速的设备 |
-hwaccel_output_format format | select output format used with HW accelerated decoding | 选择用于硬件加速解码的输出格式 |
-vc channel | deprecated, use -channel | 不推荐使用,使用-channel |
-tvstd standard | deprecated, use -standard | 不推荐使用,使用-standard |
-vbsf video bitstream_filters | deprecated | 不推荐使用 |
-vpre preset | set the video options to the indicated preset | 将视频选项设置为指示的预设 |
Audio options: | 音频选项: | |
-aframes number | set the number of audio frames to output | 设置要输出的音频帧数 |
-aq quality | set audio quality (codec-specific) | 设置音频质量(特定于编解码器) |
-ar rate | set audio sampling rate (in Hz) | 设置音频采样率(以Hz为单位) |
-ac channels | set number of audio channels | 设置音频通道数 |
-an | disable audio | 禁用音频 |
-acodec codec | force audio codec ('copy' to copy stream) | 强制音频编解码器(“复制”以复制流) |
-vol volume | change audio volume (256=normal) | 更改音量(256 =正常) |
-af filter_graph | set audio filters | 设置音频过滤器 |
Advanced Audio options: | 高级音频选项: | |
-atag fourcc/tag | force audio tag/fourcc | 强制音频标签/ fourcc |
-sample_fmt format | set sample format | 设置样本格式 |
-channel_layout layout | set channel layout | 设置频道布局 |
-guess_layout_max | set the maximum number of channels to try to guess the channel layout | 设置最大通道数以尝试猜测通道布局 |
-absf audio bitstream_filters | deprecated | 不推荐使用 |
-apre preset | set the audio options to the indicated preset | 将音频选项设置为指示的预设 |
Subtitle options: | 字幕选项: | |
-s size | set frame size (WxH or abbreviation) | 设置帧大小(WxH或缩写) |
-sn | disable subtitle | 禁用字幕 |
-scodec codec | force subtitle codec ('copy' to copy stream) | 强制字幕编解码器(“复制”以复制流) |
-stag fourcc/tag | force subtitle tag/fourcc | 强制字幕标签/ fourcc |
-fix_sub_duration | fix subtitles duration | 修正字幕的持续时间 |
-canvas_size size | set canvas size (WxH or abbreviation) | 设置画布大小(WxH或缩写) |
-spre preset | set the subtitle options to the indicated preset | 将字幕选项设置为指示的预设 |
没有评论:
发表评论