Closed wj985712588 closed 6 years ago
What to you mean direction? How is behaviour in other players - e.g. MPC-HC? Also, read this before posting an issue.
the video media is Rotated when playing
This is a poor issue report. I repeat: read this before posting an issue. Have you tried it on another machine? What's the result in another video players WMP, MPC-HC, VLC, ...? Describe the video format, provide a link to video if you can. What codecs are used, see GraphStudioNext or debug this project.
Is it related to https://github.com/Nevcairiel/LAVFilters/issues/190 ?
yeah,this issue is related to Nevcairiel/LAVFilters#190. the problem is happend on win10 machine wpf apps the win10 wmp player and other player such as potplayer ... is normal the video format is .mp4,it is Vertically shot on an Android phone i just use the LavFilters.
I guess that the reason may be the decoder(ffmpeg)
And what about any other DirectShow player, like MPC-HC (installed with K-Lite codecs)? If the MPC-HC plays it rotated, too, then it's a problem of the codec - LavFilters.
the mpc-hc player performs normal
MPC-HC should use same codecs as WPF-MediaKit, but there may be some exceptions, since WPF-MediaKit tries to favour LAV Codecs. So you should check GraphStudioNext, what codecs are used by default - by MPC-HC. And then debug the WPF-MediaKit MediaUriPlayer.OpenSource()
to see what codecs are used here.
Also, does other mp4 files plays well on your machine with WPF-MediaKit?
when i play the same video with ffmpeg in cmd(ffplay ****.mp4),it performs normally. other mp4 file plays well with WPF-MediaKit
FFMpeg is another technology. Generally, Windows players uses three major technologies DirectShow, Windows Media Foundation and ffmpeg. The WPF-MediaKit is based on DirectShow. So you have to check WPF-MediaKit with other DirectShow players, e.g. the MPC-HC. If the MPC-HC plays the file well, then you have to check, what codecs it uses. see my previous post about GraphStudioNext (from K-Lite codecs, see Wiki).
Also. it seems to me you do not know much about DirectShow, the codecs and other stuff. Are you sure you want to use WPF-MediaKit and not the standard WPF MediaElement
?
I think,the ghost windows system may not contain the Windows Media Player or Windows Media Center,so that the video or audio may not be played.
Also, in my wpf apps and the system install k-lite codec pack,the video is also rotated.
In regards of WPF MediaElement
: it uses Windows Media Foundation, like Windows Media Player, but does not Windows Media Player itself to be installed.
In regards of the video rotated in the WPF-MediaKit: you have to analyze real codecs used, see my 2 posts above.
DirectShowUtil.AddFilterToGraph(m_graph, VideoDecoder, Guid.Empty); m_graph = {DirectShowLib.FilterGraphNoThread} VideoDecoder = "LAV Video Decoder"
Use MediaUriPlayer.DumpGraphInfo
and GraphStudioNext.
the method MediaUriPlayer.DumpGraphInfo(string fileName) is not Executed.
Yes, it isn't. You have to call it after the video is loaded (opened).
What about tu provide the video somewhere, as stated in read this before posting an issue.
I see from Nevcairiel/LAVFilters#190 that you have to use a renderer supporting rotation. Currently, WPF-MediaKit supports EVR or VMR9 renderers, try them both. I do not know if any of them supports rotation.
the direction of some video file is not correctly, who can tell me how to correct it ? thanks