This commit is contained in:
hehaoyang 2024-03-13 16:34:53 +08:00
parent ef69f2fcf8
commit 5cf2d89829
8 changed files with 74 additions and 30 deletions

View File

@ -26,6 +26,5 @@ SET(CMAKE_CXX_COMPILER "/usr/bin/g++")
```
./make-Makefiles.bash
make -j4
make install
make -j4 && make install
```

View File

@ -1,8 +1,6 @@
# gst-rtsp-server-1.16.3 编译
apt-get install gtk-doc-tools libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
apt install gtk-doc-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev -y
tar xvf gst-rtsp-server-1.16.3.tar.xz
@ -13,3 +11,4 @@ cd gst-rtsp-server
make -j4 && make install
gcc rtsp-server.c -o rtsp-server $(pkg-config --cflags --libs gstreamer-rtsp-server-1.0 gstreamer-1.0)
g++ rtsp-server.cpp -o rtsp-server $(pkg-config --cflags --libs gstreamer-rtsp-server-1.0 gstreamer-1.0)

View File

@ -2,22 +2,15 @@
```
apt-get install qt5-default qtcreator -y
```
dpkg: error processing package *** (--configure)错误解决办法
粗暴方法一删除所有信息之后update
```
apt --fix-broken install -y
dpkg -i --force-overwrite /var/cache/apt/archives/dbus-x11_1.12.16-2ubuntu2.3_arm64.deb
dpkg -i --force-overwrite /var/cache/apt/archives/wpasupplicant_2%3a2.9-1ubuntu4.3_arm64.deb
dpkg -i --force-overwrite /var/cache/apt/archives/bluez_5.53-0ubuntu3.7_arm64.deb
apt --fix-broken install -y
apt-get install qt5-default qtcreator -y
mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/
mkdir /var/lib/dpkg/info/
apt-get update
apt-get install qt5-default qtcreator -y
apt-get install qtmultimedia5-dev -y
```
apt install aptitude
aptitude install qtwayland5 qt5-default qtdeclarative5-dev qtmultimedia5-dev

View File

@ -9,19 +9,17 @@ apt upgrade
apt -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev
apt -y install nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev
apt -y install nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev
```
#### 解压
```
tar -xvf ffmpeg-4.2.9.tar.xz
cd ffmpeg-4.2.9/
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads
make -j4 && make install
```
./configure --prefix=install --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-pthreads
#### 添加环境变量
* 在 /etc/profile 文件最后一行添加
@ -47,7 +45,3 @@ source /etc/profile
```
ldconfig
```
./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads --enable-rkmpp --enable-libdrm

View File

@ -107,7 +107,7 @@ cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D WITH_PNG=NO \
-D WITH_JASPER=NO \
-D WITH_TIFF=NO \
-D WITH_GSTREAMER=OFF \
-D WITH_GSTREAMER=ON \
-D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \
-D CMAKE_INSTALL_PREFIX=install ..
```

View File

@ -0,0 +1,40 @@
1、下载最新的libcurl源代码。
wget https://curl.se/download/curl-8.5.0.tar.gz
tar -zxvf ./curl-8.5.0.tar.gz
cd curl-8.5.0/
./configure --without-zlib --without-ssl --disable-shared
make -j4
测试代码:
#include <stdio.h>
#include "curl/curl.h"
int main(void)
{
CURL *curl;
CURLcode res;
curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
/* example.com is redirected, so we tell libcurl to follow redirection */
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
/* Perform the request, res will get the return code */
res = curl_easy_perform(curl);
/* Check for errors */
if(res != CURLE_OK)
fprintf(stderr, "curl_easy_perform() failed: %s\n",
curl_easy_strerror(res));
/* always cleanup */
curl_easy_cleanup(curl);
}
return 0;
}
编译:
gcc test_curl.c libcurl.a -DCURL_STATICLIB -lpthread -o test_curl

13
Ubuntu/scp.md Normal file
View File

@ -0,0 +1,13 @@
# SCP
#### 将服务器上的文件传输到本地
```
scp username@servername:/path/filename /var/www/local_dir本地目录
```
#### 将本地文件上传到服务器
```
scp /path/filename username@servername:/path/(服务器目录)
```

View File

@ -3,3 +3,9 @@
```
tail -f 文件名
```
查看特定服务(例如 app_service)的实时日志
```
journalctl -u app_service -f
```