MP4 #
查看demuxer的参数:
ffmpeg -h demuxer=mp4
查看muxer的参数:
ffmpeg -h muxer=mp4
faststart参数 #
正常情况下ffmpeg生成moov是在mdat写完成之后,通过参数faststart可将moov 容器移动至mdat的前面,这样的mp4文件即使没有全部下载完成也可开始播放。
ffmpeg -i input.flv -c copy -f mp4 -movflags faststart output.mp4
isml参数 #
ISMV为微软发布的一个流媒体格式,通过参数isml可以发布ISML直播流,推至 IIS服务器:
ffmpeg -re -i input.mp4 -c copy -movflags isml +frag_keyframe -f ismv Stream
Options #
-f fmt (input/output) Force input or output file format. The format is normally auto detected for input files and guessed from the file extension for output files, so this option is not needed in most cases. -re (input) Read input at native frame rate. Mainly used to simulate a grab device, or live input stream (e.g. when reading from a file). Should not be used with actual grab devices or live input streams (where it can cause packet loss). By default ffmpeg attempts to read the input(s) as fast as possible. This option will slow down the reading of the input(s) to the native frame rate of the input(s). It is useful for real-time output (e.g. live streaming).