The shell script i'm trying to implement goes like this,
#!/bin/bash
while [ 1 ]
do
nc -l 1234 | ffmpeg -i pipe:0 -vcodec mpeg4 -s qcif -f m4v -y pipe:1 | nc localhost 1235
done
what it does is to simply take in a stream of video input through network and do live video transcoding(with ffmpeg of course!) and streaming back the video through the net. my question is how should i go by to implement this functionality in a clean C code. i know i can use popen() to pipe such a command from a c code but i would like to do better. may be with sockets and staff... any pointers are appreciated.
AskLearnDo.