Menu

Main Menu
Talk Get Daily Search

Member's Online

    User Name
    Password

    [AR]n900 - Low latency webcam stream?

    Reply
    AndiThebest | # 1 | 2011-01-19, 22:49 | Report

    Hi.

    I want make a argumented reality car, controled by n900 accelerometer.
    So i have a embedded debian board with makes a wlan-accesspoint, controls the car and sends a webcam stream to n900.

    I have testet videostream from my laptop webcam to n900 (server and client = vlc) with 3 different ways:

    Code:
    server rtp:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,acodec=mpga}:rtp{dst=CLIENTADRESSE,port=5000,sdp=file:///home/andi/sdp.sdp,ttl=10,mux=ts,proto=udp}'
    
    client rtp:
    open sdp.sdp file, generated by server
    vlc file:///sdp.sdp

    Code:
    server udp multicast:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=udp,mux=ts,dst=239.255.23.23:1234}'
    
    client:
    vlc udp://@239.255.23.23:1234 :udp-caching=0

    Code:
    server mms stream:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,vb=64,scale=1,acodec=mpga,ab=8,channels=1}:std{access=mmsh,mux=asfh,dst=:8080}'
    
    client (n900, kmplayer, gstreamer/mplayer):
    mms://SERVER:8080
    via vlc:
    vlc mmsh://SERVER:8080
    My problem is, delay between webcam and n900(kmplayer/vlc) is ~2 seconds, thats too long.
    Any ideas to decrase this latency?

    Regards, Andi

    Edit | Forward | Quote | Quick Reply | Thanks

     
    aligatro | # 2 | 2011-01-19, 22:57 | Report

    try to send uncompressed video, that should help, but wifi might be too slow for it.

    Edit | Forward | Quote | Quick Reply | Thanks

     
    epitaph | # 3 | 2011-01-19, 23:03 | Report

    Originally Posted by AndiThebest View Post
    Hi.

    I want make a argumented reality car, controled by n900 accelerometer.
    So i have a embedded debian board with makes a wlan-accesspoint, controls the car and sends a webcam stream to n900.

    I have testet videostream from my laptop webcam to n900 (server and client = vlc) with 3 different ways:

    Code:
    server rtp:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,acodec=mpga}:rtp{dst=CLIENTADRESSE,port=5000,sdp=file:///home/andi/sdp.sdp,ttl=10,mux=ts,proto=udp}'
    
    client rtp:
    open sdp.sdp file, generated by server
    vlc file:///sdp.sdp

    Code:
    server udp multicast:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,vb=800,scale=1,acodec=mpga,ab=128,channels=2,samplerate=44100}:std{access=udp,mux=ts,dst=239.255.23.23:1234}'
    
    client:
    vlc udp://@239.255.23.23:1234 :udp-caching=0

    Code:
    server mms stream:
    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp2v,vb=64,scale=1,acodec=mpga,ab=8,channels=1}:std{access=mmsh,mux=asfh,dst=:8080}'
    
    client (n900, kmplayer, gstreamer/mplayer):
    mms://SERVER:8080
    via vlc:
    vlc mmsh://SERVER:8080
    My problem is, delay between webcam and n900(kmplayer/vlc) is ~2 seconds, thats too long.
    Any ideas to decrase this latency?

    Regards, Andi
    u can use my tune-up utilities! it optimize network stack and install iptables and iproute. Other than that reduce color of webcam or compute all data onboard ( do u need a life image anyway ? ).

    BTW: do u have fleury or hierholzer algo in php? i really need it!

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by epitaph; 2011-01-19 at 23:23.

     
    AndiThebest | # 4 | 2011-01-19, 23:35 | Report

    thanks for fast replys!

    Originally Posted by aligatro View Post
    try to send uncompressed video, that should help, but wifi might be too slow for it.
    Its not possible to stream without transcoding... when i use vlc without the transcode parameter:
    Code:
    vlc -vvv v4l2:///dev/video0 --sout '#std{access=udp,mux=ts,dst=239.255.23.23:1234}'
    I'll get this output:

    Code:
    [0x29e1f68] main mux debug: adding a new input
    [0x29e1f68] mux_ts mux debug: adding input codec=YUY2 pid=68
    [0x29e1f68] main mux error: cannot add this stream
    [0x29eb958] main packetizer error: cannot create packetizer output (YUY2)



    Originally Posted by
    u can use my tune-up utilities! it optimize network stack and install iptables and iproute. Other than that reduce color of webcam or compute all data onboard ( do u need a life image anyway ? ).

    BTW: do u have fleury or hierholzer algo in php? i really need it!
    Do you know how can i reduce quality and colors of the webcam? yes i want to have a life image.
    btw: i am a php newbie

    Edit | Forward | Quote | Quick Reply | Thanks

     
    epitaph | # 5 | 2011-01-19, 23:45 | Report

    i don't know. it should be some sort of freq filter on the server site. can't u just pipe video device through mplayer on server first i.e. preproccesing and then stream it with vlc? i don't have a fast algo here. also if u use my script u can get very low latency ping and upload dunno how much u can increase throughput but if u are really into it u should try it?

    Edit | Forward | Quote | Quick Reply | Thanks

    Last edited by epitaph; 2011-01-19 at 23:48.

     
    aligatro | # 6 | 2011-01-19, 23:45 | Report

    I didn't test this, but it might work.

    Modified your server settings to

    vlc -vvv v4l2:///dev/video0 --sout '#transcode{vcodec=mp1v,acodec=mpga,fps=10,vb=200} :rtp{dst=CLIENTADRESSE,port=5000,sdp=file:///home/andi/sdp.sdp,ttl=10,mux=ts,proto=udp}'

    Frames per second is 10, bitrate is 200 kb/s and changed codec to Mpeg1.

    Edit | Forward | Quote | Quick Reply | Thanks

     
vBulletin® Version 3.8.8
Normal Logout