0
votes

I want to stream video and audio using raspberry pi. Raspberry pi-1 should act as video streaming server while other arduinos should as as forwarder. Destination node will be again raspberry pi -2. I am also doing video encoding/compression on received video before sending stream and decompression at receiver side. Can I get similar implementation anywhere?

i am doing reasearch on video streaming in wireless sensor network ( Ad Hoc Network ) . By using motion , raspitill , raspberry pi became video streaming server . Before delivery of stream , i have to first compress images and combine using commands :

raspistill -o myimage_%04d.jpg -tl 60000 -t 7200000

and

avconv -r 10 -i myimage_%04d.jpg -r 10 -vcodec libx264 -crf 20 -g 15 timelapse.mp4

Can i compress these images using my compression algorithm by storing it in some python script .

I installed DHCP server and apache web server on Raspberry pi to make it ad-hoc router cum web server . So user can join it easily and do surf through websites inside it and i want to stream compressed videos to user inside its wifi hot spot.

1
Are you have a specific problem with your code? If not, this may not be the right forum for this question. - nullability
I do not know how to compress and stream video . i got info regarding raspivid , gstreamer but can they do compression and streaming . If no , which are other alternative ? Did you get what was my my question ? - Bhushan Mahajan
It sounds like you're looking for software. You may want to check out Super User or Raspberry Pi instead. Stack Overflow is for programming questions. - nullability
avconv is already compressing your images. If you just put your timelapse.mp4 files into the Apache web root then they would be available to anyone on the network via a web browser. I'm not sure what you would need a python script for. - nullability

1 Answers

0
votes

It seems that you want to set a multi camera sensors / controller centralized ? .. I just delivered that last week ..

tracks : capture the pi cam stream using raspivid and convert to flv stream on the local host using nginx rtmp module (nginx is my prefered lightweight http/ rtmp server). On the controller side use ffmpeg to split the device stream into jpeg image and then rebuild a new mpeg video with mjpg-streamer that publish on an Ip port available for web appliaction (src tag with image address just work fine) . You can also connect to the device in rtmp mode .. but that costs ..

this solution tested on a raw wifi connection provides a < 0.3s latency streaming on the web server side ( with multiple video panes) .. really ^^. Note that the splitted incoming stream as jpeg image in a cache directory fits perfectly with motion detection tool needs ^^

the "compression" is assumed by the nginx server (gzip option) .. but I don't think it could be efficient with a video stream .. rtmp protocol is perhaps as jpeg already compressed ? to google ^^

for this kind of architecture , try to provide a sepcific and dedicated wifi network to guarantee bandwith needs