ffmpeg-ruby
ffmpeg-ruby copied to clipboard
Using web camera and output to Gtk window
Good day. I'm a developer of P2P social network Pandora. I've used gstreamer before, but it has a lot of bugs after migration to version 1.0. Well, I've decided to use ffmpeg now.
Questions came, how can I do:
- capture video stream from web cam
- encode it to h264
- take raw data from stream (i will send it via TCP)
- put raw data to stream
- decode it from h264
- show video in Gtk window
Does "ffmpeg-ruby" can do it? Does "ffmpeg-ruby" work in Windows?
p.s. I know terminal commands: ffmpeg -f video4linux2 -r 25 -s 640x480 -i /dev/video0 out.avi ffplay out.avi but don't know how to do it with your bindings.
Hello,
ffmpeg ruby does not support encoding, it's an old project and it only supports extracting frames.
For what you want to do I would wrap the command-line possibly communicating with some unix pipes. I don't know how you would do this on windows though.
This other project https://github.com/gwik/ffmpeg-rb may be able to transcode but it will probably need some more work / fixing. It's an old project too, I don't even know if it still work with update to date ruby / ffmpeg, probably not.
Good luck
Antonin
Thanks for your response, Antonin.
I hoped there is a completed crossplatform solution with ffmpeg. Fixing the C code of bindings is very difficult for me. It seems I will be forced to wait a bug fixing in gstreamer..
Have a nice day.