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.

ndnvideo's People

Contributors

dkulinski-edm avatar jinpf avatar nanodust avatar takeda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ndnvideo's Issues

Resource busy or not available. xvimagesink.c

I install this on a Ubuntu 12.04 box. When I run ndnvideo/videostreaming/play.py /ndn/ucla.edu/apps/video, no video appears, and console reports this error repeatedly.

Error: Resource busy or not available. xvimagesink.c(1443): gst_xvimagesink_get_xv_support (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
No port available

Packages I have: gstreamer-tools gstreamer0.10-plugins-ugly python-gst0.10-dev

I confirm import pygst works.
gst-launch only works on the first command:

sunny@sunnyp:~$ gst-launch videotestsrc ! ximagesink
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstXImageSink:ximagesink0: Output window was closed
Additional debug info:
ximagesink.c(1119): gst_ximagesink_handle_xevents (): /GstPipeline:pipeline0/GstXImageSink:ximagesink0
Execution ended after 3178341661 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
sunny@sunnyp:~$ gst-launch v4l2src ! ximagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot identify device '/dev/video0'.
Additional debug info:
v4l2_calls.c(493): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...
sunny@sunnyp:~$ gst-launch v4l2src ! x264enc ! ffdec_h264 ! ximagesink
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Cannot identify device '/dev/video0'.
Additional debug info:
v4l2_calls.c(493): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such file or directory
Setting pipeline to NULL ...
Freeing pipeline ...

CCNR_STATUS_PORT not defined and no repo port specified

I dont konw how to configure ccnr , and when I run:

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

it shows this:

Starting!
Traceback (most recent call last):
  File "/home/jinpf/CCN/ndnvideoideostreaming/audio_sink.py", line 94, in do_start
    self.packetizer = CCNAudioPacketizer(self.get_property('repolocation'), self.pr_location)
  File "/home/jinpf/CCN/ndnvideoideostreaming/audio_sink.py", line 21, in __init__
    publisher = utils.RepoSocketPublisher()
  File "/home/jinpf/CCN/ndnvideoideostreaming/utils.py", line 89, in __init__
    raise Exception("CCNR_STATUS_PORT not defined and no repo port specified")
Exception: CCNR_STATUS_PORT not defined and no repo port specified

I followed ‘BUILD’ installed CCNx PyCCN and gstreamer on ubuntu 14.04 on virtualbox. And then use this commands:

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

Really wish someone would help me out

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.