Skip to content

Commit

Permalink
Upgrade build versions
Browse files Browse the repository at this point in the history
jetson-ffmpeg to ffmpeg version 6.0
Upgrade motion to version 4.5
Replace jetson-ffmpeg by @Keylost repository.
Altough, @douo and @bmegli have a good too look at.
Here jocover/jetson-ffmpeg#125 references.
  • Loading branch information
eusoubrasileiro committed Jul 25, 2023
1 parent 3449cb0 commit 60fd9fc
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 33 deletions.
23 changes: 4 additions & 19 deletions ansible/roles/jnano/files/RTSP_lower_transport_TCP.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
From 13da5695a9732ae5d56fff33db5f09830d55fd8d Mon Sep 17 00:00:00 2001
From: xxxxxx <iambr>
Date: Sun, 11 Apr 2021 20:40:37 -0300
Subject: [PATCH] Patch RTSP_LOWER_TRANSPORT_TCP - Yoose Ip Camera Fix

Makes ffmpeg more forgiving when xx is ommited RTP/AVP/xx in 'Transport:' line response to a SETUP request.
- assuming by now it was meant to be RTP/AVP/TCP
This fixes my Yoosee W camera problem of not being able to connect.
---
libavformat/rtsp.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 5d8491b..3b406e8 100644
index cfafb4b..24bcbb6 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -932,7 +932,12 @@ static void rtsp_parse_transport(AVFormatContext *s,
}
th->transport = RTSP_TRANSPORT_RAW;
@@ -953,7 +953,12 @@ static void rtsp_parse_transport(AVFormatContext *s,
} else {
break;
}
- if (!av_strcasecmp(lower_transport, "TCP"))
+ /* will need to replace with logcat call on android */
Expand All @@ -28,6 +16,3 @@ index 5d8491b..3b406e8 100644
th->lower_transport = RTSP_LOWER_TRANSPORT_TCP;
else
th->lower_transport = RTSP_LOWER_TRANSPORT_UDP;
--
2.25.1

7 changes: 4 additions & 3 deletions ansible/roles/jnano/files/ffmpeg_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@

# 2.clone ffmpeg and ...
if [ ! -d "ffmpeg" ]; then
git clone git://source.ffmpeg.org/ffmpeg.git -b release/4.2 --depth=1
git clone git://source.ffmpeg.org/ffmpeg.git -b release/6.0 --depth=1
fi

# ... patch ffmpeg with nvmpi and my RTSP_lower_transport patch
cd ffmpeg
git apply ../jetson-ffmpeg/ffmpeg_nvmpi.patch
wget -O ffmpeg_nvmpi.patch https://github.com/Keylost/jetson-ffmpeg/raw/master/ffmpeg_patches/ffmpeg6.0_nvmpi.patch
git apply ffmpeg_nvmpi.patch
# Add my RTSP patch my Yoose trash cameras
patch -p1 < ../RTSP_lower_transport_TCP.patch

Expand Down Expand Up @@ -46,7 +47,7 @@ make -j$(nproc)
# ldconfig

# testing hevc_nvmpi decoder
# ffmpeg -v quiet -stats -rtsp_transport tcp -y -c:v hevc_nvmpi -i rtsp://user:pass@ipcam-kitchen:554/onvif2 -f null -
# ffmpeg -v quiet -stats -rtsp_transport tcp -y -c:v hevc_nvmpi -i rtsp://admin:passwd@ipcam_front_left:554/onvif2 -f null -
# Working perfectly after install. To show only progress use -v quiet -stats
# less image smearing/tearing errors etc.. it seams

7 changes: 5 additions & 2 deletions ansible/roles/jnano/files/motion_build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/bin/bash

# git clone https://github.com/Motion-Project/motion.git -b 4.5 --depth=1
if [ ! -f "motion-src.zip" ]; then # only if not downloaded yet
wget -O motion-src.zip https://github.com/Motion-Project/motion/archive/2829dc766e404bdb24d0435111b4b00c343ab5ee.zip
wget -O motion-src.zip https://github.com/Motion-Project/motion/archive/refs/tags/release-4.5.1.zip
fi
if [ ! -d "motion-src" ]; then # only if not unziped yet
unzip motion-src.zip
Expand All @@ -23,4 +24,6 @@ make -j$(nproc)

# copy to /usr/local/bin the compiled binary better use motiond to avoid confusion if default apt-get package is installed
# cp src/motion /usr/local/bin/motiond
# chmod a+x /usr/local/bin/motiond
# chmod a+x /usr/local/bin/motiond


13 changes: 7 additions & 6 deletions ansible/roles/jnano/files/nvmpi_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
# 1.build nvmpi library local folder

if [ ! -d "jetson-ffmpeg" ]; then
git clone https://github.com/jocover/jetson-ffmpeg.git
git clone https://github.com/Keylost/jetson-ffmpeg.git
fi

# needs usr/src/jetson_multimedia_api/samples

cd jetson-ffmpeg
cmake .
make
# without this ffmpeg cant find nvmpi library even for execution
make install
mkdir build
cd build
cmake ..
make
make install
ldconfig
6 changes: 3 additions & 3 deletions ansible/roles/jnano/files/time_t.patch
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
diff --git a/src/util.c b/src/util.c
index 6ed7534..72c1ce2 100644
index 90e81d0..69b4b86 100644
--- a/src/util.c
+++ b/src/util.c
@@ -402,6 +402,14 @@ static void mystrftime_long (const struct context *cnt, int width, const char *w
sprintf(out, "%*s", width, VERSION);
@@ -400,6 +400,14 @@ static void mystrftime_long (const struct context *cnt, int width, const char *w
sprintf(out, "%*s", width, cnt->eventid);
return;
}
+ if (SPECIFIERWORD("eventtime")) {
Expand Down

0 comments on commit 60fd9fc

Please sign in to comment.