Page 1 of 1

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

Posted: 04 Jun 2015 18:56
by gusrodriguez
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!

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

Posted: 11 Jun 2015 23:39
by OlivierAubert
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 :-)