从HLS中删除字幕/字幕,并删除dash清单文件
我目前正在使用AWS MediaConvert将视频编码为HLS和DASH格式。我相信,在M3U8(用于HLS)和MPD(用于破折号)文件中,可以解析这些文件以删除所需的字幕。我希望解析M3U8和MPD文件,创建无需字幕的更新清单,然后将其保存回S3。以前有人做过类似的事情吗?
I am currently using aws mediaconvert to encode videos to hls and dash format. I believe that in the m3u8 (for hls) and mpd (for dash) file which is generated, these can be parsed to remove required subtitles. I am looking to parse the m3u8 and mpd file, create an updated manifest without required subtitles and save it back to s3. Has someone previously done something similar?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可以通过指定的S3桶中源表现出来触发的lambda函数来完成。 lambda脚本可以删除字幕线,并向不同的S3存储桶发布修改后的清单。然后,该脚本也应将细分段也复制到新的存储桶中,以维护可播放的HLS或DASH文件组。
另外,您可以将资产作为VOD资产摄入MediaPackage,并使用'?aws.manifestfilter = subtitle_language:xxx'过滤器时,要求使用VOD清单。 MediaPackage的此功能返回按需源清单的自定义(过滤)版本,而无需永久更改它。指定“ subtitle_language:zzz”的过滤器将返回一份清单,其中没有字幕。您也可以要求仅包括指定的字幕演绎。
This could be done with a Lambda Function triggered by the arrival of the source manifest in a specified S3 bucket. A Lambda script could remove the captions line(s) and post a revised manifest to the different S3 bucket. The script should then copy the segments over to the new bucket as well in order to maintain a playable HLS or DASH file group.
Alternatively you can ingest the asset as-is into MediaPackage as a VOD asset, and use the '?aws.manifestfilter=subtitle_language:xxx' filter when asking for the VOD manifest. This feature of MediaPackage returns a customized (filtered) version of the source manifest on demand without you having to permanently alter it. Specifying a filter of 'subtitle_language:zzz' will return a manifest with no subtitles in it. You could also ask for only specified subtitle renditions to be included.