RTSP protocol  Real Time Streaming Protocol



RTSP ne transporte pas les données elles-mêmes et doit être associé à un protocole de transport comme RTP ou RDT de RealNetworks pour cette tâche.



::::::::::::::::::::::::::::::::::::::::

https://code.google.com/p/spydroid-ipcamera/source/browse/?r=18a826c102e42e61121bf95c920211f35b06e47e

::::::::::::::::::::::::::::::::::::





https://jorgesys.wordpress.com/android-streaming-rtsp/



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

motion



    output_normal off



Ligne par défaut à « on ». 

Il suffit de la passer à « off » si on ne souhaite pas utiliser l’enregistrement 

mais uniquement le streaming web.





webcam_localhost off  pour un accés par le web





sudo apt-get install libasound2-dev



apt-get remove ffmpeg



git clone git://source.ffmpeg.org/ffmpeg.git



cd ffmpeg

./configure

make

make install







apt-get install crtmpserver



/etc/crtmpserver/applications/flvplayback.lua



validateHandshake=false,

keyframeSeek=false,

seekGranularity=0.1

clientSideBuffer=30



service crtmpserver restart



Install jwplayer on your web server. You can get this at: http://www.longtailvideo.com/, once you have downloaded it, extract the files in:



/var/www/jwplayer





<html>

  <head>

    <title>Raspberry Pi Webcam Streaming</title>

  </head>

  <body>

    <div id="video-jwplayer_wrapper" style="position: relative; display: block; width: 960px; height: 540px;">

      <object type="application/x-shockwave-flash" data="/jwplayer/jwplayer.flash.swf" width="100%" height="100%" bgcolor="#000000" id="video-jwplayer" name="video-jwplayer" tabindex="0">

        <param name="allowfullscreen" value="true">

        <param name="allowscriptaccess" value="always">

        <param name="seamlesstabbing" value="true">

        <param name="wmode" value="opaque">

      </object>

      <div id="video-jwplayer_aspect" style="display: none;"></div>

      <div id="video-jwplayer_jwpsrv" style="position: absolute; top: 0px; z-index: 10;"></div>

    </div>



    <script src="/jwplayer/jwplayer.js"></script>



    <script type="text/javascript">

    jwplayer('video-jwplayer').setup({

      flashplayer:"/jwplayer/jwplayer.flash.swf"

      , file:"rtmp://" + window.location.hostname + "/flvplayback/flv:myStream.flv"

      , autoStart: true

      , rtmp:{

        bufferlength:0.1

      }

      , deliveryType: "streaming"

      , width: 960

      , height: 540

      , player: {

        modes: {

          linear: {

            controls:{

              stream:{

                manage:false

                , enabled: false

              }

            }

          }

        }

      }

      , shows: {

        streamTimer: {

          enabled: true

          , tickRate: 100

        }

      }

    });

    </script>

  </body>

</html>





raspivid -t 0 -w 960 -h 540 -fps 25 -b 500000 -vf -o - | ffmpeg -i - -vcodec copy -an -f flv -metadata streamName=myStream tcp://0.0.0.0:6666



::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::





# test chaining raspivid and ffmpeg

raspivid -t 5000 -w 960 -h 540 -fps 25 -b 500000 -vf -o - | ffmpeg -i - -vcodec copy -an -r 25 -f flv test.flv



# stream to tcp endpoint

raspivid -n -t 0 -w 1920 -h 1080 -fps 25 -b 2000000 -o - | ffmpeg -i - -vcodec copy -an -f flv -metadata streamName=video2 tcp://cppse.nl:6666











 AsyncTask    android load image from url

 Timer 



 Timer mTimer = new Timer();

 

 handler

 runnable

 

 http://theopentutorials.com/tutorials/android/imageview/android-how-to-load-image-from-url-in-imageview/

 

 

 

 

 <html>

    <title>

    motion stream on Raspberry Pi

    </title>

    <head>

    <h1 style="font-family:calibri;">motion stream on Raspberry Pi</h1>

    </head>

    <body>

    <br /><img src="http://<ip_address_of_pi>:8081">

    </body>

</html>





http://www.magdiblog.fr/domotique/systeme-de-tele-surveillance-abordable-avec-des-raspberry-pi/



M-JPEG over HTTP



http://alejandroruizvarela.blogspot.com/2014/03/view-mjpg-video-in-xamarinandroid.html



https://bitbucket.org/neuralassembly/simplemjpegview/src



http://blog.miguelgrinberg.com/post/how-to-build-and-run-mjpg-streamer-on-the-raspberry-pi



Flask Web Development



http://sourceforge.net/projects/webcamserver/



http://blog.miguelgrinberg.com/post/stream-video-from-the-raspberry-pi-camera-to-web-browsers-even-on-ios-and-android



raspistill -vf -hf -o /home/pi/camera/$DATE.jpg





tmpfs



https://www.raspberrypi.org/forums/viewtopic.php?t=45178



Du coup pour éviter de détruire la carte trop rapidement on va passer le répertoire /tmp dans la mémoire vive du Pi, qui elle ne craint rien.



Pour cela il faut éditer le fichier /etc/tmpfs :



# mount /tmp as a tmpfs.  Defaults to no; set to yes to enable (/tmp

# will be part of the root filesystem if disabled).  /tmp may also be

# configured to be a separate mount in /etc/fstab.

RAMTMP=yes



http://blog.jolos.fr/2014/10/projet-picar-stream-camera/



sudo mount -t vfat /dev/[USB_DEVICE_NUMBER]/mnt/usb





    import os

    import time

    print("Reading resolution");

    # These should be inparameters depending on user/height input

    wres = "640"

    hres = "480"



    print("OK! Recording at "+wres+"x"+hres)



    # Use video or still, based on inparameter

    still = True

    # Temporary, how many pictures?

    img_num = 1

    # For picture index

    rec_index = 0

    #-------------------- Mount USB-drive-----------------------



    os.system("sudo mkdir /mnt/usbdrive")

    os.system("sudo mount /dev/sda1 /mnt/usbdrive")

    os.system("ls /mnt/usbdrive")



    #-----------------------------------------------------------





    # Recording path

    rec_path = "-o /mnt/usbdrive/"

    tic = time.time()

    while True:

       rec_str = "raspistill -t 0 %simage%d.jpg -w %s -h %s -n" % (rec_path, rec_index, wres, hres)

       print(rec_str)

       os.system(rec_str)

       time.sleep(1/1000)

       rec_index = rec_index+1

       if rec_index is img_num:

          break

       toc = time.time()

    print"Estimated FPS: {0:.2f}".format(rec_index/(toc-tic))



    #-------------------- Unmount USB-drive----------------------



    #os.system("sudo umount /dev/sda1")



    #------------------------------------------------------------





http://www.netosa.com/blog/2015/01/android-sdk-access-mjpeg-streamer.html



http://m.downloadatoz.com/apps/com.dngames.mjpegviewer,149095.html



http://stackoverflow.com/questions/10550139/android-ics-and-mjpeg-using-asynctask



https://github.com/shuairan/CamtriggA/tree/master/src/org/problemloeser/cta



http://examples.javacodegeeks.com/android/core/ui/surfaceview/android-surfaceview-example/



http://www.androidbegin.com/tutorial/android-video-streaming-videoview-tutorial/



http://www.radicalrabbit.de/blog/2014/08/08/raspberry-powered-video-streaming-camera-hardware/



http://www.radicalrabbit.de/blog/2014/08/08/raspberry-powered-video-streaming-picamera-python/





The BaseHTTPServer module has been merged into http.server in Python 3



https://github.com/radicalrabbit/PyMjpegServer



python mjpeg server



https://gist.github.com/n3wtron/4624820



https://pypi.python.org/pypi/mjpeg-tools/0.0.3



https://www.snip2code.com/Snippet/34674/Simple-MJpeg-streamer-for-Raspberri-Pi-C



les sources



https://bitbucket.org/neuralassembly/simplemjpegview/src/6a5cf5bd8f648f05cff6f4dffdcadb422f99fad5/app/src/main/java/com/camera/simplemjpeg/MjpegActivity.java?at=master



http://www.generation-linux.fr/index.php?post/2013/03/18/Diffuser-une-webcam-%C3%A0-partir-du-Raspberry-Pi-%28grace-%C3%A0-motion%29



