ffmpeg -i udp://224.1.2.3:1235 -map 0 -c copy -bsf:a aac_adtstoasc -fflags genpts -write_prft pts -movflags empty_moov+separate_moof+default_base_moof+cmaf+delay_moov -f mp4 "http://127.0.0.1/vod/nfs/l02/a04.isml/Streams(a04_1)"
-i udp://224.1.2.3:1235 :指定輸入檔
-map 0 指第一個輸入檔的所有流
-c copy 直接複製,不經過重新編碼(這樣比較快)
-bsf:a aac_adtstoasc
bsf:表示binary steam fiter
a:表示audio
處理ADTS轉換。較新版本的FFmpeg會自動增加這條命令。
-fflags genpts 將重新生成 pts 時間戳,使其順利循環,否則循環時時間順序將不正確。
-write_prft pts
Write Producer Reference Time elements on supported streams. This also enables writing prft boxes in the underlying muxer. Applicable only when the utc_url option is enabled. It’s set to auto by default, in which case the muxer will attempt to enable it only in modes that require it.
在支持的流上寫入 Producer Reference Time 元素。這也允許在底層復用器中寫入 prft 框。僅在啟用 utc_url 選項時適用。它默認設置為自動,在這種情況下,復用器將嘗試僅在需要它的模式下啟用它。
-movflags empty_moov+separate_moof+default_base_moof+cmaf+delay_moov
-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 default_base_moof
Similarly to the omit_tfhd_offset, this flag avoids writing the absolute base_data_offset field in tfhd atoms, but does so by using the new default-base-is-moof flag instead. This flag is new from 14496-12:2012. This may make the fragments easier to parse in certain circumstances (avoiding basing track fragment location calculations on the implicit end of the previous track fragment).
-f mp4 即 mp4格式輸出
"http://127.0.0.1/vod/nfs/l02/a04.isml/Streams(a04_1)"