diff --git a/transcoder/Dockerfile.build b/transcoder/Dockerfile.build index 80f9abe3..7907b373 100644 --- a/transcoder/Dockerfile.build +++ b/transcoder/Dockerfile.build @@ -1,7 +1,7 @@ #docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it -v ~/dev/live/transcoder:/tmp -p 6543:6543 kaltura/live-transcoder #gdb --args ./transcoder -f /tmp/config2.json -ARG CUDA_VERSION="11.1.1-devel" +ARG CUDA_VERSION="12.2.0-devel-ubuntu20.04" ARG PYTHON_VERSION=3.8 @@ -12,8 +12,8 @@ WORKDIR /build RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub && apt-get update && apt-get install -y sudo git build-essential gdbserver vim yasm cmake libtool autogen dh-autoreconf libbz2-dev libc6 libc6-dev unzip wget libnuma1 libnuma-dev frei0r-plugins-dev libgnutls28-dev libass-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libopus-dev librtmp-dev libsoxr-dev libspeex-dev libtheora-dev libvo-amrwbenc-dev libvorbis-dev libvpx-dev libwebp-dev libx264-dev libx265-dev libxvidcore-dev gdb -ARG FFMPEG_VERSION="n4.4" -ARG NVIDIA_CODEC_HEADERS_VERSION="n9.0.18.4" +ARG FFMPEG_VERSION="n5.0" +ARG NVIDIA_CODEC_HEADERS_VERSION="n12.0.16.0" ARG PYTHON_VERSION RUN git clone --branch ${NVIDIA_CODEC_HEADERS_VERSION} https://github.com/FFmpeg/nv-codec-headers.git @@ -25,7 +25,7 @@ RUN git clone --branch ${FFMPEG_VERSION} https://github.com/ffmpeg/ffmpeg.git RUN cd ffmpeg && \ - ./configure --disable-doc --enable-nonfree --disable-shared --enable-nvenc --enable-cuda --enable-cuvid --enable-libnpp --extra-cflags=-Ilocal/include --enable-gpl --enable-version3 --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --enable-libx264 --enable-libx265 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 && \ + ./configure --disable-doc --enable-nonfree --disable-shared --enable-nvenc --enable-cuda --enable-cuvid --extra-cflags=-Ilocal/include --enable-gpl --enable-version3 --disable-debug --disable-ffplay --disable-indev=sndio --disable-outdev=sndio --enable-libx264 --enable-libx265 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 && \ make -j 8 RUN apt-get install valgrind -y diff --git a/transcoder/utils/utils.c b/transcoder/utils/utils.c index 9d970928..06282771 100644 --- a/transcoder/utils/utils.c +++ b/transcoder/utils/utils.c @@ -266,7 +266,7 @@ void log_frame_side_data(const char* category,const AVFrame *pFrame) int add_packet_frame_id_and_pts(AVPacket *packet,int64_t frame_id,pts_t pts) { AVDictionary * frameDict = NULL; - int frameDictSize = 0; + size_t frameDictSize = 0; char buf[sizeof("9223372036854775807")]; uint8_t *frameDictData = NULL; sprintf(buf,"%lld",frame_id); @@ -287,7 +287,7 @@ int get_packet_frame_id(const AVPacket *packet,int64_t *frame_id_ptr) { const char *frame_str; AVDictionary * frameDict = NULL; - int frameDictSize = 0; + size_t frameDictSize = 0; uint8_t *frameDictData = av_packet_get_side_data(packet, AV_PKT_DATA_STRINGS_METADATA, &frameDictSize); *frame_id_ptr = AV_NOPTS_VALUE; if (!frameDictData) @@ -305,7 +305,7 @@ int get_packet_original_pts(const AVPacket *packet,pts_t *pts_ptr) { const char *pts_str; AVDictionary * frameDict = NULL; - int frameDictSize = 0; + size_t frameDictSize = 0; uint8_t *frameDictData = av_packet_get_side_data(packet, AV_PKT_DATA_STRINGS_METADATA, &frameDictSize); *pts_ptr = AV_NOPTS_VALUE; if (!frameDictData) diff --git a/transcoder/utils/utils.h b/transcoder/utils/utils.h index 6bb201e7..5a6ff9b0 100644 --- a/transcoder/utils/utils.h +++ b/transcoder/utils/utils.h @@ -13,6 +13,7 @@ #include #include #include +#include size_t load_file_to_memory(const char *filename, char **result);