Added example with DASH+HLS

Also fixed a few documentation problems.

Change-Id: I52cfda8f04635235fabef617af482a0ce66970ea
This commit is contained in:
KongQun Yang 2018-01-22 15:12:55 -08:00
parent c520d85b96
commit d8e3ca344c
4 changed files with 27 additions and 7 deletions

View File

@ -58,6 +58,8 @@ The above packaging command creates five groups of segments (each with an init
segment and a series of media segments) for the five streams and a manifest, segment and a series of media segments) for the five streams and a manifest,
which describes the streams. which describes the streams.
.. include:: /tutorials/dash_hls_example.rst
.. include:: /options/dash_options.rst .. include:: /options/dash_options.rst
.. include:: /options/segment_template_formatting.rst .. include:: /options/segment_template_formatting.rst

View File

@ -0,0 +1,13 @@
* Single file MP4 output with DASH + HLS::
$ packager \
in=h264_baseline_360p_600.mp4,stream=audio,output=audio.mp4,playlist_name=audio.m3u8,hls_group_id=audio,hls_name=ENGLISH \
in=h264_baseline_360p_600.mp4,stream=video,output=h264_360p.mp4,playlist_name=h264_360p.m3u8 \
in=h264_main_480p_1000.mp4,stream=video,output=h264_480p.mp4,playlist_name=h264_480p.m3u8 \
in=h264_main_720p_3000.mp4,stream=video,output=h264_720p.mp4,playlist_name=h264_720p.m3u8 \
in=h264_high_1080p_6000.mp4,stream=video,output=h264_1080p.mp4,playlist_name=h264_1080p.m3u8 \
--hls_master_playlist_output h264_master.m3u8 \
--mpd_output h264.mpd
The above packaging command creates five single file MP4 streams, and HLS
playlists as well as DASH manifests.

View File

@ -72,15 +72,15 @@ Assume there is an RTP input described by `saved_sdp_file`::
For testing, you can generate an RTP input from a static media file:: For testing, you can generate an RTP input from a static media file::
$ ffmpeg -re -stream_loop 100 -i <static.mp4> -vcodec copy -an \ $ ffmpeg -re -stream_loop 100 -i <static.mp4> -vcodec copy -acodec \
-f rtp rtp://239.255.0.1:1234 -sdp_file saved_sdp_file copy -f rtp rtp://239.255.0.1:1234 -sdp_file saved_sdp_file
The command starts only after packager starts. The command starts only after packager starts.
.. note:: .. note::
After encoding starts, monitor encoding speed carefully. It should always be After encoding starts, monitor encoding speed carefully. It should always be
1x and above. If not, adjust the encoding parameters to recude it. 1x or above. If not, adjust the encoding parameters to increase it.
Example packaging command in DASH Example packaging command in DASH
--------------------------------- ---------------------------------

View File

@ -54,7 +54,7 @@ The examples below uses the H264 streams created in :doc:`encoding`.
--hls_master_playlist_output h264_master.m3u8 --hls_master_playlist_output h264_master.m3u8
The above packaging command creates five single track TS streams The above packaging command creates five single track TS streams
(4 video, 1 audio) and a manifest, which describes the streams. (4 video, 1 audio) and HLS playlists, which describe the streams.
* MP4 output is also supported:: * MP4 output is also supported::
@ -66,6 +66,10 @@ The above packaging command creates five single track TS streams
'in=h264_main_1080p_6000.mp4,stream=video,init_segment=h264_1080p_init.mp4,segment_template=h264_1080p_$Number$.m4s,playlist_name=h264_1080p.m3u8' \ 'in=h264_main_1080p_6000.mp4,stream=video,init_segment=h264_1080p_init.mp4,segment_template=h264_1080p_$Number$.m4s,playlist_name=h264_1080p.m3u8' \
--hls_master_playlist_output h264_master.m3u8 --hls_master_playlist_output h264_master.m3u8
The above packaging command creates five groups of streams (each with an init
segment and a series of media segments) and HLS playlists, which describe the
streams.
* Single file MP4 output is also supported:: * Single file MP4 output is also supported::
$ packager \ $ packager \
@ -76,9 +80,10 @@ The above packaging command creates five single track TS streams
in=h264_high_1080p_6000.mp4,stream=video,output=h264_1080p.mp4,playlist_name=h264_1080p.m3u8 \ in=h264_high_1080p_6000.mp4,stream=video,output=h264_1080p.mp4,playlist_name=h264_1080p.m3u8 \
--hls_master_playlist_output h264_master.m3u8 --hls_master_playlist_output h264_master.m3u8
The above packaging command creates five groups of streams (each with an init The above packaging command creates five single file MP4 streams and HLS
segment and a series of media segments) and a manifest, which describes the playlists, which describe the streams.
streams.
.. include:: /tutorials/dash_hls_example.rst
.. include:: /options/hls_stream_descriptors.rst .. include:: /options/hls_stream_descriptors.rst