$ ffmpeg .... -f ismv output.mp4
$ man ffmpeg-formats | grep ismv -B5
Set the sample rate for libopenmpt to output. Range is from 1000 to INT_MAX. The value default is 48000.
mov/mp4/3gp
Demuxer for Quicktime File Format & ISO/IEC Base Media File Format (ISO/IEC 14496-12 or MPEG-4 Part 12, ISO/IEC 15444-12 or JPEG 2000 Part 12).
Registered extensions: mov, mp4, m4a, 3gp, 3g2, mj2, psp, m4b, ism, ismv, isma, f4v
--
ffmpeg -i INPUT -f md5 -
See also the hash and framemd5 muxers.
mov, mp4, ismv
MOV/MP4/ISMV (Smooth Streaming) muxer.
The mov/mp4/ismv muxer supports fragmentation. Normally, a MOV/MP4 file has all the metadata about all packets stored in one location (written at
--
-movflags empty_moov
Write an initial moov atom directly at the start of the file, without describing any samples in it. Generally, an mdat/moov pair is written at
the start of the file, as a normal MOV/MP4 file, containing only a short portion of the file. With this option set, there is no initial mdat
atom, and the moov atom only describes the tracks but has a zero duration.
This option is implicitly set when writing ismv (Smooth Streaming) files.
-movflags separate_moof
Write a separate moof (movie fragment) atom for each track. Normally, packets for all tracks are written in a moof atom (which is slightly more
efficient), but with this option set, the muxer writes one moof/mdat pair for each track, making it easier to separate tracks.
This option is implicitly set when writing ismv (Smooth Streaming) files.
--
-movflags negative_cts_offsets
Enables utilization of version 1 of the CTTS box, in which the CTS offsets can be negative. This enables the initial sample to have DTS/CTS of
zero, and reduces the need for edit lists for some cases such as video tracks with B-frames. Additionally, eases conformance with the DASH-IF
interoperability guidelines.
This option is implicitly set when writing ismv (Smooth Streaming) files.
--
Example
Smooth Streaming content can be pushed in real time to a publishing point on IIS with this muxer. Example:
常规 MP4 文件在转码时无法播放,因为一旦编码完成,MOOV atom(解析文件所必需的)会在最后写入。在许多情况下,它会被移动到文件的开头——就是
-movflags +faststart
这样——但你仍然必须等待文件被写入一次。碎片化 MP4 (fMP4) 文件是一种特殊的 MP4 文件,可以在写入时读取,请参阅此答案。用于
-movflags +frag_keyframe+separate_moof+omit_tfhd_offset+empty_moov
启用分片。只要写入了足够多的数据,MPEG-2 传输流文件就可以在写入的同时播放。您可以尝试将数据写入
.ts
文件,然后等待几秒钟,然后开始播放。如果你想实时写入数据,你必须添加 global 选项
-re
,这使得 ffmpeg 实时读取输入,因此写入速度不会比你可以播放的速度快。使用 ISMV 格式 (
-f ismv
) 似乎会自动选择正确的-movflags
选项,以便在编码时能够读取输出文件: