Media Player [Windows]

Share your advanced PureBasic knowledge/code with the community.
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

@RASHAD: Which function do you use to capture images?
And yes, I like to test your mediaplayer :-)
"Daddy, I'll run faster, then it is not so far..."
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4954
Joined: Sun Apr 12, 2009 6:27 am

Re: Media Player [Windows]

Post by RASHAD »

Removed
Last edited by RASHAD on Wed Feb 22, 2017 9:10 pm, edited 1 time in total.
Egypt my love
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Thx RASHAD. Frame capture does not work with 4K movies.. Nothing is saved inside the Snapshot dir.
Works well with HD and less.. I'll try it at another computer..

Ciao dige
"Daddy, I'll run faster, then it is not so far..."
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Same result. Capture-Frame unfortunately does not work with 4K movies.

After PauseMedia () and MediaSeek (), the video should remain in Pausemode, but the current picture should be displayed.
Is there a command to force the update of the movie screen?

Ciao dige
"Daddy, I'll run faster, then it is not so far..."
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

@RASHAD: do you know, how to force "RenderFrame" - update movie display - when movie is in pause mode and I change the position with MediaSeek()?

kind regards, dige
"Daddy, I'll run faster, then it is not so far..."
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4954
Joined: Sun Apr 12, 2009 6:27 am

Re: Media Player [Windows]

Post by RASHAD »

Hi dige
- If you running your movie in an overlay window (GPU Hardware acceleration)
the only way to capture a frame is using The DS capture frame which is very slow
- Running your movie in a normal window you can use BitBlt_() which is much faster
The disadvantage of this window is it is a pixelized view
- For refresh the frame

Code: Select all

   	          CreateImage(0,600,400,24)
    	          Pos.q = MediaPosition(Media,#MEDIA_TIME_MSECS)
    	          For nimg = 0 To 10      	            
                    MediaSeek(Media2, Pos)
                    PlayMedia(Media2)
                    PauseMedia(Media2)                    
                    hdc = StartDrawing(ImageOutput(0))
  	                  BitBlt_(hdc, 0,0, 600,400, GetDC_(WindowID(2)),0,0,  #SRCCOPY|#CAPTUREBLT|#NOMIRRORBITMAP)
  	                StopDrawing()
  	                Delay(1000)
   	                SaveImage(0, "C:\PB_Player\Snapshots\"+Cap$+" "+Right(Str(im),2)+".png",#PB_ImagePlugin_PNG)
                 im+1
                 Pos + 1000
                Next
the delay time varies due to the size of the frame
I just discovered that the FPS of 4K is 30
Can you confirm that ?
In that case maybe we should use some other filter
Egypt my love
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Hi RASHAD, thanks for your help.

The drone video stream is 3.840 x 2.160 @29.97 FPS

Using BitBlt_() will only capture the resized frame (desktop size), but I need
the most best highest quality :-D
"Daddy, I'll run faster, then it is not so far..."
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4954
Joined: Sun Apr 12, 2009 6:27 am

Re: Media Player [Windows]

Post by RASHAD »

https://1drv.ms/u/s!Ai-mxxjiojo7dt-WEJ4UUmNvcg4
Many...many bugs fixed
It can play 4K & 8K (somehow) :P

- Using new method to deactivate the screensaver on windows XP and the new versions of windows

- Ctrl+Alt+G to grab one frame
- Ctrl+Alt+A to grab 10 consecutive frames (The player must be active)
- Ctrl+Alt+Right arrow move forward to next chapter
- Ctrl+Alt+Left arrow move backward to previous chapter
- Ctrl+Alt+O OSD on\off
- Ctrl+Alt+R Resize on\off

Mouse right click to show\hide the Dashboard

And many many more

Remember to install the full version including it's own filters

Edit :play with option icon for more features
Edit :New version
Last edited by RASHAD on Fri Mar 10, 2017 3:11 pm, edited 4 times in total.
Egypt my love
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Hi RASHAD,

playing 4k videostreams is fine. But video (Frame) capture does not work.

Cya dige
"Daddy, I'll run faster, then it is not so far..."
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4954
Joined: Sun Apr 12, 2009 6:27 am

Re: Media Player [Windows]

Post by RASHAD »

Hi dige
Previous post updated
Check
Egypt my love
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Very good! Works fine now and incredibly fast!! I would like to have the fast frame capture also in my own application - could you help me?
"Daddy, I'll run faster, then it is not so far..."
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

@RASHAD: Could you kindly tell me which function you use for the capture? :)
"Daddy, I'll run faster, then it is not so far..."
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4954
Joined: Sun Apr 12, 2009 6:27 am

Re: Media Player [Windows]

Post by RASHAD »

Hi dige
Previous post updated
I am using ffDShow tryout filter with overlapped window (Hardware accelerated)
Where can i send to you the full project in private ?
Egypt my love
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

@RASHAD: thank you very much! You can send it to me per email to: dige at gmx.de
"Daddy, I'll run faster, then it is not so far..."
dige
Addict
Addict
Posts: 1406
Joined: Wed Apr 30, 2003 8:15 am
Location: Germany
Contact:

Re: Media Player [Windows]

Post by dige »

Or you can send me download link per pm..
dige wrote:@RASHAD: thank you very much! You can send it to me per email to: dige at gmx.de
"Daddy, I'll run faster, then it is not so far..."
Post Reply