本文介绍了如何在C#中解析WMV文件的信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想获取ASF文件的信息,如比特率,元数据,语言...我已阅读ASF规范,并且知道ASF文件包含以下部分:标题对象,数据对象,索引对象.首先,我认为ASF文件的二进制文件,我尝试通过C#中的CLASS和FUNCTION来解决:FileStream,BinaryReader:

I want to get information of ASF file as bitrate, metadata, language...I have read ASF Specification and know a ASF file has parts : Header Object, Data Object, Index Object. At frist, I think ASF file''s binary file and i try to solve by CLASS and FUNCTION in C# as : FileStream, BinaryReader :

String path = @"E:\KhoaLuanTN\Streaming video server\video\encoder_ad.wmv";
            FileStream filer = File.OpenRead(path);
            BinaryReader br = new BinaryReader(filer);
            byte [] file = br.ReadBytes(100);


然后,我尝试转换为String:


Then, I try to convert into String :

<pre lang="midl">textBox1.Text = Encoding.ASCII.GetString ( file );



但是它没有显示出我所期望的.它显示了一个荒谬的字符串:0 amp;?u?f? ??.
因此,请向我展示如何将ASF文件中的信息转换为String.



But it doesn''t display as I expect. It displays a nonsensical string: 0&?u?f? ??.
So please show me how to convert information in a ASF file into String.

推荐答案


这篇关于如何在C#中解析WMV文件的信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 22:24