Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6541335
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:05:33+00:00 2026-05-25T11:05:33+00:00

Is there a way to play video files like AVI , MP4 , etc.?

  • 0

Is there a way to play video files like AVI, MP4, etc.?

I tried using PyMedia, but apparently it only works with Pygame.

What is the solution to my problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T11:05:34+00:00Added an answer on May 25, 2026 at 11:05 am

    You could use python-gstreamer for playing videos (this works for me on Linux, but it should also work on Windows). This requires python-gstreamer and python-gobject, I would recommend you to use this all-in-one installer.

    Here is the code:

    import os
    import sys
    import Tkinter as tkinter
    
    import gobject
    import gst
    
    def on_sync_message(bus, message, window_id):
            if not message.structure is None:
                if message.structure.get_name() == 'prepare-xwindow-id':
                    image_sink = message.src
                    image_sink.set_property('force-aspect-ratio', True)
                    image_sink.set_xwindow_id(window_id)
    
    gobject.threads_init()
    
    window = tkinter.Tk()
    window.geometry('500x400')
    
    video = tkinter.Frame(window, bg='#000000')
    video.pack(side=tkinter.BOTTOM,anchor=tkinter.S,expand=tkinter.YES,fill=tkinter.BOTH)
    
    window_id = video.winfo_id()
    
    player = gst.element_factory_make('playbin2', 'player')
    player.set_property('video-sink', None)
    player.set_property('uri', 'file://%s' % (os.path.abspath(sys.argv[1])))
    player.set_state(gst.STATE_PLAYING)
    
    bus = player.get_bus()
    bus.add_signal_watch()
    bus.enable_sync_message_emission()
    bus.connect('sync-message::element', on_sync_message, window_id)
    
    window.mainloop()
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to play .wmv files using html5 video player?
Is there any way to stream and play video files from the server? Does
Is there any way to play video in Android App widget.
Is there a way to play video on a webpage with javascript without Flash
Is there any possible way to PLAY a you tube video on page load
I'm using a VideoView to play a mp4 file in my application. Is there
Is there any way to play a video from a bytes stream in Android?
Is there any way to do this? I wan to play video in full
I would like to know, if there's a way to play a media-file in
Is there a way make a pipeline that will play any video file (which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.