[Windows10]如何从HLS视频流中获取定时文本 [英] [Windows10] How to get timed text from HLS video stream

查看:135
本文介绍了[Windows10]如何从HLS视频流中获取定时文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好

我正在为Windows 10开发一种媒体播放器。

I’m developing a sort of Media Player for Windows 10.

此播放器包含两个轨道:一个用于视频,另一个用于音频。这两个流分别作为HLS跟踪并使用H264和AAC编解码器。

This player consists in two tracks: one for video and the other for audio. These two streams come as HLS tracks and use H264 and AAC codecs, respectively.

我实现此应用程序的方式是使用AdaptiveMediaSource类来保存HLS轨道,使用MediaElement类来打印其内容。这两个对象都有ID3v2形状的定时文本元数据,它们嵌入在HLS实时流
中,我必须以某种方式检索它们。

The way I have implemented this application is using the AdaptiveMediaSource class for holding the HLS tracks and the MediaElement class for printing their content. Both objects have ID3v2-shaped timed-text metadata, which are embedded in the HLS live stream and I must retrieve them somehow.

寻找获取它们的方法,我找到了TimelineMarker类,它应该从MediaElement接收元数据,但事实是当抛出事件时(MediaElement.MarkerReached)我我没有取回任何东西。

Looking for a way to get them, I found the TimelineMarker class, which is supposed to recieve metadata from MediaElement, but the fact is that when the event is thrown (MediaElement.MarkerReached) I’m not retrieving anything.

所以,我需要一种听众,当嵌入的标签被解码或回放点达到与标签相关的时间时通知我。

So, I need a kind of listener that notifies me when the tags embedded are decoded or when the playback point reaches the time associated with the tag.

我怎样才能获得这些标签?

How could I get those tags?

提前致谢

推荐答案

呵呵。

这是我严密保密的秘密之一

This is one of my closely guarded secrets

你显然需要一个特殊的课程来保存你需要的信息。你还需要一个计时器。 m3u(8)文件也以特定方式(行)格式化。


You obviously need a special class to hold the information you need. You also need a timer. An m3u(8) file is also formatted in a specific way (lines).

我认为你可以安全地从这里继续:)

I think you can safely continue from here :)


这篇关于[Windows10]如何从HLS视频流中获取定时文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆