From 1a6f6514247ffa2e52a88ba1c5047549f19b0e97 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 21 Apr 2022 10:36:20 -0400 Subject: [PATCH 1/3] time_base requires newer ffmpeg --- src/zm_videostore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index cc0f79d02..e361a6e8a 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -1009,7 +1009,9 @@ int VideoStore::writeVideoFramePacket(const std::shared_ptr &zm_packet //zm_packet->out_frame->pict_type = AV_PICTURE_TYPE_NONE; //zm_packet->out_frame->key_frame = zm_packet->keyframe; //frame->pkt_duration = 0; +#if HAVE_LIBAVUTIL_HWCONTEXT_H && LIBAVCODEC_VERSION_CHECK(57, 107, 0, 107, 0) frame->time_base = video_out_ctx->time_base; +#endif if (!video_first_pts) { video_first_pts = static_cast(std::chrono::duration_cast(zm_packet->timestamp.time_since_epoch()).count()); From 1fbd7309688e883bcd9cb176b2d6272c713c28d8 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 21 Apr 2022 10:47:57 -0400 Subject: [PATCH 2/3] Include libavdevice-dev --- .github/workflows/ci-bionic.yml | 2 +- .github/workflows/ci-bullseye.yml | 2 +- .github/workflows/ci-buster.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-bionic.yml b/.github/workflows/ci-bionic.yml index dda5c5cd3..4718f34f0 100644 --- a/.github/workflows/ci-bionic.yml +++ b/.github/workflows/ci-bionic.yml @@ -38,7 +38,7 @@ jobs: run: > apt-get -qq install make cmake g++ default-libmysqlclient-dev - libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev + libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libavdevice-dev libcurl4-gnutls-dev libvlc-dev libvncserver-dev libdate-manip-perl libdbd-mysql-perl libsys-mmap-perl libwww-perl libpolkit-gobject-1-dev diff --git a/.github/workflows/ci-bullseye.yml b/.github/workflows/ci-bullseye.yml index 7d1882844..3d34e77ff 100644 --- a/.github/workflows/ci-bullseye.yml +++ b/.github/workflows/ci-bullseye.yml @@ -41,7 +41,7 @@ jobs: run: > apt-get -qq install make cmake g++ default-libmysqlclient-dev - libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev + libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libavdevice-dev libcurl4-gnutls-dev libvlc-dev libvncserver-dev libdate-manip-perl libdbd-mysql-perl libsys-mmap-perl libwww-perl libpolkit-gobject-1-dev diff --git a/.github/workflows/ci-buster.yml b/.github/workflows/ci-buster.yml index 7411366dd..66f263835 100644 --- a/.github/workflows/ci-buster.yml +++ b/.github/workflows/ci-buster.yml @@ -41,7 +41,7 @@ jobs: run: > apt-get -qq install make cmake g++ default-libmysqlclient-dev - libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev + libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libavdevice-dev libcurl4-gnutls-dev libvlc-dev libvncserver-dev libdate-manip-perl libdbd-mysql-perl libsys-mmap-perl libwww-perl libpolkit-gobject-1-dev From ccfbed673513b1ecc219f545b8fd5904b6641dc3 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 21 Apr 2022 17:00:10 -0400 Subject: [PATCH 3/3] remove setting time base I don't know which version of ffmpe supports this, but not mine so it isn't solving the problem I thought it was --- src/zm_videostore.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index e361a6e8a..e578d5196 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -1009,9 +1009,6 @@ int VideoStore::writeVideoFramePacket(const std::shared_ptr &zm_packet //zm_packet->out_frame->pict_type = AV_PICTURE_TYPE_NONE; //zm_packet->out_frame->key_frame = zm_packet->keyframe; //frame->pkt_duration = 0; -#if HAVE_LIBAVUTIL_HWCONTEXT_H && LIBAVCODEC_VERSION_CHECK(57, 107, 0, 107, 0) - frame->time_base = video_out_ctx->time_base; -#endif if (!video_first_pts) { video_first_pts = static_cast(std::chrono::duration_cast(zm_packet->timestamp.time_since_epoch()).count());