Giter VIP home page Giter VIP logo

ofxstreamer's Introduction

About

This addon is for streaming an image from one computer to another using H.264 protocol and ffmpeg as backbone.

Installation

Add the addon to a new project with the project generator, or add it to an existing project using the OFPlugin for XCode.

Note: Due to a bug in the project generator and OFPlugin, you need to remove some files from your project. Remove the folder ofxStreamer/libs/libx264/include in the project navigator.

Usage

ofxStreamerSender: Use the ofxStreamerSender to send a video feed to a receiver. It can both send an ofImage or a unsigned char *, it will then be encoded by ffmpeg into a h.264 packet, and transmitted over UDP to the destination IP. The settings of the sender can be tuned with the preset and tune attributes.

The stream can also be opened in applications like VLC

ofxStreamerReceiver: Use this class to receive video feeds from the sender. It is inheriting from ofBaseVideo, so it can be used like a ofVideoPlayer after it has been set up with a port number.

Save the stream from commandline

If you would like to save the stream as a video file you can use ffmpeg like this:

$ ./ffmpeg -i "udp://@:1234" -vcodec libx264 output.mp4 

ofxstreamer's People

Contributors

halfdanj avatar smukkejohan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxstreamer's Issues

Incompatible with ffmpeg 5.0

I tried to replace the ffmpeg libraries in here with an ARM64 build for M1 Mac from the latest sources, but it looks like the changes in ffmpeg v5 (see https://ffmpeg.org/index.html#news) break the approach taken by this plugin.

The ffmpeg changes seem quite far-ranging, so fixing this addon might need a chunk of work, unfortunately.

Sender example compiles but crashes

Erratic. I managed to make it work just a few times. I can't see any consistent reason why.
When it works it sends correctly the stream to the Receiver.

It consistently fails at
streamerSenderExampleDebug`swscale at swscale.c:304:
0x537585: movl %esi, %eax

It crashes at the first frame, but sometimes a few frames later, even a few seconds later.

vector.h file not found

i am trying to building the example with XCode8.3 and OF0.9.8,

the error shows:
/Users/XXXX/Desktop/Coding/OpenFrameWorks/of_v0.9.8_osx_release/addons/ofxStreamer/src/ofxStreamerSender.h:14:10: 'vector.h' file not found

and i have no idea how to deal with it.

Errors with OF 0.8.4

Hi,

Thanks for this addon. But I am having no luck while trying to compile it using 0.8.4. Most of them are like the following:

/of_v0.8.4_osx_release/addons/ofxStreamer/src/ofxStreamerReceiver.cpp:265:12: Non-const lvalue reference to type 'ofPixels' (aka 'ofPixels_') cannot bind to a temporary of type 'unsigned char *'

I guess this is because you used the latest master branch of OF, but is there anything I could change in order to work with 0.8.4?

Semantic Issue on ctime.c and local_facets.tcc

When I added ofxStreamer/* to the project file, not even including <ofxStreamer.h> in ofApp.h, I get following error.

In ctime.c/ Semantic Issue No member name 'tm' in the global namespace, Semantic Issue No Member named 'clock' in the global namespace, Semantic Issue Nomember named 'difftime'
In local_facets.tcc/ Semantic Issue Member access into incomplete type 'tm', Semantic Issue Member access into incomplete type 'tm'

and so on. This goes on for 20 errors until the compiler quits. I'm using Mac OS 10.9 and of_v0.8.3 right now. I've tried several version of changing Base SDK and version of OF but any of it doesn't work.

I'm pretty beginner in C, but I figured it out that this error is similar to following issue and "time.h" in libavutil might causing this error. Is there any idea to salve this error?

johmathe/shotdetect#1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.