From ea1f044143d8d40ebbad205f47647e7f29092aa2 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Sat, 8 Jun 2024 21:26:17 +0900 Subject: [PATCH 1/9] github actions init --- .github/workflows/build.yml | 126 ++++++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000000..6ee18eddfd10c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,126 @@ +name: Build FFmpeg + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - os: macos-14 + target: macos-arm64 + configure_args: --enable-pthreads --enable-neon + - os: macos-13 + target: macos-x64 + configure_args: --enable-pthreads + - os: ubuntu-latest + target: linux-x64 + configure_args: --enable-pthreads + - os: ubuntu-latest + target: windows-x64 + configure_args: --enable-w32threads --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --arch=x86_64 + - os: ubuntu-latest + target: linux-arm64 + configure_args: --enable-pthreads --enable-neon + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Prepare build script + run: | + echo " + ./configure \ + --disable-everything \ + --disable-autodetect \ + --disable-encoders \ + --disable-decoders \ + --enable-decoder='h264,aac' \ + --enable-encoder=aac \ + --enable-parser='h264,aac,mp3' \ + --enable-demuxer='flv,h264,aac,mp3,live_flv' \ + --enable-muxer='flv,mp4' \ + --enable-protocol='file,pipe' \ + --enable-bsf='h264_mp4toannexb,aac_adtstoasc' \ + --disable-avdevice \ + --disable-swscale \ + --disable-postproc \ + --disable-doc \ + --disable-runtime-cpudetect \ + --disable-network \ + --enable-gpl \ + --enable-version3 \ + --enable-avcodec \ + --enable-avformat \ + --enable-swresample \ + --enable-avfilter \ + --disable-programs \ + --enable-ffmpeg \ + --enable-small \ + --disable-debug \ + ${{ matrix.configure_args }} \ + --pkg-config=pkg-config + " > configure_script.sh + chmod +x ./configure_script.sh + + - name: Install dependencies linux-x64 + if: matrix.target == 'linux-x64' + run: | + sudo apt update + sudo apt install nasm + + - name: Install dependencies windows-x64 + if: matrix.target == 'windows-x64' + run: | + sudo apt update + sudo apt install mingw-w64 nasm + + - name: Build macos-arm64 + if: matrix.target == 'macos-arm64' || matrix.target == 'macos-x64' + run: | + brew install nasm + + - name: Build linux-arm64 + if: matrix.target == 'linux-arm64' + run: | + docker run --rm dockcross/linux-arm64 > ./dockcross-linux-arm64 + chmod +x ./dockcross-linux-arm64 + ./dockcross-linux-arm64 ./configure_script.sh + ./dockcross-linux-arm64 make + + - name: Build general + if: matrix.target != 'linux-arm64' + run: | + ./configure_script.sh + make + + - name: Upload FFmpeg as artifact + uses: actions/upload-artifact@v4 + with: + name: ffmpeg-${{ matrix.target }} + path: ./ffmpeg* + + publish_release: + needs: build + runs-on: ubuntu-latest + steps: + - name: Download FFmpeg artifacts + uses: actions/download-artifact@v4 + with: + pattern: ffmpeg* + merge-multiple: true + path: artifacts + + - name: Create release + env: + GITHUB_TOKEN: ${{ github.token }} + run: | + set -xe + shopt -s nullglob + RELDATE=$(date +'%Y-%m-%d %H:%M:%S') + RELEASE_NAME="FFmpeg $RELDATE" + TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M-%S')" + gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/* + \ No newline at end of file From 06b740723d5f7e539c05ea9e6b73fc41edd6f312 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Sat, 15 Jun 2024 17:24:40 +0900 Subject: [PATCH 2/9] apply hevc patch --- .github/workflows/build.yml | 13 +++++++++++++ libavformat/flv.h | 1 + libavformat/flvdec.c | 4 +++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ee18eddfd10c..18781bc7c5481 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,17 @@ name: Build FFmpeg on: workflow_dispatch: + inputs: + doRelease: + description: 'Publish new release' + type: boolean + default: false + required: false + buildOnly: + description: 'Only build ffmpeg' + type: boolean + default: false + required: false jobs: build: @@ -103,6 +114,8 @@ jobs: path: ./ffmpeg* publish_release: + name: Publish release + if: ${{ !cancelled() && github.event.inputs.doRelease == true && needs.build.result == 'success' }} needs: build runs-on: ubuntu-latest steps: diff --git a/libavformat/flv.h b/libavformat/flv.h index f710963b92042..62297ed54df42 100644 --- a/libavformat/flv.h +++ b/libavformat/flv.h @@ -116,6 +116,7 @@ enum { FLV_CODECID_H264 = 7, FLV_CODECID_REALH263= 8, FLV_CODECID_MPEG4 = 9, + FLV_CODECID_HEVC = 12, }; enum { diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index e25b5bd16307c..f58783fe3f908 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -310,6 +310,7 @@ static int flv_same_video_codec(AVCodecParameters *vpar, uint32_t flv_codecid) switch (flv_codecid) { case MKBETAG('h', 'v', 'c', '1'): + case FLV_CODECID_HEVC: return vpar->codec_id == AV_CODEC_ID_HEVC; case MKBETAG('a', 'v', '0', '1'): return vpar->codec_id == AV_CODEC_ID_AV1; @@ -342,6 +343,7 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, switch (flv_codecid) { case MKBETAG('h', 'v', 'c', '1'): + case FLV_CODECID_HEVC: par->codec_id = AV_CODEC_ID_HEVC; vstreami->need_parsing = AVSTREAM_PARSE_HEADERS; break; @@ -1288,7 +1290,7 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) } if (st->codecpar->codec_id == AV_CODEC_ID_H264 || st->codecpar->codec_id == AV_CODEC_ID_MPEG4 || - (st->codecpar->codec_id == AV_CODEC_ID_HEVC && type == PacketTypeCodedFrames)) { + (st->codecpar->codec_id == AV_CODEC_ID_HEVC && (!enhanced_flv || type == PacketTypeCodedFrames))) { // sign extension int32_t cts = (avio_rb24(s->pb) + 0xff800000) ^ 0xff800000; pts = av_sat_add64(dts, cts); From c8ac6b619f8a79afe73f1d70964fdea5775bdce0 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Sat, 15 Jun 2024 19:12:44 +0000 Subject: [PATCH 3/9] abort program when meeting the second sequence header --- .devcontainer/Dockerfile | 16 ++++++++++++++ .devcontainer/devcontainer.json | 16 ++++++++++++++ .vscode/launch.json | 33 +++++++++++++++++++++++++++++ .vscode/settings.json | 3 +++ .vscode/tasks.json | 16 ++++++++++++++ libavformat/flvdec.c | 10 +++++++++ xlive/.vscode/settings.json | 3 +++ xlive/build.sh | 37 +++++++++++++++++++++++++++++++++ 8 files changed, 134 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100644 xlive/.vscode/settings.json create mode 100644 xlive/build.sh diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000000000..eb25cd01ace7a --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,16 @@ +FROM ubuntu:20.04 + +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive + +# Configure apt and install packages +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ + && apt-get -y install git iproute2 procps lsb-release \ + && apt-get -y install nasm build-essential gdb \ + && apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* + +# Switch back to dialog for any ad-hoc use of apt-get +ENV DEBIAN_FRONTEND=dialog \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..7d9647988c03a --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,16 @@ +{ + "name": "FFmpeg Dev Container", + "dockerFile": "Dockerfile", + "customizations": { + "vscode": { + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + "extensions": [ + "ms-vscode.cpptools-extension-pack", + "foxundermoon.shell-format" + ] + } + }, + "forwardPorts": [] +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000..e12356b8a3ae7 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Debug ffmpeg", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/ffmpeg_g", + "args": [ + "-i", + "xlive/split-test2.flv", + // "xlive/standard.flv", + "-c", + "copy", + "xlive/out4.mp4" + ], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "miDebuggerPath": "/usr/bin/gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "build ffmpeg linux x64 if not exist" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000..8d9c9bc09d215 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": false +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000000000..0a8d26dbd85ad --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,16 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build ffmpeg linux x64 if not exist", + "type": "shell", + "command": [ + "./xlive/build.sh" + ], + "group": { + "kind": "build", + "isDefault": true + } + } + ] +} \ No newline at end of file diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c index f58783fe3f908..7e3e27cbb4eeb 100644 --- a/libavformat/flvdec.c +++ b/libavformat/flvdec.c @@ -1311,6 +1311,16 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt) st->codecpar->codec_id == AV_CODEC_ID_AV1 || st->codecpar->codec_id == AV_CODEC_ID_VP9)) { AVDictionaryEntry *t; + // abort program when meeting the second sequence header + if (stream_type == FLV_STREAM_TYPE_VIDEO) { + static int s_video_header_count = 0; + ++s_video_header_count; + if (s_video_header_count > 1) { + av_log(s, AV_LOG_FATAL, "[xlive]EOF new sps pps\n"); + return -1; + } + } + if (st->codecpar->extradata) { if ((ret = flv_queue_extradata(flv, s->pb, stream_type, size)) < 0) return ret; diff --git a/xlive/.vscode/settings.json b/xlive/.vscode/settings.json new file mode 100644 index 0000000000000..cac0e10e68bd2 --- /dev/null +++ b/xlive/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "editor.formatOnSave": true +} \ No newline at end of file diff --git a/xlive/build.sh b/xlive/build.sh new file mode 100644 index 0000000000000..d467a65b55f5f --- /dev/null +++ b/xlive/build.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +if [ ! -f "./ffmpeg" ]; then + ./configure \ + --disable-everything \ + --disable-autodetect \ + --disable-encoders \ + --disable-decoders \ + --enable-decoder='h264,aac,hevc' \ + --enable-encoder='aac,libx265' \ + --enable-parser='h264,aac,mp3' \ + --enable-demuxer='flv,h264,aac,mp3,live_flv' \ + --enable-muxer='flv,mp4' \ + --enable-protocol='file,pipe' \ + --enable-bsf='h264_mp4toannexb,aac_adtstoasc' \ + --disable-avdevice \ + --disable-swscale \ + --disable-postproc \ + --disable-doc \ + --disable-runtime-cpudetect \ + --disable-network \ + --enable-gpl \ + --enable-version3 \ + --enable-avcodec \ + --enable-avformat \ + --enable-swresample \ + --enable-avfilter \ + --disable-programs \ + --enable-ffmpeg \ + --enable-debug=3 \ + --disable-optimizations \ + --enable-pthreads \ + --pkg-config=pkg-config \ + --disable-stripping + + make -j$(nproc) +fi From a1ad54f3b4cea5d5088b4272dfa88779bfad4d76 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Tue, 18 Jun 2024 23:13:46 +0900 Subject: [PATCH 4/9] update build script --- .github/workflows/build.yml | 43 ++++--------------------- .vscode/tasks.json | 2 +- xlive/{build.sh => configure_script.sh} | 13 ++------ xlive/dev_build.sh | 11 +++++++ 4 files changed, 21 insertions(+), 48 deletions(-) rename xlive/{build.sh => configure_script.sh} (78%) create mode 100644 xlive/dev_build.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18781bc7c5481..50b90e528a82c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,39 +42,8 @@ jobs: - name: Prepare build script run: | - echo " - ./configure \ - --disable-everything \ - --disable-autodetect \ - --disable-encoders \ - --disable-decoders \ - --enable-decoder='h264,aac' \ - --enable-encoder=aac \ - --enable-parser='h264,aac,mp3' \ - --enable-demuxer='flv,h264,aac,mp3,live_flv' \ - --enable-muxer='flv,mp4' \ - --enable-protocol='file,pipe' \ - --enable-bsf='h264_mp4toannexb,aac_adtstoasc' \ - --disable-avdevice \ - --disable-swscale \ - --disable-postproc \ - --disable-doc \ - --disable-runtime-cpudetect \ - --disable-network \ - --enable-gpl \ - --enable-version3 \ - --enable-avcodec \ - --enable-avformat \ - --enable-swresample \ - --enable-avfilter \ - --disable-programs \ - --enable-ffmpeg \ - --enable-small \ - --disable-debug \ - ${{ matrix.configure_args }} \ - --pkg-config=pkg-config - " > configure_script.sh - chmod +x ./configure_script.sh + chmod +x ./xlive/configure_script.sh + echo "CONFIGURE_ARGS=--enable-small --disable-debug ${{ matrix.configure_args }}" >> $GITHUB_ENV - name: Install dependencies linux-x64 if: matrix.target == 'linux-x64' @@ -98,14 +67,14 @@ jobs: run: | docker run --rm dockcross/linux-arm64 > ./dockcross-linux-arm64 chmod +x ./dockcross-linux-arm64 - ./dockcross-linux-arm64 ./configure_script.sh - ./dockcross-linux-arm64 make + ./dockcross-linux-arm64 xlive/configure_script.sh ${{ env.CONFIGURE_ARGS }} + ./dockcross-linux-arm64 make -j$(nproc) - name: Build general if: matrix.target != 'linux-arm64' run: | - ./configure_script.sh - make + xlive/configure_script.sh ${{ env.CONFIGURE_ARGS }} + make -j$(nproc) - name: Upload FFmpeg as artifact uses: actions/upload-artifact@v4 diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 0a8d26dbd85ad..26f1852203567 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -5,7 +5,7 @@ "label": "build ffmpeg linux x64 if not exist", "type": "shell", "command": [ - "./xlive/build.sh" + "./xlive/dev_build.sh" ], "group": { "kind": "build", diff --git a/xlive/build.sh b/xlive/configure_script.sh similarity index 78% rename from xlive/build.sh rename to xlive/configure_script.sh index d467a65b55f5f..af1d6169150d9 100644 --- a/xlive/build.sh +++ b/xlive/configure_script.sh @@ -1,7 +1,6 @@ #!/bin/bash -if [ ! -f "./ffmpeg" ]; then - ./configure \ +./configure \ --disable-everything \ --disable-autodetect \ --disable-encoders \ @@ -27,11 +26,5 @@ if [ ! -f "./ffmpeg" ]; then --enable-avfilter \ --disable-programs \ --enable-ffmpeg \ - --enable-debug=3 \ - --disable-optimizations \ - --enable-pthreads \ - --pkg-config=pkg-config \ - --disable-stripping - - make -j$(nproc) -fi + "$@" \ + --pkg-config=pkg-config \ No newline at end of file diff --git a/xlive/dev_build.sh b/xlive/dev_build.sh new file mode 100644 index 0000000000000..ce25e1bf5aa8d --- /dev/null +++ b/xlive/dev_build.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ ! -f "./ffmpeg" ]; then + ./configure_script.sh \ + --enable-debug=3 \ + --disable-optimizations \ + --enable-pthreads \ + --disable-stripping +fi + +make -j$(nproc) \ No newline at end of file From 5e9d3fcc0ec22ec25c5ed43abe7d999b635046fe Mon Sep 17 00:00:00 2001 From: kira1928 Date: Tue, 18 Jun 2024 23:33:17 +0900 Subject: [PATCH 5/9] fix publish release condition --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 50b90e528a82c..9fc7285474da8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -84,7 +84,7 @@ jobs: publish_release: name: Publish release - if: ${{ !cancelled() && github.event.inputs.doRelease == true && needs.build.result == 'success' }} + if: ${{ !cancelled() && github.event.inputs.doRelease == 'true' && needs.build.result == 'success' }} needs: build runs-on: ubuntu-latest steps: From bf5a689e085af820784a1dd15763bb7f512bc275 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Tue, 18 Jun 2024 23:53:44 +0900 Subject: [PATCH 6/9] fix publish script --- .github/workflows/build.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9fc7285474da8..cb9ada06c77c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -80,7 +80,10 @@ jobs: uses: actions/upload-artifact@v4 with: name: ffmpeg-${{ matrix.target }} - path: ./ffmpeg* + path: | + ./ffmpeg + ./ffmpeg.exe + if-no-files-found: error publish_release: name: Publish release @@ -88,13 +91,22 @@ jobs: needs: build runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Download FFmpeg artifacts uses: actions/download-artifact@v4 with: pattern: ffmpeg* - merge-multiple: true + merge-multiple: false path: artifacts + - name: Zip artifacts + run: | + for dir in artifacts/*; do + zip -j -r "${dir##*/}.zip" "$dir" + done + - name: Create release env: GITHUB_TOKEN: ${{ github.token }} @@ -104,5 +116,5 @@ jobs: RELDATE=$(date +'%Y-%m-%d %H:%M:%S') RELEASE_NAME="FFmpeg $RELDATE" TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M-%S')" - gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/* + gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/*.zip \ No newline at end of file From 17c738e642595c7b1d0f8907ad0e528ddd727750 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Tue, 18 Jun 2024 15:48:09 +0000 Subject: [PATCH 7/9] fix publish script and devcontainer --- .devcontainer/devcontainer.json | 6 +++++- .github/workflows/build.yml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7d9647988c03a..7db5429ce043e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -12,5 +12,9 @@ ] } }, - "forwardPorts": [] + "forwardPorts": [], + "mounts": [ + "source=${localEnv:USERPROFILE}/.ssh,target=/root/.ssh,type=bind,consistency=cached" + ], + "postCreateCommand": "chmod 600 /root/.ssh/*" } \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cb9ada06c77c9..6e9be57db20c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -104,7 +104,7 @@ jobs: - name: Zip artifacts run: | for dir in artifacts/*; do - zip -j -r "${dir##*/}.zip" "$dir" + zip -j -r "artifacts/${dir##*/}.zip" "$dir" done - name: Create release From 1f521326c1f8a71e397b8f3a1aac13b42d253d44 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Wed, 19 Jun 2024 07:55:48 +0000 Subject: [PATCH 8/9] enable network --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 3 ++- xlive/.gitignore | 3 +++ xlive/configure_script.sh | 6 +++--- xlive/dev_build.sh | 28 +++++++++++++++++++++------- 5 files changed, 30 insertions(+), 12 deletions(-) create mode 100644 xlive/.gitignore diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index eb25cd01ace7a..33bee73a0406d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -7,7 +7,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ && apt-get -y install git iproute2 procps lsb-release \ - && apt-get -y install nasm build-essential gdb \ + && apt-get -y install libx265-dev mingw-w64 nasm build-essential gdb \ && apt-get autoremove -y \ && apt-get clean -y \ && rm -rf /var/lib/apt/lists/* diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7db5429ce043e..4a2405b5f9d8e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,7 +8,8 @@ }, "extensions": [ "ms-vscode.cpptools-extension-pack", - "foxundermoon.shell-format" + "foxundermoon.shell-format", + "github.vscode-github-actions" ] } }, diff --git a/xlive/.gitignore b/xlive/.gitignore new file mode 100644 index 0000000000000..763e431195bc7 --- /dev/null +++ b/xlive/.gitignore @@ -0,0 +1,3 @@ +*.flv +*.mp4 +*.dat \ No newline at end of file diff --git a/xlive/configure_script.sh b/xlive/configure_script.sh index af1d6169150d9..1a4111c458682 100644 --- a/xlive/configure_script.sh +++ b/xlive/configure_script.sh @@ -6,18 +6,18 @@ --disable-encoders \ --disable-decoders \ --enable-decoder='h264,aac,hevc' \ - --enable-encoder='aac,libx265' \ + --enable-encoder='aac' \ --enable-parser='h264,aac,mp3' \ --enable-demuxer='flv,h264,aac,mp3,live_flv' \ --enable-muxer='flv,mp4' \ - --enable-protocol='file,pipe' \ + --enable-protocol='file,pipe,http' \ --enable-bsf='h264_mp4toannexb,aac_adtstoasc' \ --disable-avdevice \ --disable-swscale \ --disable-postproc \ --disable-doc \ --disable-runtime-cpudetect \ - --disable-network \ + --enable-network \ --enable-gpl \ --enable-version3 \ --enable-avcodec \ diff --git a/xlive/dev_build.sh b/xlive/dev_build.sh index ce25e1bf5aa8d..f01d98421161c 100644 --- a/xlive/dev_build.sh +++ b/xlive/dev_build.sh @@ -1,11 +1,25 @@ #!/bin/bash - -if [ ! -f "./ffmpeg" ]; then - ./configure_script.sh \ - --enable-debug=3 \ - --disable-optimizations \ - --enable-pthreads \ - --disable-stripping +set -x +SCRIPT_DIR=$(dirname "$0") +if [ "$1" = "windows" ]; then + if [ ! -f "./ffmpeg.exe" ]; then + $SCRIPT_DIR/configure_script.sh \ + --target-os=mingw32 \ + --arch=x86_64 \ + --cross-prefix=x86_64-w64-mingw32- \ + --enable-debug=3 \ + --disable-optimizations \ + --enable-w32threads \ + --disable-stripping + fi +else + if [ ! -f "./ffmpeg" ]; then + $SCRIPT_DIR/configure_script.sh \ + --enable-debug=3 \ + --disable-optimizations \ + --enable-pthreads \ + --disable-stripping + fi fi make -j$(nproc) \ No newline at end of file From c3c9f3eb2a4a3bcb3c12093bfe4be527aae88d46 Mon Sep 17 00:00:00 2001 From: kira1928 Date: Wed, 19 Jun 2024 08:05:24 +0000 Subject: [PATCH 9/9] using current branch in release tag --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6e9be57db20c3..5e5267ea3e9c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -116,5 +116,5 @@ jobs: RELDATE=$(date +'%Y-%m-%d %H:%M:%S') RELEASE_NAME="FFmpeg $RELDATE" TAGNAME="autobuild-$(date +'%Y-%m-%d-%H-%M-%S')" - gh release create "$TAGNAME" --target "develop" --title "$RELEASE_NAME" artifacts/*.zip + gh release create "$TAGNAME" --target "${{ github.ref }}" --title "$RELEASE_NAME" artifacts/*.zip \ No newline at end of file