简体   繁体   English

Media Player搜索选项无法正常工作

[英]Media Player seek option not working properly

Hello fellow developers. 各位开发人员大家好

I made ac# player to play videos and audio. 我让ac#播放器播放视频和音频。 To do that I used the System.Windows.Media MediaPlayer and it works great. 为此,我使用了System.Windows.Media MediaPlayer,它的效果很好。

Here is the problem I encountered: In some music files (not all of them) seeking to X time or playing it from the beginning to X time will have diffrent results. 这是我遇到的问题:在某些音乐文件(不是全部)中,寻求X时间或从开始到X时间播放会产生不同的结果。 In other words, If I play the song from the beginning, after 20 seconds the singer will say "Hello" but if I use the seek function to 20 sec I will hear the singer say something else (and 2 seconds later he will say "Hello"). 换句话说,如果我从头开始播放歌曲,则歌手会在20秒后说“你好”,但是如果我在20秒内使用搜索功能,我会听到歌手说别的话(2秒后他会说“你好”)。

I had to check if its the library mistake so I opened windows media player and played the song, When I click on the progress bar to X progress or when I play from the beginning to X progress the song is at different time. 我必须检查它的库是否错误,所以我打开Windows Media Player并播放了这首歌。当我单击进度条以达到X进度时,或者当我从头开始播放至X进度时,歌曲不在同一时间。 Same like the library. 像图书馆一样。

I checked this with VLC and it worked perfectly. 我用VLC进行了检查,效果很好。

So here is my questions to you. 所以这是我对你的问题。 Does it mean that Media Player doesn't know how to seek this music file correctly? 这是否意味着Media Player不知道如何正确查找此音乐文件? Do you know how to fix this? 你知道如何解决这个问题吗? Should I use a different player, which one do you recommend? 我应该使用其他播放器,您推荐哪一种?

I found the problem, Encoding the audio as VBR made it happen like that. 我发现了问题,将音频编码为VBR就是这样。 Changing to CBR solved this. 改用CBR解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM