[Python] Using vlc.py to play rtsp frame by frame

This forum is about all development around libVLC.
gusrodriguez
New Cone
New Cone
Posts: 9
Joined: 04 Jun 2015 18:43

[Python] Using vlc.py to play rtsp frame by frame

Postby gusrodriguez » 04 Jun 2015 18:56

Hello,

I would like to store a short h264 video in RAM and play it using the python vlc bindings. I am pulling the frames of this video through a python script and storing them in a python data structure (a deque). However, I don't know how to use vlc.py in order to play a video when all I have is a data structure with individual frames. I know how to play it from a stream like this:

Code: Select all

player=vlc.MediaPlayer('rtsp://username:pass@111.111.1.111:111/axis-media/media.amp') player.play()
I also know how to play a .h264 video from a file using the API. But I haven't been able to find a way to feed the vlc player with frames and have it play. Is this even possible? And if so, could someone point me in the right direction? I've been looking at the API for a while and haven't been able to find anything.

Thank you!

OlivierAubert
Developer
Developer
Posts: 92
Joined: 08 Mar 2007 15:43

Re: [Python] Using vlc.py to play rtsp frame by frame

Postby OlivierAubert » 11 Jun 2015 23:39

It looks like you should use the imem input module. You can have a look at some threads from the forum, e.g. https://forum.videolan.org/viewtopic.ph ... 42#p311611
Getting it to work with the python bindings is an interesting challenge. When you manage to get something, please contribute an example so that it benefits everyone :-)


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 14 guests