Skip to content

Commit

Permalink
yt-dlp manage name
Browse files Browse the repository at this point in the history
  • Loading branch information
Haldir65 committed May 16, 2024
1 parent 5d4e603 commit 3e8252d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/setup_yt_dlp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
required: true
default: 'foo'
audio_only:
description: 'saudio only'
description: 'audio only'
required: false
default: 'false'
# push:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
yt-dlp -f "ba" ${{ github.event.inputs.video_url }} -o "%(title)s.f%(format_id)s.%(ext)s"
else
echo "video and audio with best format"
yt-dlp -f "bv,ba" ${{ github.event.inputs.video_url }} -o "%(title)s.f%(format_id)s.%(ext)s"
yt-dlp -f best ${{ github.event.inputs.video_url }} -o "%(title)s.f%(format_id)s.%(ext)s"
fi
# - name: convert all video file to av1 format
Expand All @@ -76,10 +76,18 @@ jobs:
tree -L 2
ls -al
- name: figure out video name
shell: bash
id: video-name
run: |
cd dist
find . -type f \( -name "*.mp4" -o -name "*.mkv" -o -name "*.webm" -o -name "*.m4a" \) -exec basename {} \;
# echo "vname=${find . -type f \( -name "*.mp4" -o -name "*.mkv" -o -name "*.webm" -o -name "*.m4a" \) -exec basename {} \;}" >> $GITHUB_OUTPUT
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: video_assets
name: video-assets-${{ github.run_id }}
path: dist
if-no-files-found: error
retention-days: 1
Expand Down

0 comments on commit 3e8252d

Please sign in to comment.