Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
projects:vlc_powered_streaming [2016/09/08 13:14] over23 [Stream in HTTP:] |
projects:vlc_powered_streaming [2017/06/13 19:56] (current) over23 |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| Documentation: https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/ | Documentation: https://wiki.videolan.org/Documentation:Streaming_HowTo/Command_Line_Examples/ | ||
| + | * http://www.guidingtech.com/ebooks/vlc-media-player/ | ||
| + | * http://alex.mamchenkov.net/2014/11/27/vlc-mosaic-multiple-rstp-streams/comment-page-1/ | ||
| + | * to test for streaming purposes instead of VLC : https://obsproject.com/ | ||
| + | * brmlabi stream: https://brmlab.cz/user/jenda/duga | ||
| ====== HTTP streaming ====== | ====== HTTP streaming ====== | ||
| + | === Stream as mosaic === | ||
| + | |||
| + | mosaic.vlm.conf | ||
| + | <code> | ||
| + | ### static video from file | ||
| + | new channel1 broadcast enabled | ||
| + | setup channel1 input file:///Users/pavouk/Movies/Walk.On.Water.2004.DVDRip.DivX.avi | ||
| + | setup channel1 output #mosaic-bridge{id=1,height=360,width=640} | ||
| + | |||
| + | |||
| + | new channel2 broadcast enabled | ||
| + | setup channel2 input file:///Users/pavouk/Movies/xxx/Big_boobs_beauty_Pinkule_has_multiple_orgasm-563509.mp4 | ||
| + | #setup channel2 output #duplicate{dst=mosaic-bridge{id=2,height=366}} | ||
| + | setup channel2 output #mosaic-bridge{id=2,height=360,width=640} | ||
| + | |||
| + | new channel3 broadcast enabled | ||
| + | setup channel3 input file:///Users/pavouk/Movies/xxx/Big_boobs_beauty_Pinkule_has_multiple_orgasm-563509.mp4 | ||
| + | setup channel3 output #mosaic-bridge{id=3,height=360,width=640} | ||
| + | |||
| + | new channel4 broadcast enabled | ||
| + | setup channel4 input file:///Users/pavouk/Movies/xxx/Big_boobs_beauty_Pinkule_has_multiple_orgasm-563509.mp4 | ||
| + | setup channel4 output #mosaic-bridge{id=4,height=360,width=640} | ||
| + | |||
| + | ### background image | ||
| + | new mosaic broadcast enabled | ||
| + | setup mosaic input file:///Users/pavouk/Dropbox/Public/Wallpapers/GITS.png | ||
| + | setup mosaic option image-duration=-1 | ||
| + | setup mosaic option image-fps=0 | ||
| + | setup mosaic option mosaic-rows=2 | ||
| + | setup mosaic option mosaic-cols=2 | ||
| + | setup mosaic option mosaic-position=1 | ||
| + | setup mosaic output #transcode{sfilter=mosaic,vcodec=mp4v,VB=8500,acodec=none,fps=25,scale=1}:display | ||
| + | |||
| + | control channel1 play | ||
| + | control channel2 play | ||
| + | control channel3 play | ||
| + | control channel4 play | ||
| + | control mosaic play | ||
| + | </code> | ||
| + | |||
| + | * to run | ||
| + | <code> | ||
| + | vlc --vlm-conf ~/Movies/mosaic.vlm.conf --mosaic-width 1280 --mosaic-order "1,2,3,4" --mosaic-height 720 | ||
| + | </code> | ||
| ===== Stream in HTTP: ===== | ===== Stream in HTTP: ===== | ||
| Line 13: | Line 60: | ||
| vlc http://server.example.org:8080 | vlc http://server.example.org:8080 | ||
| + | | ||
| + | * server side, HTTP, from file | ||
| + | |||
| + | /Applications/VLC.app/Contents/MacOS/VLC -vvv ~/Movies/Bio\ Nano\ Technology-New\ Frontiers\ | ||
| + | in\ Molecular\ Engineering\ -\ Andreas\ Mershin\ at\ TEDxAthens-sjV7NNwm1GU.mkv --sout | ||
| + | '#standard{access=http,mux=ogg,dst=127.0.0.1:8080}' | ||
| ===== Transcode and stream in HTTP ===== | ===== Transcode and stream in HTTP ===== | ||
| Line 27: | Line 80: | ||
| + | ===== Dronovo poznámky ===== | ||
| + | |||
| + | Ne zcela s jasnou souvislosti se streamingem videa z labky, ale pár poznámek ze streamingu videa/fotek z vebkamery pripojene k rbpi(3). | ||
| + | |||
| + | Pokud stačí típnutí fotky z webkamery... | ||
| + | |||
| + | <code> | ||
| + | sudo apt-get install fswebcam | ||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | fswebcam -r 640x480 --jpeg 85 -D 1 shot.jpg | ||
| + | </code> | ||
| + | |||
| + | Video (ale ani rbpi3 to rozumne nestíhá... možná použít jiný codec...) | ||
| + | |||
| + | <code> | ||
| + | sudo apt-get install vlc=nox | ||
| + | </code> | ||
| + | |||
| + | <code> | ||
| + | vlc v4l2:// :v4l2-dev=/dev/video0 :v4l2-width=640 :v4l2-height=480 --sout="#transcode{vcodec=h264,vb=1800,scale=1,acodec=none}:rtp{sdp=rtsp://:8554/live.ts}" -I dummy | ||
| + | </code> | ||
| + | |||
| + | Na druhé straně ve vlc pustit network stream z adresy <code>rtsp://ip_addr_rbpi:8554/live.ts</code> | ||
| + | |||
| + | ==== STREAM POMOCI FFMPEG ==== | ||
| + | <code> | ||
| + | ffmpeg -re -ar 44100 -ac 2 -acodec pcm_s16le -f alsa -ac 2 -i hw:1,0 -i /dev/video0 | ||
| + | -vcodec h264_omx -vf scale=-1:480 -vb 300k -acodec aac -ab 128k -g 50 -strict experimental -f | ||
| + | flv rtmp://a.rtmp.youtube.com/live2/XXXXXXXXXXXXXXX | ||
| + | </code> | ||