FMUSER Wirless Transmit Video And Audio More Easier !
es.fmuser.org
it.fmuser.org
fr.fmuser.org
de.fmuser.org
af.fmuser.org ->Afrikaans
sq.fmuser.org ->Albanian
ar.fmuser.org ->Arabic
hy.fmuser.org ->Armenian
az.fmuser.org ->Azerbaijani
eu.fmuser.org ->Basque
be.fmuser.org ->Belarusian
bg.fmuser.org ->Bulgarian
ca.fmuser.org ->Catalan
zh-CN.fmuser.org ->Chinese (Simplified)
zh-TW.fmuser.org ->Chinese (Traditional)
hr.fmuser.org ->Croatian
cs.fmuser.org ->Czech
da.fmuser.org ->Danish
nl.fmuser.org ->Dutch
et.fmuser.org ->Estonian
tl.fmuser.org ->Filipino
fi.fmuser.org ->Finnish
fr.fmuser.org ->French
gl.fmuser.org ->Galician
ka.fmuser.org ->Georgian
de.fmuser.org ->German
el.fmuser.org ->Greek
ht.fmuser.org ->Haitian Creole
iw.fmuser.org ->Hebrew
hi.fmuser.org ->Hindi
hu.fmuser.org ->Hungarian
is.fmuser.org ->Icelandic
id.fmuser.org ->Indonesian
ga.fmuser.org ->Irish
it.fmuser.org ->Italian
ja.fmuser.org ->Japanese
ko.fmuser.org ->Korean
lv.fmuser.org ->Latvian
lt.fmuser.org ->Lithuanian
mk.fmuser.org ->Macedonian
ms.fmuser.org ->Malay
mt.fmuser.org ->Maltese
no.fmuser.org ->Norwegian
fa.fmuser.org ->Persian
pl.fmuser.org ->Polish
pt.fmuser.org ->Portuguese
ro.fmuser.org ->Romanian
ru.fmuser.org ->Russian
sr.fmuser.org ->Serbian
sk.fmuser.org ->Slovak
sl.fmuser.org ->Slovenian
es.fmuser.org ->Spanish
sw.fmuser.org ->Swahili
sv.fmuser.org ->Swedish
th.fmuser.org ->Thai
tr.fmuser.org ->Turkish
uk.fmuser.org ->Ukrainian
ur.fmuser.org ->Urdu
vi.fmuser.org ->Vietnamese
cy.fmuser.org ->Welsh
yi.fmuser.org ->Yiddish
preparation
One raspberry pie (1-3 generations are OK)
A USB camera
Connected to network
step
Connect the raspberry pie to the USB camera. The lsusb command can view the camera model and other information. At the same time, a video 0 device will appear in the / dev directory. In order to install web server in raspberry pie, nginx is selected in consideration of the performance of raspberry pie.
sudo apt-get update
sudo apt-get install nginx
By default, the root directory of nginx's website is in / var / www / HTML. For convenience, we can change the root directory to / var / www, modify the default file of / etc / nginx / sites available, change root / var / www / HTML; to root / var / WWW;, and then enter the / var / www directory to delete the default file in the HTML folder index.nginx - debian.html Move to this directory and restart the nginx service.
cd /var/www;
sudo mv html/ index.nginx - debian.html index.html
sudo rm -r html
sudo service nginx restart
HLS continuously slices the video and writes it to the set n files circularly. Repeated writing for a long time may damage the SD card. Therefore, it is better to divide a 16m memory space for storing the slice files. Create the HLS folder in the / var / www directory, modify the / etc / fstab file, and add a content as follows:
tmpfs /var/www/hls tmpfs defaults,size=16M 0 0
Restart raspberry pie. After entering the DF - H command, you can see that it is as follows, indicating that TMPFS is successfully mounted to / var / www / HLS.
tmpfs 16M 0 16M 0% /var/www/hls
Create in the current directory, that is / home / PI hls.sh Where - R 10 represents the frame rate of 10, - s 640x480 represents the resolution, - B: V 300K represents the video rate, and C: V H264 represents the video rate_ OMX stands for OMX hardware encoder using raspberry pie, - segment_ Time 2 represents 2 seconds per slice, - segment_ Wrap 3 means the number of slices is 3, - segment_ list_ Size 3 means that the number of buffer files is 3. Finally, the sliced files are put into the / var / www / HLS directory and stream.m3u8 is generated.
ffmpeg -f v4l2 -r 10 -s 640x480 -i /dev/video0 -b:v 300k -c:v h264_ omx -an -f segment -segment_ time 2 -segment_ wrap 3 -segment_ list_ size 3 -segment_ list "/var/www/hls/stream.m3u8" "/var/www/hls/stream%03d.ts"
Implementation hls.sh
chmod +x hls.sh
./ hls.sh
Use a browser that supports HTML5 to see the content of the video stream. The link is: Raspberry pie IP / HLS / stream. M3u8
HLS output
summary
The effect of using raspberry pie hardware encoder is very obvious, basically does not occupy the CPU utilization. The HLS used this time is a live video streaming protocol that can be directly used in HTML5. It has the advantages of good penetration and can be used when there is a network. However, the disadvantages are obvious. The video delay is very large. According to the above settings, it also has a delay of at least 6S. It is expected that webrtc protocol can be popularized as soon as possible.
|
Enter email to get a surprise
es.fmuser.org
it.fmuser.org
fr.fmuser.org
de.fmuser.org
af.fmuser.org ->Afrikaans
sq.fmuser.org ->Albanian
ar.fmuser.org ->Arabic
hy.fmuser.org ->Armenian
az.fmuser.org ->Azerbaijani
eu.fmuser.org ->Basque
be.fmuser.org ->Belarusian
bg.fmuser.org ->Bulgarian
ca.fmuser.org ->Catalan
zh-CN.fmuser.org ->Chinese (Simplified)
zh-TW.fmuser.org ->Chinese (Traditional)
hr.fmuser.org ->Croatian
cs.fmuser.org ->Czech
da.fmuser.org ->Danish
nl.fmuser.org ->Dutch
et.fmuser.org ->Estonian
tl.fmuser.org ->Filipino
fi.fmuser.org ->Finnish
fr.fmuser.org ->French
gl.fmuser.org ->Galician
ka.fmuser.org ->Georgian
de.fmuser.org ->German
el.fmuser.org ->Greek
ht.fmuser.org ->Haitian Creole
iw.fmuser.org ->Hebrew
hi.fmuser.org ->Hindi
hu.fmuser.org ->Hungarian
is.fmuser.org ->Icelandic
id.fmuser.org ->Indonesian
ga.fmuser.org ->Irish
it.fmuser.org ->Italian
ja.fmuser.org ->Japanese
ko.fmuser.org ->Korean
lv.fmuser.org ->Latvian
lt.fmuser.org ->Lithuanian
mk.fmuser.org ->Macedonian
ms.fmuser.org ->Malay
mt.fmuser.org ->Maltese
no.fmuser.org ->Norwegian
fa.fmuser.org ->Persian
pl.fmuser.org ->Polish
pt.fmuser.org ->Portuguese
ro.fmuser.org ->Romanian
ru.fmuser.org ->Russian
sr.fmuser.org ->Serbian
sk.fmuser.org ->Slovak
sl.fmuser.org ->Slovenian
es.fmuser.org ->Spanish
sw.fmuser.org ->Swahili
sv.fmuser.org ->Swedish
th.fmuser.org ->Thai
tr.fmuser.org ->Turkish
uk.fmuser.org ->Ukrainian
ur.fmuser.org ->Urdu
vi.fmuser.org ->Vietnamese
cy.fmuser.org ->Welsh
yi.fmuser.org ->Yiddish
FMUSER Wirless Transmit Video And Audio More Easier !
Contact
Address:
No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620
Categories
Newsletter