A multiprocessing problem

Need help with C, C++, perl, python, etc?

A multiprocessing problem

Postby debitant » 2017-09-30 14:42

Hello,
I have a process writing a h264 raw video stream to stdou. I would like to write this stream to a local file and also netcat it to a ip,portnum WHEN AVAILABLE (meaning if ip is listening on portnum I would like to send the stream. If ip,portnum is not listening then simply write to file locally. ) This should happen live without affecting the video writing process.

Currently whenever needed I restart the video writer and do the following:
writeh264VideoStream - | tee outVideo.h264 >(nc 192.168.1.10 5002) > /dev/null

( I am trying using named pipes and multiple processes and sending signals using trap etc. Just don't get it to work)
Is there anyway to connect and send to 5002 live without restarting the writing process writeh264VideoStream?
Thanks
debitant
 
Posts: 1
Joined: 2017-01-24 03:58

Return to Programming

Who is online

Users browsing this forum: No registered users and 2 guests

fashionable