Skip to content

AWS MediaPackage VOD: Subtitles Working in Source HLS but Not Appearing in MediaPackage Output

0

AWS MediaPackage VOD: Subtitles Working in Source HLS but Not Appearing in MediaPackage Output

I'm experiencing an issue where subtitles display correctly in the source HLS manifest on S3 (after MediaConvert encoding), but they don't appear when playing the video through AWS MediaPackage VOD endpoints.

Current Workflow

  1. MediaConvert Job: Encodes video → creates HLS output on S3
  2. Add Subtitles: Post-processing script adds WebVTT subtitle to existing HLS manifest(Manual manifest update)
  3. MediaPackage Asset: Create VOD asset pointing to updated HLS manifest on S3
  4. Packaging Configurations: Both HLS and DASH (with/without DRM)

here is HLS Master Playlist Structure (S3 Source):

https://novel-demo-s3-output.s3.ap-northeast-1.amazonaws.com/Demo-15.mp4/hls/Demo-15.m3u8

#EXTM3U #EXT-X-VERSION:4 #EXT-X-INDEPENDENT-SEGMENTS #EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="audio",LANGUAGE="vie",NAME="Vietnamese",AUTOSELECT=YES,DEFAULT=YES,CHANNELS="2",URI="Demo-15_audio_vi.m3u8" #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="vie",NAME="Vietnamese",AUTOSELECT=YES,DEFAULT=YES,CHARACTERISTICS="public.accessibility.transcribes-spoken-dialog,public.accessibility.describes-music-and-sound",URI="Demo-15_sub_vi.m3u8" #EXT-X-STREAM-INF:SUBTITLES="subs",BANDWIDTH=5839868,AVERAGE-BANDWIDTH=5839868,CODECS="avc1.640028",RESOLUTION=1080x1920,FRAME-RATE=29.970 Demo-15_video.m3u8

here is the Dash and hsl url from media package

🍎 HLS URL: https://c77501902e2a8206d6c8463fe19cb2bf.egress.mediapackage-vod.ap-northeast-1.amazonaws.com/out/v1/59a3fe5449774ef68737248289b6ae91/8effc2aaa34d497587eee738af470b00/2a3851e634e544e88ec487ab620209be/index.m3u8

🤖 DASH URL: https://c77501902e2a8206d6c8463fe19cb2bf.egress.mediapackage-vod.ap-northeast-1.amazonaws.com/out/v1/59a3fe5449774ef68737248289b6ae91/9daf83a2b5024403a8956503214a08e6/6b60be2e22a84833b43b4fdc585dd7d7/index.mp

Expected Behavior Subtitles should be available in MediaPackage VOD output manifests and playable in the video player

Any guidance on the correct workflow for including subtitles in AWS MediaPackage VOD would be greatly appreciated!

asked 6 months ago145 views
4 Answers
1

Is there right duration? Manifest said #EXT-X-TARGETDURATION:7 But web vtt file almost 18 minutes long.

Did you consider to add captions at transcoding stage?

AWS
answered 6 months ago
  • Thank you for the suggestions.

    I'm currently adding subtitles manually via post-processing script because I don't want to re-transcode the video every time I need to add a new subtitle language. Re-transcoding would be time-consuming and costly for our workflow.

    I haven't tried the transcoding approach yet with MediaConvert generating the subtitles.

    Also, I should mention that I'm currently testing with a subtitle file from online that doesn't actually match my video content - just for testing the technical integration. This might explain why the duration doesn't match (#EXT-X-TARGETDURATION:7 vs 18-minute WebVTT file).

    Thanks

1

My suggestion is to use Mediaconvert to get output that will be compliant with MediaPackage ingest criteria. Then you can tune you manual ingest by knowing what is expected by downstream service, like MediaPackage.

AWS
answered 6 months ago
  • Thank you for the clarification. Just to confirm: You're suggesting I run MediaConvert once with subtitles to see the output format, then use that as a template for my manual script going forward. That way I can keep adding subtitles manually without re-transcoding, but match the format MediaPackage expects. Is that right?

0

Based on your workflow description, there are a few potential issues that could be causing your subtitles to not appear in the MediaPackage output.

First, MediaPackage has specific requirements for how subtitles should be ordered in the input manifest. MediaPackage designates the first subtitles track as DEFAULT=YES and AUTO-SELECT=YES, overriding any default and auto-select settings from the input. Your source manifest already has these attributes set correctly for your Vietnamese subtitles.

However, there are a few things to check:

  1. WebVTT Format: MediaPackage supports WebVTT text-based subtitles for input. Make sure your subtitle file is properly formatted as WebVTT.

  2. Manual Manifest Modification: Since you're using a post-processing script to add WebVTT subtitles to the existing HLS manifest, ensure that the subtitle track is properly referenced and that the subtitle file is accessible at the specified URI path.

  3. Subtitle Signaling: For MediaPackage to properly process subtitles, the CHARACTERISTICS attribute should be present in the EXT-X-MEDIA tag for subtitles. Your manifest includes this with the appropriate values.

  4. Packaging Configuration: Check your MediaPackage packaging configuration to ensure it's set up to include subtitles in the output.

  5. Subtitle Track Association: Make sure your EXT-X-STREAM-INF tag includes the SUBTITLES="subs" attribute to associate the video stream with the subtitle group, which your manifest does have.

For the most reliable workflow with MediaPackage VOD and subtitles:

  • Have MediaConvert generate both the video/audio and the WebVTT subtitles in a single job
  • Ensure the subtitle track is properly signaled in the HLS manifest
  • Create the MediaPackage asset pointing to this complete HLS package
  • For DASH output, MediaPackage will translate WebVTT subtitles to EBU-TT format

If you continue to experience issues, you might want to check if the subtitle files are being properly ingested by MediaPackage during the asset creation process.
Sources
Features of AWS Elemental MediaPackage - AWS Elemental MediaPackage
VOD Content Processing - AWS Elemental MediaPackage

answered 6 months ago
  • how can i Check the Packaging Configuration: Check your MediaPackage packaging configuration to ensure it's set up to include subtitles in the output

0

yes, you understand me correct

AWS
answered 6 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.