OpenWrt NetSom users guide. video streaming kit.

Here is described steps to run video streaming solution out-of-box using NetSoM development board used as video streaming kit.

Hardware requirements.

You have to stick OV5640 video module to NetSoM development board. Then just power up development board and connect via SSH.

Software requirements.

You have to use video_stream_ethernet or video_stream_wifi images. Steps to update NetSoM firmware described here.

Video streaming using MPEGTS protocol.

Gives lowest streaming delay (~1 sec).

First configure ffmpeg utility on NetSoM:

# vi /etc/config/ffmpeg

If you not familiar with vi editor just press i button on opening file then use it as usual editor. After finishing file editing press ESC button and :wq if you want to save file changes. :q! otherwise.

Set following parameters:

  • option in_device                  –          ‘/dev/video0’
  • option framerate                 –          ’15’
  • option resolution                –          ‘320×240’
  • option vcodec                      –          ‘mpeg2video’
  • option qscale_v                   –          ‘5’
  • option override_ffserver   –          ‘0’
  • option out_format              –          ‘mpegts’
  • option remote                     –          ‘udp://192.168.1.100:5555’
  • option enabled                   –          ‘1’

Here remote is address of host machine running ffplay utility (see further).

Then restart ffmpeg service:

# /etc/init.d/ffmpeg restart

The last one step – start video playing using ffplay utility:

$ ffplay -fflags -nobuffer -probesize 32 -sync ext -i udp://192.168.1.100:5555

Here example of video streaming:

Here NetSoM video module pointed to Laptop screen with online stopwatch opened in browser. Another windows you see – is ffplay screen displaying video stream from NetSom development board. Latency between original stopwatch and streamed video is about 1 second.

Video streaming using RTSP protocol.

gives higher latency. About 10 seconds unfortunately.

Same as with MPEGTS configuration edit config file:

# vi /etc/config/ffmpeg

to set following values:

  • option in_device                  –          ‘/dev/video0’
  • option framerate                 –          ‘5’
  • option resolution                –          ‘320×240’
  • option vcodec                      –          ‘mpeg2video’
  • option b_v                            –          ‘192k’
  • option override_ffserver   –          ‘0’
  • option out_format              –          ‘rtp’
  • option remote                     –          ‘rtp://192.168.1.100:3333’
  • option enabled                   –          ‘1’

Then restart service:

# /etc/init.d/ffmpeg restart

Run vlc on host machine:

$ vlc -vvv -I dummy rtp://0.0.0.0:3333 –sout ‘#rtp{dst=0.0.0.0,port=3334,sdp=rtsp://0.0.0.0:8080/test.sdp}’

If not installed type:

$ sudo apt-get install vlc

Then run video playing:

 $ vlc rtsp://127.0.0.1:8080/test.sdp

That’s it!