C# - 使用自定义数据流对 ASF 进行编码

发布于 2024-08-09 14:56:26 字数 155 浏览 5 评论 0原文

我正在尝试创建一个 ASF 文件,而不是使用声音或视频数据,我想创建一个由带有二进制数据的自定义数据包组成的流。

有人可以提供一些代码示例吗: 1) 设置个人资料。 2)配置自定义流 3) 将自定义数据包插入流中。

非常感谢。 谢谢!

谢谢 罗伊

I'm trying to create an ASF file and instead of using sound or video data I want to create a stream made of custom packets with binary data.

Can someone provide a code example of a couple of things :
1) setting up a profile.
2) configuring a custom stream
3) inserting custom packets into the stream.

Much appreciated.
Thanks!

Thanks
Roey

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

以酷 2024-08-16 14:56:26

我这样做已经很多年了,但我会尝试一下。

使用 Windows Media Format SDK,您可以创建一个 IWMWriter 并配置它有多少个流。您可以为每个流设置输入属性为 NULL,这告诉它不要压缩每个样本。之后,您只需执行 IWMWriter::WriteSample(...)。

抱歉,我不记得其余的所有细节了。

It's been years since I did this, but I'll give it a shot.

Using the Windows Media Format SDK, you would create a IWMWriter and configure how many streams it has. You would set the input properties for each stream to NULL, which tells it not to compress each sample. After that, you just do a IWMWriter::WriteSample(...).

I'm sorry I don't remember all the rest of the details.

憧憬巴黎街头的黎明 2024-08-16 14:56:26

对于预压缩数据,您需要使用 IWMWriterAdvanced::WriteStreamSample
请注意,您的比特率设置可能会导致数据丢失。

For pre-compressed data you need to use IWMWriterAdvanced::WriteStreamSample
Note your bit rate setting may cause data loss.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文