Question
What naming and folder structure should be used for watermark-preprocessed output to integrate with AWS CloudFront?
Answer & Resolution
-
DASH Output Restructuring
-
Video Segment Renaming
Prefix all segment files in folder
1withb.
Example:seg-1.m4s→b.seg-1.m4sRename the initialization file:
init.m4s→b._init.m4sMerge both
symbol-0andsymbol-1watermarked segment folders into a single target directory.Replace hyphens (
-) with underscores (_) in segment filenames:seg-1.m4s→b.seg_1.m4s
-
Audio Segment Renaming
Append
_initto all audio segment files:seg-1.m4s→seg-1_init.m4sinit.m4s→_init.m4s
-
Folder Structure Requirement
<bucket>/wm-contents/<output_path>/<cid>/dash/video/avc1/1/ <bucket>/wm-contents/<output_path>/<cid>/dash/audio/mp4a/eng_2ch/ <bucket>/wm-contents/<output_path>/<cid>/dash/stream.mpd
-
MPD Updates
To ensure proper playback, update the references inside theMPD:Change initialization file reference:
init.mp4→_init.mp4Update video segment template:
seg-$Number$.m4s→seg_$Number$.m4sUpdate audio segment template:
seg-$Number$.m4s→seg-$Number$_init.m4s
-
-
HLS Output Restructuring
-
Video Segment Renaming
Prefix all
.tsvideo segments in folder1withb.
Example:segment-1.ts→b.segment-1.tsMerge
symbol-0andsymbol-1segment groups into one.
-
Audio Segment Renaming
Append
_initto all audio segments:seg-1.aac→seg-1_init.aac
-
Folder Structure Requirement
<bucket>/wm-contents/<output_path>/<cid>/hls/video/avc1/1/ <bucket>/wm-contents/<output_path>/<cid>/hls/audio/mp4a/eng_2ch/ <bucket>/wm-contents/<output_path>/<cid>/hls/master.m3u8
-
m3u8 updates
No modifications are required in HLS
.m3u8playlists.
-