Skip to content

Commit

Permalink
Only output the warning
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Jan 10, 2025
1 parent bf016d7 commit 446a42d
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions scripts/check-documentation-videos-format.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
for file in ./docs/img/*; do
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##*.}"
# Convert the file to avc1 (H.264)
ffmpeg -i "$file" -c:v libx264 -c:a copy "$output_file"
rm $file
mv $output_file $file
echo "Fixed codec for $file"
echo "Invalid codec for $file"
echo "Convert it to avc1 with:"
echo "ffmpeg -i $file -c:v libx264 -c:a copy ${file%.*}_avc1.${file##*.}"
echo "rm $file"
echo "mv $output_file $file"
fi
done

0 comments on commit 446a42d

Please sign in to comment.