Skip to content

Commit 3727b59

Browse files
committed
Fix output
1 parent 64c306b commit 3727b59

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/check-documentation-videos-format.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
for file in ./docs/img/**; do
22
codec=$(mediainfo --Inform="Video;%CodecID%" "$file")
33
if [ "$codec" = "hvc1" ]; then
4+
# Construct the output file name
5+
output_file="${file%.*}_avc1.${file##*.}"
46
echo "Invalid codec for $file"
57
echo "Convert it to avc1 with:"
6-
echo "ffmpeg -i $file -c:v libx264 -c:a copy ${file%.*}_avc1.${file##*.}"
8+
echo "ffmpeg -i $file -c:v libx264 -c:a copy ${output_file}"
79
echo "rm $file"
810
echo "mv $output_file $file"
911
exit 1;

0 commit comments

Comments
 (0)