Open galch opened 9 years ago
avconv -f video4linux2 -s vga -i /dev/video0 -vcodec mpeg1video -preset ultrafast http://localhost:5555/feed1.ffm
http://flash-clocks.com/free-flash-clocks-blog-topics/free-flash-clock-180.swf
odroid U3 에서 gstreamer x264enc plugin 관련 버그, 패키지 설치해도 인식 못함.
avconv streaming server를 거치지 않고 udp로 바로 전송하는 방식으로 변경..
avconv -f video4linux2 -s vga -i /dev/video0 -c:v mpeg2video -f mpegts udp://192.168.0.2:5555
gstreamer 1.4 에서 x264enc plugin을 발견하지 못할 때 apt-get install gstreamer1.0-plugins-ugly
를 사용하여 해결.
정상 작동은 하는 것 같지만, streaming에서 not-negotiated 문제 발생. videotestsrc로 확인해야함
gstreamer example for v4l2 http://www.z25.org/static/_rd_/videostreaming_intro_plab/
gst-launch-1.0 v4l2src ! video/x-raw,width=640,height=480 ! jpegenc ! rtpjpegpay ! udpsink host=IP_ADDRESS port=5200
gst-launch-1.0 udpsrc port=5200 ! application/x-rtp, encoding-name=JPEG,payload=26 ! rtpjpegdepay ! jpegdec ! autovideosink
gst-launch-1.0 v4l2src ! image/jpeg,width=1280,height=720 ! rtpjpegpay ! udpsink host=IP_ADDRESS port=5200
USB 연결 시 Latency 측정 HD-3000
Look for fastest video encoder with least lag to stream webcam streaming to ipad stackoverflow
gst-launch-1.0 autovideosrc ! queue ! videoconvert ! video/x-raw,width=640,height=480,framerate=[30/1,10000000/333333] ! x264enc bframes=0 speed-preset=ultrafast bitrate=512 byte-stream=TRUE tune=zerolatency ! video/x-h264,stream-format=byte-stream,alignment=au,profile=baseline ! rtph264pay ! udpsink host=127.0.0.1 port=5000
gst-launch-1.0 udpsrc port=5000 caps = "application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96" ! rtph264depay ! avdec_h264 ! autovideosink
Challenge
Prerequisite
Setup Streaming Server
# sudo apt-get install libav-tools
# sudo vi /etc/avserver.conf
# avserver
# avconv -f video4linux2 -s hd480 -r 30 -i /dev/video0 http://localhost:8090/feed1.ffm