Skip to content

Commit

Permalink
feat!: implement new API to also handle multiple transcoding outputs (#8
Browse files Browse the repository at this point in the history
)

* feat!: implement new and better API to also handle multiple transcoding outputs

- Added new, more powerful (though less extensible) DSL to build ffmpeg commands.
- Introduced new concept of long-lived presets and transcoders.
- Removed full output storage during the transcoding process.
- Added built-in presets that can be used out-of-the-box:
  - H.264 360p all the way up to 4K resolution.
  - AAC 128k all the way up to 320k bit rate.
  - DASH H.264 360p all the way up to 4K resolution.
  - DASH AAC 128k all the way up to 320k bit rate.
- Dropped support for Ruby 3.0, Ruby 3.1 is now the minimum supported version.

Refs: ARC-9901

* test: reduce flakyness in transcoder spec

Refs: ARC-9901

* feat(presets): add preset to create simple thumbnails

Refs: ARC-9901

* fix(logging): update logs to include the correct procname

Refs: ARC-9901

* fix(io): allow IO timeout to actually be infinite when set to nil

Refs: ARC-9901

* refactor(command-args): make the min_bit_rate method more readable

Refs: ARC-9901

* refactor(reporters): simplify the match? method of the progress and silence reporters

Refs: ARC-9901

* refactor(scale-filter): introduce constants for magic scale filter dimensions

Refs: ARC-9901
  • Loading branch information
bajankristof authored Nov 29, 2024
1 parent a3404b8 commit cd80633
Show file tree
Hide file tree
Showing 86 changed files with 4,749 additions and 2,105 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/ci.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
ffmpeg-version: ['7.0.2', '6.0.1', '5.1.1', '4.4.1']
ruby-version: ['3.1', '3.2', '3.3']
ffmpeg-version: ['release', '6.0.1', '5.1.1', '4.4.1']

include:
- ffmpeg-version: '7.0.2'
download-path: 'releases'
version-name: 'release'
- ffmpeg-version: 'release'
ffmpeg-download-path: 'releases'

steps:
- uses: actions/checkout@v4
Expand All @@ -32,14 +31,16 @@ jobs:
rubygems: latest

- name: Install FFMPEG
working-directory: /tmp
run: |
sudo apt-get update
sudo apt-get install -y wget
wget https://johnvansickle.com/ffmpeg/${{ matrix.download-path || 'old-releases' }}/ffmpeg-${{ matrix.version-name || matrix.ffmpeg-version }}-amd64-static.tar.xz
tar -xf ffmpeg-${{ matrix.version-name || matrix.ffmpeg-version }}-amd64-static.tar.xz
sudo mv ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static/ffmpeg /usr/local/bin/ffmpeg
sudo mv ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static/ffprobe /usr/local/bin/ffprobe
rm -rf ffmpeg-${{ matrix.version-name || matrix.ffmpeg-version }}-amd64-static.tar.xz ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static
wget -O ffmpeg.tar.xz https://johnvansickle.com/ffmpeg/${{ matrix.ffmpeg-download-path || 'old-releases' }}/ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static.tar.xz
mkdir ffmpeg
tar -xf ffmpeg.tar.xz --strip=1 -C ffmpeg
sudo mv ffmpeg/ffmpeg /usr/local/bin/ffmpeg
sudo mv ffmpeg/ffprobe /usr/local/bin/ffprobe
rm -rf ffmpeg.tar.xz ffmpeg
- name: Run RSpec
run: bundle exec rspec
5 changes: 4 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ inherit_from: .rubocop_todo.yml
AllCops:
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 3.0
TargetRubyVersion: 3.1

Metrics/AbcSize:
Enabled: false
Expand Down Expand Up @@ -38,5 +38,8 @@ Style/ArgumentsForwarding:
Style/FloatDivision:
Enabled: false

Style/RequireOrder:
Enabled: true

Style/SafeNavigationChainLength:
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.6
Loading

0 comments on commit cd80633

Please sign in to comment.