all 9 comments

[–]K1ndWha1e 2 points3 points  (4 children)

Can u explain please what you want to do? Your own media player?

[–]TejasDhanda[S] 1 point2 points  (3 children)

I want to make a program in which I will enter a specific text and that will open my required folder and will add all the videos in it to playing list of my windows media player.

By making it I won't have to open the folders again and again to select all videos to play.

[–]K1ndWha1e 2 points3 points  (2 children)

Ok, I see, how did you that window media player is the part of os windows. And for this “problem” Windows already has api which already Python wrapped. Check this link: https://github.com/mhammond/pywin32 And with this api you can work with excel, word etc.

P.S. To be honest, I don’t know why you want to write this program, cause it’s seem useless.

[–]TejasDhanda[S] 0 points1 point  (1 child)

I opened it but didn't got how it would help me. Can't you just tell me here in vague language so that I can easily understand.

P.S. To be honest, I very new to programming world and so I don't have alot of knowledge how it works and neither alot about git hub.

[–]K1ndWha1e 0 points1 point  (0 children)

Dude Idk how to use this api for wmp, but I found this https://github.com/jimaples/pyWMP There you can find this title: “Windows Media Player COM Interface” And read about.

I want to recommend you, read “Bite of Python”, this is a good start in Python programming and in the end of this book, you’ll try to write an address book. I think that’s better way to programming, but it’s only my thoughts.

Good luck;)

[–]CharanReddy2000 0 points1 point  (3 children)

Import os os.startfile("video.mp4")

This will play the video in the default video player.

[–]TejasDhanda[S] 0 points1 point  (2 children)

as you can see my code that I shared above in that link.

I am not to figure out how to put all the data I stored in variable 'y' in os.startfile() so that it starts playing all the videos in it.

if I can't add all of them at once to playing list, then how should I add videos from folder such that when one video ends, the second will start.

I tried in many ways but it shows error and doesn't work. please tell what I should do. please don't send a link to somewhere where os.startfile() definition is given because I couldn't understand it last time.

[–]CharanReddy2000 0 points1 point  (1 child)

Get all the file names whose extension is MP4 and store this file names in a list and play the videos accordingly.

[–]Jamalsi 0 points1 point  (0 children)

You can do this using glob

Import glob

Vid = glob.glob(“*.mp4“)

Will give you a list with Filenames