Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there any way to play video loaded to memory using python-vlc? #88

Closed
redstoneleo opened this issue Jun 7, 2019 · 2 comments · Fixed by #138
Closed

is there any way to play video loaded to memory using python-vlc? #88

redstoneleo opened this issue Jun 7, 2019 · 2 comments · Fixed by #138

Comments

@redstoneleo
Copy link

redstoneleo commented Jun 7, 2019

Any way to play bytes object in python-vlc? For example , how to play the contents in Axel in the following ?

File1 = open('vid.webm','rb')
Axel  = File1.read()
@oaubert
Copy link
Owner

oaubert commented Jun 7, 2019

You should use the Media.new_callbacks API. You can find examples in C, e.g. https://stackoverflow.com/questions/31250640/using-vlc-imem-to-play-an-h264-video-file-from-memory-but-receiving-error-main and adapt them in python. Once you are done, you can contribute your code so that I can add it to the repository examples.

@albestro
Copy link
Contributor

albestro commented Dec 4, 2019

I'm working on a very basic project for playing an audio stream from the internet, and I'm using media_new_callbacks. It should be equivalent to playing any other kind of media.

I've just opened issue #117 about a problem I had, in case I can share my sample code as an example.

oaubert pushed a commit that referenced this issue Jun 4, 2020
Example app exhibiting usage of media callbacks.

Closes #88
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants