Grabbing raw frames
Posted: 04 Jan 2008 02:04
Hi, I have an RTP encapsulated mp4v encoded stream that I'm trying to grab raw frames from in real time.
Basically, I would like a buffer of RGB triples from individual frames that I can manipulate (Cut up, analyze, pipe somewhere, etc).
This seems like it should be relatively straight forward, so perhaps I'm missing something.
I'm fine with converting from other image formats like png or jpeg so long as it's fast enough.
Along those lines, I tried
vlc rtsp://192.168.250.100:554/video0 -V image --image-out-ratio=1
Which does give me individual frames in png format that I can convert to raw format, but it's horribly slow.
When using files on disk, I currently use ffmpeg's avformat library, but ffmpeg doesn't seem to like reading this particular rtp encapsulation, while vlc does.
Are there other things that I should be trying?
I thought maybe libvlc might be helpful, but documentation on it seems rather scarce with regards to this kind of thing.
Any help would be appreciated,
Thanks
Basically, I would like a buffer of RGB triples from individual frames that I can manipulate (Cut up, analyze, pipe somewhere, etc).
This seems like it should be relatively straight forward, so perhaps I'm missing something.
I'm fine with converting from other image formats like png or jpeg so long as it's fast enough.
Along those lines, I tried
vlc rtsp://192.168.250.100:554/video0 -V image --image-out-ratio=1
Which does give me individual frames in png format that I can convert to raw format, but it's horribly slow.
When using files on disk, I currently use ffmpeg's avformat library, but ffmpeg doesn't seem to like reading this particular rtp encapsulation, while vlc does.
Are there other things that I should be trying?
I thought maybe libvlc might be helpful, but documentation on it seems rather scarce with regards to this kind of thing.
Any help would be appreciated,
Thanks