ywu40 / gnuradio_raptorcodes_video Goto Github PK
View Code? Open in Web Editor NEWThis project shows how to use Raptor codes to provide FEC protection for H.264 video data in GNURadio and USRP board.
This project shows how to use Raptor codes to provide FEC protection for H.264 video data in GNURadio and USRP board.
Before running the following codes, please make sure that you have correctly installed GNURadio and ffmpeg in your linux OS. You should also install Python in your linux since we need it to convert C++ APIs into Python APIs for GNURadio. How to install GNURadio, please refer to: http://gnuradio.org/redmine/projects/gnuradio/wiki/InstallingGR How to install ffmpeg and x264 under Ubuntu, please refer to: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu Note: Please run the commands at the receiving side first, then start to run the commands at the sending side. Sender Side: 1. Compile the C++ codes of Raptor codes in https://github.com/ywu40/RaptorCodes_Cplusplus_Python sudo swig -c++ -python raptor_decoder.i sudo python setup_decoder.py build_ext --inplace 2. After compiling, two files are generated: _raptor_decoder.so raptor_decoder.py 3.Copy the following files to GNURadio installing directory gnuradio/gr-digital/examples/narrowband _raptor_decoder.so raptor_decoder.py test_raptor_video_tx.py test_raw_video_tx.py foreman_cif.264 1)test_raptor_video_tx.py is use to test the performance of sending the video data with Raptor codes protection 2)test_raw_video_tx.py is to send the video data without any FEC protection 3)foreman_cif.264 is the testing stream 4. Send the video data over usrp with Raptor codes python test_raptor_video_tx.py --tx-freq=908M --rx-freq=921975000 --rx-gain=30 --tx-gain=30 --tx-amplitude=1 -p 1 -T 200 1)p: packet loss rate (%) 2)T: source symbols size 5. Send the video data over usrp without Raptor codes python test_raw_video_tx.py --tx-freq=908M --rx-freq=921975000 --rx-gain=30 --tx-gain=30 --tx-amplitude=1 -k 200 1)p: packet loss rate (%) 2)T: source symbols size Receiver Side: 1. Compile the C++ codes of Raptor codes in https://github.com/ywu40/RaptorCodes_Cplusplus_Python sudo swig -c++ -python raptor_decoder.i sudo python setup_decoder.py build_ext --inplace 2. After step 1, copy the following files to the directory gnuradio/gr-digital/examples/narrowband _raptor_decoder.so raptor_decoder.py test_raptor_video_rx.py test_raw_video_rx.py 1)test_raptor_video_rx.py is use to receive the video data with Raptor codes protection 2)test_raw_video_rx.py is to receive the video data without any FEC protection 3. Receive the video data over usrp with Raptor codes python test_raptor_video_rx.py --rx-freq=908M --tx-freq=921975000 --rx-gain=30 --tx-gain=30 --tx-amplitude=1 -p 1 1)p: packet loss rate (%) 2)T: source symbols size 4. Receive the video data over usrp without Raptor codes python test_raw_video_rx.py --rx-freq=908M --tx-freq=921975000 --rx-gain=30 --tx-gain=30 --tx-amplitude=1 -p 1 1)p: packet loss rate (%) 2)T: source symbols size 5. ffplay 1) Play the video stream with Raptor codes protection ffplay -f h264 output_raptor.264 2) Play the video stream without Raptor codes protection ffplay -f h264 output_no_raptor.264 6. h.264 streams are converted to yuv avconv -i output_raptor.264 -s 352x288 out_raptor.yuv Note: a)avconv is a tool of ffmpeg b)out_raptor.yuv is the yuv (raw video) format c)-i: input file d)-s: the video resolution (or size), in this experiment is CIF (352*288) 7. use mplayer to play the yuv file You can use mplayer as a YUV player with the example command below. mplayer foreman.qcif -demuxer rawvideo -rawvideo qcif command format: mplayer “yuv filename” -demuxer rawvideo -rawvideo “qcif,cif”
hello we are wondering which usurp do you use?
we use x310 to run your raptor codes_video
but we cannot receive anything in the receiver
do you know why?
thanks a lot!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.