News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

MediaPlayer

Started by fearless, August 29, 2024, 04:05:42 AM

Previous topic - Next topic

fearless

A basic media player application written in x86 and x64 assembler that utilizes the MFPlayer-Library - which consists of functions that wrap the MFPlay COM implementation of the IMFPMediaPlayer and IMFPMediaItem objects.




https://github.com/mrfearless/MediaPlayer

Features

  • Supports audio and video media that is natively supported by the Microsoft Media Foundation API
  • Player controls via toolbar buttons, menu or context menu: Play/Pause Toggle, Stop, Frame Step, Volume Mute/Unmute, Fullscreen toggle, About, Exit.
  • Custom control for Volume slider.
  • Custom control for Seekbar slider.
  • Custom controls for Labels (for duration of media and current position).
  • Fullscreen enter via toolbar button, menu, context menu or F11.
  • Fullscreen exit via toolbar button, menu, context menu, F11 or Escape.
  • Spacebar toggles play/pause.
  • Open media via File menu, context menu, clicking screen logo, clicking play button or drag and drop.
  • Uses the FileDialog-Library

Download

The latest releases can be downloaded at https://github.com/mrfearless/mediaplayer/releases

Edit: Updated to attach v1.0.0.5 releases and update screenshot.

Vortex

Hi fearless,

My compliments, very nice work :thumbsup:

fearless

Thanks.

There is more features that could be added to it or design changes like proper fullscreen without the controls at the bottom - which was a design choice as I didnt want to go to that length of effort to hide/show them when the mouse was over the video window etc. And stuff like playlist support could be added. But the MediaPlayer application is mainly to verify that the MFPlayer library works ok, but could be a basis for a more fully featured media player in future, or it could be all wrapped up in a single custom control.

Biterider

Very nice work, compliments  :thumbsup:

Biterider

jj2007

Excellent, my compliments :thumbsup:

Ctrl O seems not to work here on Win10, and I couldn't open a *.ogg file that opens fine with Windows. You might add dragging files on the window.

Otherwise flawless and cute :thup:

greenozon

#5
Wow, exciting work, congrats!

PS can't eat japanese hieroglyphs  in movies names any chance?

fearless

Thanks.

@jj2007 - unfortunately the Microsoft Media Foundation doesn't seem to support .ogg files. Just these one listed here: https://learn.microsoft.com/en-us/windows/win32/medfound/supported-media-formats-in-media-foundation

Drag and drop is included in it, but from reports it seems it might not be working for some people. I found a few interesting forum posts and blogs relating to drag and drop not working properly: https://forum.pellesc.de/index.php?topic=5852.0 and https://helgeklein.com/blog/how-to-enable-drag-and-drop-for-an-elevated-mfc-application-on-vistawindows-7/

So I guess I will look into that and use the findings there to adjust, and hopefully it will work for others. Currently I'm running Win10 Pro with a user with admin rights and UAC disabled, which is probably why it seems to work for me.

@greenozon - working on Unicode versions right now, which hopefully will tackle the issues raised on the github repo.

jj2007

Quote from: fearless on August 30, 2024, 12:27:08 AMunfortunately the Microsoft Media Foundation doesn't seem to support .ogg files.

I vaguely remember that I had to install a codec pack to make them run.

greenozon

Will it render modern videos encoed by H.265, AV1, or more newwer one?

fearless

If you have the hevc codec installed it should work: https://www.windowscentral.com/how-open-heic-and-hevc-files-windows-10s-photos-app

I have the paid hevc codec version from the Microsoft store (few euros) and it displays a .mkv file with the codec: MPEG-H Part2/HEVC H.265 (shown in vlc the codec info)

satpro

I really like your coding style.  Concise.

The program runs fine on Win 11.  It's FAST.  I tested a bunch of files without a glitch.

greenozon

OMG
there is already H.266 (AKA  VVC codec)

did you give it a try as well?

greenozon

#12
I"ve found a very nice collection of modern codec small video samples:  https://www.elecard.com/videos

it plays only H.264 out of that zoo, unfortunately...

any chance to add support?
(MPC-HC plays 100%)

Mikl__

Hi fearless,

Very very nice!

fearless

#14
v1.0.0.1

https://github.com/mrfearless/MediaPlayer/releases/tag/1.0.0.1

  • Changed default codebase for x86 and x64 MediaPlayer to use wide/unicode for better handling and display of unicode filenames #2 #3.
  • Ini file now is created with BOM to allow unicode - for MRU filenames.
  • Ini file prepends a play/pause unicode glyph to its name (helps indicate that it is unicode perhaps?)
  • Add clear recent files option (comment/wish from BOSCH on Tuts4you).
  • Fix memory leak - missing DragFinish call  #4.
  • Fix transparent painting issue in about dialog box #1.
  • Added use of ChangeWindowMessageFilter to better support drag and drop for UAC blocking drag and drop operations #4.
  • Added play rate (slower/faster) buttons and menu items (request from Yashar Mahmoudnia on Tuts4you Telegram).
  • Added step 10 seconds (backward/forward) buttons and menu items.
  • Add additional accelerators for play rate and step 10 options.
  • Add missing accelerator resource for x64 version (Thanks to jj2007).
  • Combined toolbars to just one toolbar now.