Skip to content
Abe Pazos edited this page Feb 28, 2018 · 1 revision

How stream video out of Processing

You can stream video from Processing to other apps in the same or a different machine. Only tested in one Linux machine.

  1. Create a server.conf file
HTTPPort 8090 
# bind to all IPs aliased or not 
HTTPBindAddress 0.0.0.0 
# max number of simultaneous clients 
MaxClients 10
# max bandwidth per-client (kb/s) 
MaxBandwidth 10000 

<Feed feed1.ffm> 
File /tmp/feed1.ffm 
FileMaxSize 5M 
</Feed> 

<Stream test.swf>
Feed feed1.ffm
Format swf
VideoCodec flv
VideoFrameRate 15
VideoBufferSize 80000
VideoBitRate 100
VideoQMin 1
VideoQMax 5
VideoSize 352x288
PreRoll 0
Noaudio
</Stream>

Probably swf is not the best format. I let you experiment with other ones :)

  1. Start a ffserver

ffserver -f server.conf &

  1. In Processing, open the new zCustomCommand example
  2. Replace "[output]" with "http://localhost:8090/feed1.ffm". Instead of producing an mp4 file the content will now be sent to that URL (the ffserver instance).
  3. In another program in the same machine, for instance VLC, open the URL http://localhost:8090/test.swf

When following these steps I was able to see the Processing output in VLC. I assume, if the firewall and network settings are correct, you could watch the feed from another computer in the same network. I wonder how to avoid transcoding to swf but see the original h264 content. Let me know if you figure out how and I'll update this page.

Clone this wiki locally