Skip to content

Commit

Permalink
Merge pull request #76 from nyanmisaka/ff4.4-jf
Browse files Browse the repository at this point in the history
  • Loading branch information
crobibero authored Dec 17, 2021
2 parents bab38ca + 205cbdd commit 99b6c47
Show file tree
Hide file tree
Showing 185 changed files with 15,154 additions and 3,301 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build Linux
name: Build jellyfin-ffmpeg

on:
push:
Expand All @@ -12,7 +12,7 @@ on:
workflow_dispatch:

jobs:
build:
build_linux:
name: Build ${{ matrix.release }} ${{ matrix.arch }}
runs-on: ubuntu-latest

Expand All @@ -23,9 +23,10 @@ jobs:
- bullseye
- buster
- stretch
- groovy
- focal
- bionic
- impish
- hirsute

arch:
- amd64
Expand All @@ -46,3 +47,24 @@ jobs:
with:
name: ${{ matrix.release }} ${{ matrix.arch }} package
path: dist
build_win64:
name: Build windows win64
runs-on: ubuntu-latest

strategy:
fail-fast: false

steps:
- uses: actions/checkout@v2

- name: Install make
run: sudo apt-get install make

- name: Build
run: ./build-win64 dist

- name: Upload Packages
uses: actions/upload-artifact@v2.2.3
with:
name: windows win64 package
path: dist
191 changes: 190 additions & 1 deletion Changelog
Original file line number Diff line number Diff line change
@@ -1,7 +1,196 @@
Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.

version <next>:
version 4.4.1:
- avcodec/flac_parser: Consider AV_INPUT_BUFFER_PADDING_SIZE
- avcodec/ttadsp: Fix integer overflows in tta_filter_process_c()
- avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results
- avcodec/utils: Ensure 8x8 alignment for ARGO in avcodec_align_dimensions2()
- avformat/matroskadec: Reset state also on failure in matroska_reset_status()
- avformat/wavdec: Check smv_block_size
- avformat/rmdec: Check for multiple audio_stream_info
- avcodec/apedec: Use 64bit to avoid overflow
- avcodec/apedec: Fix undefined integer overflow in long_filter_ehigh_3830()
- oavformat/avidec: Check offset in odml
- avformat/mpegts: use actually read packet size in mpegts_resync special case
- fftools/ffmpeg: Fix crash when flushing non-fully setup output stream
- avfilter/scale_npp: fix non-aligned output frame dimensions
- Revert "avformat/hlsenc: compute video_keyframe_size after write keyframe"
- Changelog: update
- swscale/alphablend: Fix slice handling
- avcodec/apedec: Fix integer overflow in filter_fast_3320()
- avformat/mov: Fix last mfra check
- avcodec/mxpegdec: Check for AVDISCARD_ALL
- avcodec/flicvideo: Check remaining bytes in FLI*COPY
- avcodec/utils: ARGO writes 4x4 blocks without regard to the image dimensions
- avcodec/cbs_h265_syntax_template: Limit sps_num_palette_predictor_initializer_minus1 to 127
- avcodec/snowdec: Maintain avmv buffer
- avcodec/mpeg12dec: Do not put mpeg_f_code into an invalid state on error return
- avcodec/mpegvideo_enc: Limit bitrate tolerance to the representable
- avcodec/apedec: Fix integer overflow in intermediate
- avformat/mvdec: Do not set invalid sample rate
- avformat/sbgdec: Check for t0 overflow in expand_tseq()
- avformat/rmdec: Use 64bit for intermediate for DEINT_ID_INT4
- avformat/sbgdec: Check opt_duration and start for overflow
- avcodec/exr: Fix undefined integer multiplication
- avformat/mov: Check for duplicate clli
- avformat/utils: Ignore negative duration in codec_info_duration computation
- avformat/jacosubdec: Check for min in t overflow in get_shift()
- avformat/mxfdec: check channel number in mxf_get_d10_aes3_packet()
- (origin/release/4.4) avcodec/wmadec: handle run_level_decode error
- avcodec/wma: Return specific error code
- avcodec/dxva2_av1: fix superres_denom parameter
- avcodec/libdav1d: fix compilation after recent libdav1d API changes
- Changelog: update
- avcodec/utils: don't return negative values in av_get_audio_frame_duration()
- avcodec/jpeg2000dec: Check that atom header is within bytsetream
- avcodec/apedec: Fix 2 integer overflows in filter_3800()
- avcodec/xpmdec: Move allocations down after more error checks
- avcodec/argo: Move U, fix shift
- avformat/mov: Check dts for overflow in mov_read_trun()
- avformat/avidec: Use 64bit for frame number in odml index parsing
- avcodec/mjpegbdec: Skip SOS on AVDISCARD_ALL as does mjpeg
- avcodec/mjpegdec: Check for bits left in mjpeg_decode_scan_progressive_ac()
- avformat/adtsenc: return value check for init_get_bits in adts_decode_extradata
- avcodec/webp: Check available space in loop in decode_entropy_coded_image()
- avcodec/h264dec: use picture parameters in ff_print_debug_info2()
- avcodec/vc1dec: ff_print_debug_info() does not support WMV3 field_mode
- avcodec/frame_thread_encoder: Free AVCodecContext structure on error during init
- avcodec/faxcompr: Check for end of input in cmode == 1 in decode_group3_2d_line()
- avcodec/vc1dec: Disable error concealment for *IMAGE
- avcodec/sbrdsp_fixed: Fix negation overflow in sbr_neg_odd_64_c()
- avcodec/argo: Check for even dimensions
- avformat/wtvdec: Check for EOF before seeking back in parse_media_type()
- avformat/mpc8: Check first keyframe position for overflow
- avcodec/exr: Check ac_count
- avformat/wavdec: Use 64bit in new_pos computation
- avformat/sbgdec: Check for overflow in timestamp preparation
- avformat/dsicin: Check packet size for overflow
- avformat/dsfdec: Change order of operations in bitrate computation
- avformat/bfi: check nframes
- avformat/avidec: fix position overflow in avi_load_index()
- avformat/asfdec_f: Check sizeX against padding
- avformat/aiffdec: Check for size overflow in header parsing
- avcodec/aaccoder: Add minimal bias in search_for_ms()
- avformat/mov: Fix incorrect overflow detection in mov_read_sidx()
- avformat/mov: Avoid undefined overflow in time_offset calculation
- avfilter/af_drmeter: Check that there is data
- avfilter/vf_fftdnoiz: Use lrintf() in export_row8()
- avfilter/vf_mestimate: Check b_count
- avformat/mov: do not ignore errors in mov_metadata_hmmt()
- avformat/mxfdec: Check size for shrinking
- avcodec/dnxhddec: check and propagate function return value
- swscale/slice: Fix wrong return on error
- avcodec/aacdec_template: Avoid some invalid values to be set by decode_audio_specific_config_gb()
- swscale/slice: Check slice for allocation failure
- avformat/matroskadec: Fix handling of huge default durations
- avcodec/lpc: check for zero err in normalization in compute_lpc_coefs()
- avcodec/j2kenc: Check for av_strtok() failure
- avformat/ftp: Check for av_strtok() failure
- tools/cws2fws: Check read() for failure
- avcodec/cpia: Fix missing src_size update
- avcodec/exr: Better size checks
- avcodec/clearvideo: Check tile_size to be not too large
- avcodec/utils: Use 64bit for intermediate in AV_CODEC_ID_ADPCM_THP* duration calculation
- avformat/aaxdec: Check avio_seek() in header reading
- avcodec/hevc_sei: Use get_bits_long() for time_offset_value
- avformat/rmdec: Check old_format len for overflow
- avformat/realtextdec: Check the pts difference before using it for the duration computation
- avformat/qcp: Avoid negative nb_rates
- avformat/pp_bnk: Use 64bit in bitrate computation
- avformat/nutdec: Check tmp_size
- avformat/msf: Check that channels doesnt overflow during extradata construction
- avformat/subtitles: Check pts difference before use
- avformat/mpc8: Check for position overflow in mpc8_handle_chunk()
- avformat/mccdec: Fix overflows in num/den
- avformat/iff: Use 64bit in duration computation
- avformat/dxa: Check fps to be within the supported range more precissely
- avcodec/iff: Only write palette to plane 1 if its PAL8
- avformat/tta: Check for EOF in index reading loop
- avfilter/vf_scale: set the RGB matrix coefficients in case of RGB
- avfilter/vf_scale: reset color matrix in case of identity & non-RGB
- ffmpeg: fix order between field order autodetection and override
- avcodec/h264_slice: clear old slice POC values on parsing failure
- avfilter/f_metadata: do not return the frame early if there is no metadata
- ffbuild: Avoid using the --preprocessor argument to windres
- avcodec/crystalhd: signal that the decoder sets all output frame properties
- avcodec/cuviddec: signal that the decoder sets all output frame properties
- avcodec/decode: reindent after the previous commit
- avcodec/decode: add an internal codec flag to signal a decoder sets all output frame properties
- avcodec/decode: fetch packets from the pkt_props FIFO on every frame returned
- Update missed irc links
- avformat/rpl: The associative law doesnt hold for signed integers in C
- avcodec/faxcompr: Check available bits in decode_uncompressed()
- avcodec/faxcompr: Check if bits are available before reading in cmode == 9 || cmode == 10
- avformat/utils: Avoid overflow in codec_info_duration computation for subtitles
- avformat/utils: check dts/duration to be representable before using them
- avcodec/utils: do "calc from frame_bytes, channels, and block_align" in 64bit
- avcodec/ttadata: Add sentinel at the end of ff_tta_shift_1
- avformat/mov: Check for duplicate mdcv
- avfilter/vf_dctdnoiz: Check threads
- avfilter/vf_ciescope: Fix undefined behavior in rgb_to_xy() with black
- avcodec/dpx: fix off by 1 in bits_per_color check
- avformat/rpl: Check for EOF and zero framesize
- avcodec/vc2enc: Check for non negative slice bounds
- avformat/rpl: Use 64bit in bitrate computation and check it
- avcodec/mpegvideo_enc: Reset stuffing bits if they are not supported
- avcodec/svq1enc: Do not print debug RD value before it has been computed
- avcodec/aacpsy: Check bandwidth
- avcodec/aacenc: Do not divide by lambda_count if it is 0
- avcodec/aacenc: Use FLT_EPSILON for lambda minimum
- avfilter/vf_yadif: Fix handing of tiny images
- avfilter/vf_vmafmotion: Check dimensions
- avformat/movenc: Check pal_size before use
- avcodec/lpc: Avoid floating point division by 0
- avcodec/aacpsy: Avoid floating point division by 0 of norm_fac
- avcodec/aacenc: Avoid 0 lambda
- avcodec/exr: More strictly check dc_count
- avcodec/exr: x/ymax cannot be INT_MAX
- avformat/avio: Check av_opt_copy() for failure
- avformat/moflex: Remove unneeded format variable
- avformat/fifo: check for flushed packets and timeshift
- avcodec/clearvideo: Check for 0 tile_shift
- avcodec/vc1: Check remaining bits in ff_vc1_parse_frame_header()
- avformat/mov: Ignore duplicate CoLL
- avformat/mov: Limit nb_chapter_tracks to input size
- avformat/utils: Use 64bit earlier in r_frame_rate check
- avcodec/alsdec: Fix decoding error with mono audio files
- avformat/mvdec: Check sample rate in parse_audio_var()
- avcodec/faxcompr: Check for end of bitstream in decode_group3_1d_line() and decode_group3_2d_line()
- avcodec/utils: treat PAL8 for jpegs similar to other colorspaces
- avcodec/jpeglsdec: Set alpha plane in PAL8 so image is not 100% transparent
- avformat/asfdec_o: Use ff_get_extradata()
- avformat/id3v2: Check end for overflow in id3v2_parse()
- avformat/mxfdec: Fix file position addition
- avformat/wtvdec: Improve size overflow checks in parse_chunks()
- avcodec/faxcompr: Check remaining bits on error in decode_group3_1d_line()
- avformat/mov: check for pts overflow in mov_read_sidx()
- avcodec/utils: Check ima wav duration for overflow
- avcodec/rv10: Execute whole size check earlier for rv20
- avformat/cafdec: Check channels
- avcodec/exr: increase vlc depth
- avcodec/dpx: Check bits_per_color earlier
- avformat/mvi: Check audio_data_size to be non negative
- avcodec/nvenc: disable s12m timestamps by default
- aarch64: hevc_idct: Fix overflows in idct_dc
- avcodec/vaapi_av1: pass full buffer size for each tile
- avcodec/videotoolboxenc: #define TARGET_CPU_ARM64 to 0 if not provided by the SDK
- lavc/pngdec: fix updating reference frames for APNG_DISPOSE_OP_BACKGROUND
- ffmpeg: return no chosen output if an uninitialized stream is unavailable
- avcodec/h263, h263data: Move ff_h263_init_rl_inter to h263.c
- configure: Add missing mpegvideo dependency for IPU decoder
- avcodec/ttmlenc: Don't confuse capabilities and caps_internal
- avformat/mpegts: add missing sample_rate value to Opus extradata
- avformat/movenc: fix writing dOps atoms
- avcodec/av1_metadata: don't store the inserted TD OBU in stack
- avcodec/nellymoserenc: Fix segfault when using unsupported channels/rate
- avutil/cpu: Use HW_NCPUONLINE to detect # of online CPUs with OpenBSD
- avcodec/nvenc: fix lossless tuning logic
- avfilter/overlay_cuda: check av_buffer_ref result
- avfilter/overlay_cuda: hold explicit reference to hw_device_ctx
- avformat/matroskaenc: Fix leak when writing attachment without filename

version 4.4:
- AudioToolbox output device
- MacCaption demuxer
- PGX decoder
Expand Down
45 changes: 45 additions & 0 deletions Dockerfile.win64.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
FROM DISTRO

# Docker build arguments
ARG SOURCE_DIR=/ffmpeg
ARG ARTIFACT_DIR=/dist

# Docker run environment
ENV DEBIAN_FRONTEND=noninteractive \
SOURCE_DIR=/ffmpeg \
ARTIFACT_DIR=/dist \
FF_REV=FFMPEG_REV \
FF_PREFIX=/opt/ffmpeg \
FF_DEPS_PREFIX=/opt/ffdeps \
FF_TOOLCHAIN=x86_64-w64-mingw32 \
FF_CROSS_PREFIX=x86_64-w64-mingw32- \
FF_CMAKE_TOOLCHAIN=${SOURCE_DIR}/toolchain-win64.cmake \
FF_MESON_TOOLCHAIN=${SOURCE_DIR}/cross-win64.meson \
FF_TARGET_FLAGS="--arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --pkg-config=pkg-config --pkg-config-flags=--static" \
PKG_CONFIG=pkg-config \
PKG_CONFIG_LIBDIR=/opt/ffdeps/lib/pkgconfig:/opt/ffdeps/share/pkgconfig \
CFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffdeps/include -mtune=generic -O2 -pipe -D_FORTIFY_SOURCE=0" \
CXXFLAGS="-static-libgcc -static-libstdc++ -I/opt/ffdeps/include -mtune=generic -O2 -pipe -D_FORTIFY_SOURCE=0" \
LDFLAGS="-static-libgcc -static-libstdc++ -L/opt/ffdeps/lib -O2 -pipe" \
DLLTOOL="x86_64-w64-mingw32-dlltool"

# Prepare Debian and mingw-w64 build environment
RUN \
apt-get -y update && \
apt-get -y install build-essential yasm nasm xxd pkgconf git curl wget unzip subversion autoconf automake libtool libtool-bin autopoint cmake clang texinfo texi2html help2man flex bison gperf gettext itstool ragel libc6-dev libssl-dev gtk-doc-tools gobject-introspection gawk meson ninja-build p7zip-full python3-distutils python3-apt python-is-python3 zip quilt binutils-mingw-w64-x86-64 gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 gfortran-mingw-w64-x86-64 && \
rm /usr/lib/gcc/*-w64-mingw32/*/libstdc++*.dll* && \
rm /usr/lib/gcc/*-w64-mingw32/*/libgcc_s* && \
rm /usr/lib/gcc/*-w64-mingw32/*/*.dll.a && \
rm /usr/*-w64-mingw32/lib/*.dll.a

# Prepare build script and patches
RUN \
mkdir -p /opt/ffmpeg /opt/ffdeps ${SOURCE_DIR} && \
ln -sf ${SOURCE_DIR}/debian/patches ${SOURCE_DIR} && \
ln -sf ${SOURCE_DIR}/docker-build-win64.sh /docker-build-win64.sh

VOLUME ${ARTIFACT_DIR}/

COPY . ${SOURCE_DIR}/

ENTRYPOINT ["/docker-build-win64.sh"]
8 changes: 8 additions & 0 deletions Dockerfile.win64.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/make
DISTRO=ubuntu:hirsute
FF_REV=1
.PHONY: Dockerfile
Dockerfile: Dockerfile.win64.in
sed 's/DISTRO/$(DISTRO)/; s/FFMPEG_REV/$(FF_REV)/' $< > $@ || rm -f $@
clean:
rm -f Dockerfile
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4
4.4.1
2 changes: 1 addition & 1 deletion RELEASE_NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@

We hope you will like this release as much as we enjoyed working on it, and
as usual, if you have any questions about it, or any FFmpeg related topic,
feel free to join us on the #ffmpeg IRC channel (on irc.freenode.net) or ask
feel free to join us on the #ffmpeg IRC channel (on irc.libera.chat) or ask
on the mailing-lists.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.4
4.4.1
11 changes: 6 additions & 5 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@ usage() {
echo -e " * bullseye * arm64"
echo -e " * xenial"
echo -e " * bionic"
echo -e " * cosmic"
echo -e " * disco"
echo -e " * eoan"
echo -e " * focal"
echo -e " * groovy"
echo -e " * hirsute"
echo -e " * impish"
}

if [[ -z ${1} ]]; then
Expand All @@ -34,7 +31,7 @@ case ${cli_release} in
;;
'bullseye')
release="debian:bullseye"
gcc_version="9"
gcc_version="10"
;;
'xenial')
release="ubuntu:xenial"
Expand Down Expand Up @@ -68,6 +65,10 @@ case ${cli_release} in
release="ubuntu:hirsute"
gcc_version="10"
;;
'impish')
release="ubuntu:impish"
gcc_version="11"
;;
*)
echo "Invalid release."
usage
Expand Down
40 changes: 40 additions & 0 deletions build-win64
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env bash

set -o xtrace
set -o errexit

# Check for dependencies
for dep in docker make; do
command -v ${dep} &>/dev/null || { echo "The command '${dep}' is required."; exit 1; }
done

# Use the latest distro for toolchains
distro="ubuntu:impish"
ffrevison="1"
image_name="jellyfin-ffmpeg-build-windows-win64"
package_temporary_dir="$( mktemp -d )"
current_user="$( whoami )"

# Trap cleanup for latter sections
cleanup() {
# Clean up the Dockerfile
make -f Dockerfile.win64.make clean
# Remove tempdir
rm -rf "${package_temporary_dir}"
}
trap cleanup EXIT INT

# Generate Dockerfile
make -f Dockerfile.win64.make DISTRO=${distro} FF_REV=${ffrevison}
# Set up the build environment docker image
docker build . -t "${image_name}"
# Build the APKs and copy out to ${package_temporary_dir}
docker run --rm -v "${package_temporary_dir}:/dist" "${image_name}"
# If no 1st parameter was specified, move APKs to parent directory
if [[ -z ${1} ]]; then
path="../bin"
else
path="${1}"
fi
mkdir ${path} &>/dev/null || true
mv "${package_temporary_dir}"/zip/jellyfin-ffmpeg*.{zip,sha256sum} "${path}"
Loading

0 comments on commit 99b6c47

Please sign in to comment.