回复 4楼lbzxy的帖子
我通过以下代码正常播放WMV格式视频:
- private void Button_Click(object sender, RoutedEventArgs e)
- {
- OpenFileDialog op = new OpenFileDialog()
- {
- Filter = "Video files(*.wmv)|*.wmv|All Files(*.*)|*.*"
-
- };
-
- if (op.ShowDialog()==true)
- {
- FileStream stream = op.File.OpenRead();
- C1MediaItem plI = new C1MediaItem();
- plI.MediaStream = stream;
- c1mediaplayer.Items.Add(plI);
- c1mediaplayer.Play();
- }
- }
复制代码
请问你播放的是什么格式的文件?
C1MediaPlayer 支持文件格式如下:
- Video
- The video formats supported are as follows:
- ?Raw Video
- ?YV12 - YCrCb(4:2:0)
- ?RGBA - 32 bit Alpha Red, Green, Blue
- ?WMV, MV2, and MV3 ( Windows Media Video 7, 8, and 9)
- ?Supports Simple and Main Profiles
- ?Supports only progressive (non-interlaced) content.
- ?WMVA: Windows Media Video Advanced Profile, non-VC-1.
- ?WVC1: Windows Media Video Advanced Profile, VC-1.
- ?Supports Advanced Profile.
- ?Supports only progressive (non-interlaced) content.
- ?H264 (ITU-T H.264 / ISO MPEG-4 AVC).
- Audio
- The audio formats supported are as follows:
- ?“1” - WAV format.
- ?"353" - Microsoft Windows Media Audio v7, v8 and v9.x Standard (WMA Standard).
- ?"354" - Microsoft Windows Media Audio v9.x and v10 Professional (WMA Professional).
- ?"85" - ISO MPEG-1 Layer III (MP3).
- ?"255" - ISO Advanced Audio Coding (AAC).
复制代码 |