diff --git a/README.md b/README.md index ebc837843a..c5de1bc90b 100644 --- a/README.md +++ b/README.md @@ -361,3 +361,13 @@ packager \ --hls_master_playlist_output="master_playlist.m3u8" \ --hls_base_url="http://localhost:10000/" ``` + +Create DASH trick play, a.k.a. trick mode, stream. The `trick_play_factor` in +the stream descriptor specifies the sampling rate among the key frames in the +video. For example, 1 means every key frame and 2 means every other key frame. +```Shell +packager \ + 'input=bear-1280x720.mp4,stream=video,output=bear-1280x720_video.mp4' \ + 'input=bear-1280x720.mp4,stream=video,output=bear-1280x720_video_trick_play.mp4,trick_play_factor=1' \ + --mpd_output bear_trick_play.mpd +``` diff --git a/packager/app/packager_main.cc b/packager/app/packager_main.cc index 6508ec76de..2c19ef8f53 100644 --- a/packager/app/packager_main.cc +++ b/packager/app/packager_main.cc @@ -100,6 +100,9 @@ const char kUsage[] = " - output_format (format): Optional value which specifies the format\n" " of the output files (MP4 or WebM). If not specified, it will be\n" " derived from the file extension of the output file.\n" + " - trick_play_factor (tpf): Optional value which specifies the trick\n" + " play, a.k.a. trick mode, stream sampling rate among key frames.\n" + " If specified, the output is a trick play stream.\n" " - hls_name: Required for audio when outputting HLS.\n" " name of the output stream. This is not (necessarily) the same as\n" " output. This is used as the NAME attribute for EXT-X-MEDIA\n"