- Write video from my Raspberry Pi Camera to disk without any interference from streaming
- Stream the same video through the network optimizing latency
In threads that concern the same problem:
viewtopic.php?t=72405
viewtopic.php?f=43&t=55867
viewtopic.php?f=43&t=76532
The suggestion is to use tee as such:
Code: Select all
#RPi side
FPS="30"
mkfifo netcat_fifo
raspivid -t 0 -md 5 -fps $FPS -o - | tee --output-error=warn netcat_fifo > $video_out &
cat netcat_fifo | netcat -v 192.168.0.101 5000 &> $netcat_log &https://stackoverflow.com/questions/736 ... nd-logging
And the best results were achieved using:
Code: Select all
#RPi side
FPS="30"
MULTIPIPE="ftee"
mkfifo netcat_fifo
raspivid -t 0 -md 5 -fps $FPS -o - | ./${MULTIPIPE} netcat_fifo > $video_out &
cat netcat_fifo | mbuffer --direct -t -s 2k 2> $mbuffer_log | netcat -v 192.168.0.101 5000 &> $netcat_log &Code: Select all
#Receiver side
FPS="30"
netcat -l -p 5000 | mplayer -vf scale -zoom -xy 1280 -fps $FPS -cache-min 50 -cache 1024 - &I have two questions:
- Am I using the correct approach to solve my problem?
- If so, how could I render my streaming more robust while keeping the $video_out file intact?