ffmpeg RTSP串流品質檢測
1 | ffmpeg -i rtsp://<伺服器IP>:<埠>/<路徑> -t 30 output.mp4 |
ffmpeg RTSP串流品質檢測
1 | ffmpeg -i rtsp://<伺服器IP>:<埠>/<路徑> -t 30 output.mp4 |
找出最近一次重啟時間
1 | last reboot| head -2 |
查詢/var/log下的各種log並且找到重啟前的錯誤,包含messages, syslog, dmesg, and kern.log
參考:
https://learnlinux.hashnode.dev/how-to-troubleshooting-unexpected-linux-server-reboot
Windows
1 | route -p add 10.179.101.0 mask 255.255.255.0 10.179.10.254 metric 10 |
Ubuntu
1 | sudo ip route add 10.179.2.0/24 via 10.179.20.254 dev enp75s0f1 |
1 | hexo server |
1 | hexo new [layout] "文章名稱" |
layout 可以是post, page 或 draft
1 | $ hexo generate |
More info: Generating
1 | $ hexo deploy |
More info: Deployment
查詢硬碟空間
1 | du -sh ./* |
有時候硬碟空間可能因為資料夾沒有mount,所以雖然占用硬碟空間但是du無法顯示出來,可以使用下面的指令來查看:
1 | shopt -s dotglob && sudo mount / /mnt -o bind && du -sh /mnt/* && umount /mnt |
linker設定rpath的選項範例如下
1 | gcc -Wl,-rpath=/opt/nvidia/deepstream/deepstream-6.4/lib test.cpp |
RPATH有一個特殊識別符號$ORIGIN,表示執行檔的所在目錄
1 | gcc -Wl,-rpath='$ORIGIN/../lib' test.cpp |
查看函式庫的rpath
1 | readelf -d libnvds_rest_server.so |head -20 |
或是
1 | objdump -x libnvds_rest_server.so |grep 'R.*PATH' |
CMake使用兩個變數來控制RPATH:INSTALL_RPATH和BUILD_RPATH,install步驟的rpath是INSTALL_RPATH
1 | SET_TARGET_PROPERTIES(nvds_rest_server |
cmake的另一個設定RPATH的方法
https://discourse.cmake.org/t/library-rpath-resolution/887/7
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH “${ORIGIN}”)
1 | // 發送EOS訊號讓filesink可以正常結束 |
https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html#gst_element_get_state
https://gstreamer-devel.narkive.com/g1omJFAj/gst-devel-graceful-exit-shutdown-of-a-pipeline#post3
https://stackoverflow.com/questions/38170733/gstreamer-not-flushing-to-the-filesink
https://gitlab.freedesktop.org/freedesktop/snippets/-/snippets/1760
https://gist.github.com/CaptainOnly/f88cbb6ac5fdeae80200fbb3f7be695c