/
Create a new DEMO stream
Create a new DEMO stream
Original how-to located here:
http://ftp.dev.videonext.net/demo/howto-create-demo-stream.txt
Instructions
How to create a new DEMO stream =============================== 1. Reserve number and name for new video stream: example 5-back_office 2. Setup multiple encoders with the same camera 3. Define few separate cameras on the stratus with different resolutions and formats. Example: mjpg 352x240 30fps mjpg 704x480 30fps h264 352x240 h264 704x480 4. Copy one JPG snapshot (can be found in /tmp or /var/sarch/probe/image/) to /opt/demo/data/5-back_office.jpg 5. Perform the action in front of camera. Make sure action starts and finishes close to chunks boundaries for the best timing 6. Find the relevant chunks of the action in the archive 7. Copy chunks for each camera to demo/data accordingly with format and resolution. If multiple chunks covers the action then concatenate them together. Example: cat 120508224600.mjpg 120508224630.mjpg > /opt/demo/data/5-back_office.352x240.mjpg 8.Check demo/data. Example: #ls -1 /opt/demo/data/5-back_office.* /opt/demo/data/5-back_office.352x240.h264 /opt/demo/data/5-back_office.352x240.mjpg /opt/demo/data/5-back_office.704x480.h264 /opt/demo/data/5-back_office.704x480.mjpg /opt/demo/data/5-back_office.jpg 9.Test a new demo streams: add new DEMO camera from Admin GUI make sure DEMO camera shows snapshot correctly check that the record is looped correctly and boundaries are smooth test different resolutions and media formats make sure formats and resolutions correspond correctly to image parameters 10. Pack demo stream. Example: #cd / && tar cvf demo-5-back_office-3.3.0-3.tar opt/demo/data/5-back_office.* opt/demo/data/5-back_office.352x240.h264 opt/demo/data/5-back_office.352x240.mjpg opt/demo/data/5-back_office.704x480.h264 opt/demo/data/5-back_office.704x480.mjpg opt/demo/data/5-back_office.jpg Note: make sure no `/' on front of 'opt' ! 11. Upload demo stream to ftp://ftp.dev.videonext.net/demo/ 12. (Optional) create rpm and upload to ftp DEMO camera creation steps outside our media framework ====================================================== on 3.9 server: if ffmpeg is not installed then: $ yum install epel-release -y and then $ yum install ffmpeg ffmpeg-devel -y
1. Convert to h264 annexb using ffmpeg: $ ffmpeg -i input.MOV -vcodec libx264 -x264opts keyint=30:min-keyint=30:scenecut=-1 -bf 0 -an -bsf:v h264_mp4toannexb -profile:v main out.h264 Here we can use the time offset parameter (-ss) to specify the start time stamp in HH:MM:SS.ms format while the -t parameter is for specifying the actual duration of the clip in seconds. Also we can use -s switch to reduce resolution. Some useful FFmpeg commands listed for example here: https://www.labnol.org/internet/useful-ffmpeg-commands/ 2. Get h264annexb_to_demo tool from ftp://ftp.dev.videonext.net/demo/h264annexb_to_demo and make DEMO stream in Stratus 3.9 environment:
$ chmod +x h264annexb_to_demo
$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/sarch/imp/lib ./h264annexb_to_demo out.h264 NOTE: code for h264annexb_to_demo located here: http://svn.dev.videonext.net/viewvc/va/branches/3.9.0/mgears/src/lib/storage/tests/h264annexb_to_demo.cpp 3. Rename the resulting 'out.h264.demo' stream as described in the steps above and upload to ftp://ftp.dev.videonext.net/demo/
Related articles
, multiple selections available,