Skip to content

Instantly share code, notes, and snippets.

@CihatAltiparmak
Created March 11, 2022 14:02
Show Gist options
  • Save CihatAltiparmak/182650d660c50f1c4b35ae23a8c4f9ab to your computer and use it in GitHub Desktop.
Save CihatAltiparmak/182650d660c50f1c4b35ae23a8c4f9ab to your computer and use it in GitHub Desktop.
# https://stackoverflow.com/a/67861019
import vlc
import tkinter as tk
root = tk.Tk()
frame = tk.Frame(root, width=700, height=600)
frame.pack()
display = tk.Frame(frame, bd=5)
display.place(relwidth=1, relheight=1)
Instance = vlc.Instance()
player = Instance.media_player_new()
Media = Instance.media_new('video.mp4')
player.set_xwindow(display.winfo_id())
player.set_media(Media)
player.play()
player.audio_set_volume(100) # for set audio of video, i guess, audio_volume is 0% deafultly, so i set the video's vloume as 100%
root.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment