-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10441 from marmelab/ci-videos-format-check
Add a check for videos format in CI
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
for file in ./docs/img/**; do | ||
codec=$(mediainfo --Inform="Video;%CodecID%" "$file") | ||
if [ "$codec" = "hvc1" ]; then | ||
# Construct the output file name | ||
output_file="${file%.*}_avc1.${file##*.}" | ||
echo "Invalid codec for $file" | ||
echo "Convert it to avc1 with:" | ||
echo "ffmpeg -i $file -c:v libx264 -c:a copy ${output_file}" | ||
echo "rm $file" | ||
echo "mv $output_file $file" | ||
exit 1; | ||
fi | ||
done |