MP4 Video wrong orientation if made in portrait
Moderators: white, Hacker, petermad, Stefan2
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: MP4 Video wrong orientation if made in portrait
I'm not getting any video preview in Explorer for the sample videos some of you sent me, and also not for one I made myself on the phone.
Instead I see a still image (in portrait mode!), and when I click on it, it opens in MPC-HC.
Instead I see a still image (in portrait mode!), and when I click on it, it opens in MPC-HC.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: MP4 Video wrong orientation if made in portrait
I have installed the K-Lite_Codec_Pack_1620_Basic.ghisler(Author) wrote: ↑2021-05-25, 16:14 UTC I'm not getting any video preview in Explorer for the sample videos some of you sent me, and also not for one I made myself on the phone.
Instead I see a still image (in portrait mode!), and when I click on it, it opens in MPC-HC.
With this Explorer preview (8) in TC displays correct in portrait.
It has the options to Play it or open in Windows Media Player which also plays it correct in portrait.
I now switched the TC Player settings to "Use system default filters"
This way other file managers (XYplorer), Windows Explorer preview and Everything preview are correct.
I don't need additional Codecs in TC.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: MP4 Video wrong orientation if made in portrait
I don't get any mp4 playback this way - what codecs does TC show in the right click menu then?I now switched the TC Player settings to "Use system default filters"
And does it show the video in portrait mode?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: MP4 Video wrong orientation if made in portrait
Yes, it shows the video in portrait mode.ghisler(Author) wrote: ↑2021-05-25, 16:59 UTCI don't get any mp4 playback this way - what codecs does TC show in the right click menu then?I now switched the TC Player settings to "Use system default filters"
And does it show the video in portrait mode?
What right click menu you mean ?
There is none in the Explorer preview.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Re: MP4 Video wrong orientation if made in portrait
2ghisler(Author)
This is how it came out of the box - and it playes the portraitmovie.mp4 correctly rotated
2Horst.Epp
My MPC-HC Settings: Options -> Playback -> Output -> Directshow Video is set to "Enhanced Video Renderer (custom presenter)".As I wrote, it depends on the output filter used.
This is how it came out of the box - and it playes the portraitmovie.mp4 correctly rotated
2Horst.Epp
Explorer preview does not show mp4 files for me under Windows 10 (it does under Windows 7 - but here is does not rotate the portrait movies) - So Explorer preview is not a miracle cure - I guess it also depends on which filters are installed/registered system wide.I can just switch to Explorer preview for such videos.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: MP4 Video wrong orientation if made in portrait
The only filters I have installed are the K-Lite package,petermad wrote: ↑2021-05-25, 17:57 UTC 2ghisler(Author)My MPC-HC Settings: Options -> Playback -> Output -> Directshow Video is set to "Enhanced Video Renderer (custom presenter)".As I wrote, it depends on the output filter used.
This is how it came out of the box - and it playes the portraitmovie.mp4 correctly rotated
2Horst.EppExplorer preview does not show mp4 files for me under Windows 10 (it does under Windows 7 - but here is does not rotate the portrait movies) - So Explorer preview is not a miracle cure - I guess it also depends on which filters are installed/registered system wide.I can just switch to Explorer preview for such videos.
now in the standard version which also contains MPC-HC.
Explorer preview for mp4 shows the video in the correct orentation and allows to play or open in Windows media player.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Re: MP4 Video wrong orientation if made in portrait
2Horst.Epp
And why does Windows Media Player not turn the portrait movie correct under my Windows XP and 7, but do under my Windows 8.1 and 10.
Windows media player are all version 12 unde Win 7, 8.1 adn 10, although different subversions.
For some reason I only get a still picture of the video when I use Explorer preview in Windows 10 - and I do have the Windows Media Player installed in Windows 10, so it is peculiar that it is not used, as it is in my Windows 7, and Windows 8.1Explorer preview for mp4 shows the video in the correct orentation and allows to play or open in Windows media player.
And why does Windows Media Player not turn the portrait movie correct under my Windows XP and 7, but do under my Windows 8.1 and 10.
Windows media player are all version 12 unde Win 7, 8.1 adn 10, although different subversions.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: MP4 Video wrong orientation if made in portrait
I found the reason - video files were associated with Windows' (stupid) "Movie & TV" app in stead of "Windows Media player" - after changing that I can now also play videos in Explorer previewFor some reason I only get a still picture of the video when I use Explorer preview in Windows 10
![Smile :-)](./images/smilies/icon_smile.gif)
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: MP4 Video wrong orientation if made in portrait
This "custom presenter" seems to do the rotation. It allocates its own Direct3d surface and rotates it. In principle, what it does is create a rectangle, put the video image as a texture on it, and let the GPU rotate and display it. The same seems to be possible with the "Video Mixing Renderer 9", there is even a sample in the DirectShow SDK where the video is played on a rotating surface. I will try to adapt this to draw the video rotated. It's very complex, so don't expect it for TC 10 final yet.My MPC-HC Settings: Options -> Playback -> Output -> Directshow Video is set to "Enhanced Video Renderer (custom presenter)".
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: MP4 Video wrong orientation if made in portrait
For me it works in MPC-HC 1.7.13 and in MPC-BE 1.4.6 (build 1590) with "Video Mixing Renderer 9 (renderless)".ghisler(Author) wrote: ↑2021-05-26, 09:59 UTCThe same seems to be possible with the "Video Mixing Renderer 9"My MPC-HC Settings: Options -> Playback -> Output -> Directshow Video is set to "Enhanced Video Renderer (custom presenter)".
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
Re: MP4 Video wrong orientation if made in portrait
The MPC-HC version of the K-Lite_Codec_Pack_1620_Standard is as follows:Usher wrote: ↑2021-05-26, 11:59 UTCFor me it works in MPC-HC 1.7.13 and in MPC-BE 1.4.6 (build 1590) with "Video Mixing Renderer 9 (renderless)".ghisler(Author) wrote: ↑2021-05-26, 09:59 UTCThe same seems to be possible with the "Video Mixing Renderer 9"My MPC-HC Settings: Options -> Playback -> Output -> Directshow Video is set to "Enhanced Video Renderer (custom presenter)".
Build information:
Version: 1.9.11.49 (12dafcbc2)
Compiler: MSVC v19.26.28806
Build date: May 20 2021
LAV Filters:
LAV Splitter: 0.75.0.2
LAV Video: 0.75.0.2
LAV Audio: 0.75.0.2
FFmpeg compiler: MinGW-w64 GCC 9.3.0
Directshow Video is set to "MPC Video Renderer"
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
Re: MP4 Video wrong orientation if made in portrait
2Horst.Epp
1. Using the newest MPC-HC version isn't helpful when @ghisler uses a very old one for tests. That's why I did tests with 32-bit versions in Windows XP. Any newer versions may be properly configured as well.
2. MPC-HC in that codec pack seems to use some custom config (or has got some more features integrated). I have installed MPC-HC downloaded directly from the developers' page, then somehow manually configured. In my case MPC filters are listed as external filters which have to be manually added. Possibly that's why I can't see "MPC Video Renderer".
@all
3. I have chosen renderer which supports all listed features and can be used also for RealMedia and QuickTime. It's only "Video Mixing Renderer 9 (renderless)" available in my OS and for my hardware. "Enhanced Video Renderer (custom presenter)" used by @petermad supports rotation, but doesn't support DXVA for me.
4. On my list of renderers, "Sync Renderer" and "madVR" also support rotation and DXVA - Sync Renderer is probably EVR (CP) fork, works OK for me, madVR isn't available in my case.
1. Using the newest MPC-HC version isn't helpful when @ghisler uses a very old one for tests. That's why I did tests with 32-bit versions in Windows XP. Any newer versions may be properly configured as well.
2. MPC-HC in that codec pack seems to use some custom config (or has got some more features integrated). I have installed MPC-HC downloaded directly from the developers' page, then somehow manually configured. In my case MPC filters are listed as external filters which have to be manually added. Possibly that's why I can't see "MPC Video Renderer".
@all
3. I have chosen renderer which supports all listed features and can be used also for RealMedia and QuickTime. It's only "Video Mixing Renderer 9 (renderless)" available in my OS and for my hardware. "Enhanced Video Renderer (custom presenter)" used by @petermad supports rotation, but doesn't support DXVA for me.
4. On my list of renderers, "Sync Renderer" and "madVR" also support rotation and DXVA - Sync Renderer is probably EVR (CP) fork, works OK for me, madVR isn't available in my case.
Andrzej P. Wozniak
Polish subforum moderator
Polish subforum moderator
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: MP4 Video wrong orientation if made in portrait
1. I tried both with the very old one and the latest one from the link above. The results are almost the same, it depends on the output filter whether the video is shown in portrait or landscape mode.
2. Yes, MPC video renderer is something internal, as well as "Video Mixing Renderer 9 (renderless)". The only external renderer capable of video rotation is MadVR.
2. Yes, MPC video renderer is something internal, as well as "Video Mixing Renderer 9 (renderless)". The only external renderer capable of video rotation is MadVR.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
- ghisler(Author)
- Site Admin
- Posts: 48088
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: MP4 Video wrong orientation if made in portrait
I'm currently working on this problem, and it's more difficult than I thought. Before I integrate it into Lister, it would be great if some of you could test whether the following sample app shows your video correctly (upgright and without extra borders):
https://www.totalcommander.ch/win/tools/rotationtest.zip
I have modified the Microsoft vmr9allocator sample from the Windows SDK for my purposes. The sample shows a video on a rotating surface. I changed it show it on a fixed surface, but with the camera rotated by 90° to the left or right, or 180° for upside down videos.
The video will pause for a short moment after resizing the player window to adjust the video surface to the new size. During the resizing, the video will just be stretched to the new size.
https://www.totalcommander.ch/win/tools/rotationtest.zip
I have modified the Microsoft vmr9allocator sample from the Windows SDK for my purposes. The sample shows a video on a rotating surface. I changed it show it on a fixed surface, but with the camera rotated by 90° to the left or right, or 180° for upside down videos.
The video will pause for a short moment after resizing the player window to adjust the video surface to the new size. During the resizing, the video will just be stretched to the new size.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: MP4 Video wrong orientation if made in portrait
Both versions show my test video with correct orientation and borderless.ghisler(Author) wrote: ↑2021-06-18, 16:57 UTC I'm currently working on this problem, and it's more difficult than I thought. Before I integrate it into Lister, it would be great if some of you could test whether the following sample app shows your video correctly (upgright and without extra borders):
https://www.totalcommander.ch/win/tools/rotationtest.zip
I have modified the Microsoft vmr9allocator sample from the Windows SDK for my purposes. The sample shows a video on a rotating surface. I changed it show it on a fixed surface, but with the camera rotated by 90° to the left or right, or 180° for upside down videos.
The video will pause for a short moment after resizing the player window to adjust the video surface to the new size. During the resizing, the video will just be stretched to the new size.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Windows 11 Home x64 Version 23H2 (OS Build 22631.3527)
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64
TC 11.03 x64 / x86
Everything 1.5.0.1373a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.73
QAP 11.6.3.2 x64