Step 1
If any version of postman is installed we need to remove it
sudo rm -rf /opt/Postman
Step 2
Inspired By: grafana/loki#333
version: "3"
networks:
loki:
#restream rtsp to udp link | |
ffmpeg -i "rtsp://admin:[email protected]:554/" -pix_fmt yuv420p -deinterlace -vf "scale=640:360" -vsync 1 -threads 0 -vcodec libx264 -r 29.970 -g 60 -sc_threshold 0 -b:v 1024k -bufsize 0 -maxrate 1280k -preset medium -tune film -acodec aac -b:a 128k -ac 2 -ar 48000 -af "aresample=async=1:min_hard_comp=0.100000:first_pts=0" -vbsf h264_mp4toannexb -f mpegts udp://0.0.0.0:10000 | |
# create a test stream and create rtmp stream | |
# start nginx server before running this | |
ffmpeg -r 30 -f lavfi -i testsrc -vf scale=1280:960 -vcodec libx264 -profile:v baseline -pix_fmt yuv420p -f flv rtmp://localhost/mylive/test |
import numpy as np | |
import cv2 | |
from multiprocessing import Process | |
def send(): | |
#originals | |
#cap_send = cv2.VideoCapture('videotestsrc ! video/x-raw,framerate=20/1 ! videoscale ! videoconvert ! appsink', cv2.CAP_GSTREAMER) #orginal | |
#out_send = cv2.VideoWriter('appsrc ! videoconvert ! x264enc tune=zerolatency bitrate=500 speed-preset=superfast ! rtph264pay ! udpsink host=127.0.0.1 port=5000',cv2.CAP_GSTREAMER,0, 20, (320,240), True) #original | |
#cap_receive = cv2.VideoCapture('udpsrc port=5000 caps = "application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! decodebin ! videoconvert ! appsink', cv2.CAP_GSTREAMER) | |
###### |
#to check video card working right now | |
sudo lshw -C video | |
#!/bin/bash | |
# to know which device is connected at which port | |
for sysdevpath in $(find /sys/bus/usb/devices/usb*/ -name dev); do | |
( | |
syspath="${sysdevpath%/dev}" | |
devname="$(udevadm info -q name -p $syspath)" |
### NOTE ### | |
The below gist is converted to a blog post and available at below link. Refer than instead. | |
http://hemenkapadia.github.io/blog/2016/05/07/Ubuntu-with-Nvidia-Bumblebee.html | |
#### Note about kernel versions #### | |
Between kernel versions 4.2 and 4.4 there are different options that need to bet set |
filename="DamagedBeam.pts" | |
from numpy import loadtxt | |
from numpy import savetxt | |
lines = loadtxt(filename,skiprows=1) | |
size=str(lines[:,0].size) | |
header = "VERSION .7\nFIELDS x y z\nSIZE 4 4 4\nTYPE F F F\nCOUNT 1 1 1\nWIDTH "+size+"\nHEIGHT 1\nVIEWPOINT 0 0 0 1 0 0 0\nPOINTS "+size+"\nDATA ascii" | |
pcd=lines[:,[0,1,2]] | |
savetxt("DamagedBeam.pcd", pcd, fmt="%f",header=header,comments='') |