diff --git a/scripts/check-documentation-videos-format.sh b/scripts/check-documentation-videos-format.sh index bdbb558d70..6dd92506a8 100755 --- a/scripts/check-documentation-videos-format.sh +++ b/scripts/check-documentation-videos-format.sh @@ -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 \ No newline at end of file