GithubHelp home page GithubHelp logo

ndnvideo's Introduction

#Install & Usage This readme record how I installed and made this app come in to work. Chinese readme version: NDNvideo安装测试记录.

Any questions contact: Email: [email protected]

##Environment I`ve tested on: Ubuntu14.04、VirtualBox4.3.18 and a PC with camera.

For Virtualbox, be aware to install VM VirtualBox Extension Pack.

##Install In official BUILD:

  • ccnx (includes ccnr) If you plan streaming and ccnr crashes when it reaches size around 2GB. Create file csrc/conf/local.mk with: PLATCFLAGS= -O2 -D_FILE_OFFSET_BITS=64 -fPIC

  • pyccn (git://github.com/remap/PyCCN.git)

  • ndnvideo (play_latest branch - git://github.com/remap/ndnvideo.git)

  • gstreamer 0.10 - will NOT WORK with 1.0... must restrict packages to 0.10 for ndnvideo compatibilty.

###CCNx see: https://github.com/ProjectCCNx/ccnx

###PyCCN see: https://github.com/named-data/PyCCN

###gstreamer For Ubuntu 14.04:

sudo apt-get update
sudo apt-get install gstreamer0.10-plugins-ugly python-gst0.10-dev gstreamer0.10-ffmpeg

After installation, simple test for gstreamer:

gst-launch-0.10 videotestsrc ! ximagesink

# With camera. If you want to test it in a VM, you need to share the real camera with the VM.
gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink
gst-launch-0.10 v4l2src ! 'video/x-raw-yuv,width=400,height=300,format=(fourcc)YUY2;video/x-raw-yuv,format=(fourcc)YV12' ! ffmpegcolorspace ! ximagesink
gst-launch-0.10 v4l2src ! videoscale ! 'video/x-raw-yuv,width=400,height=300 ! ffmpegcolorspace ! ximagesink

###NDNvideo

git clone https://github.com/remap/ndnvideo.git
cd ndnvideo
git checkout <the latest branch>

##Usage First, set the ccnx working environment, modify ~/.profile, at the tail add this(you can change the dir anywhere you like):

# ccnd configure
export CCND_LOG=$HOME/.ccn/ccnd_log

# ccnr configure
export CCNR_DIRECTORY=$HOME/.ccn/repo
export CCNR_STATUS_PORT=9680

run:

source ~/.profile
ccndstart
ccnr &

###Publish video/audio ####local video: cd into ndnvideo/videostreaming/ and run:

./ccn_launch.py filesrc location=<your video location> ! typefind ! qtdemux name=mux \
mux.video_00 ! queue ! VideoSink location=/<your designated prefix>/video/video \
mux.audio_00 ! queue ! AudioSink location=/<your designated prefix>/video/audio

For example, I run this at my experiment:

./ccn_launch.py filesrc location=/home/jinpf/1.mp4 ! typefind ! qtdemux name=mux \
mux.video_00 ! queue ! VideoSink location=/jinpf/video/video \
mux.audio_00 ! queue ! AudioSink location=/jinpf/video/audio

####use camera Make sure you have a camera, and gstreamer test works well.

if you want to have different resolution, modify source code in ndnvideo/videostreaming/video_sink.py like:

cd into ndnvideo/videostreaming/ and run:

# publish video
./video_sink.py /<your designated prefix>/streaminfo/video

# publish audio
./audio_sink.py /<your designated prefix>/streaminfo/audio

For example, I run this at my experiment:

# publish video
./video_sink.py /jinpf/streaminfo/video

# publish audio
./audio_sink.py /jinpf/streaminfo/audio

After published the video into your local ccnx repo, you can use this to have a visual look:

ccnexplore &

Attention:Don`t use the same prefix/name at different video, if this happened, clear the ccnr repo:

ccndstop
cd $CCNR_DIRECTORY
rm -r *

#start ccnd
ccndstart
ccnr &

###Play video/audio cd into ndnvideo/videostreaming/ and run:

./play.py /<your designated prefix>

For example, I run this at my experiment:

./play.py /jinpf | tee video_log

This will record play log in file video_log if you have problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.