Skip to content

Commit

Permalink
Fix output
Browse files Browse the repository at this point in the history
  • Loading branch information
djhi committed Jan 10, 2025
1 parent 64c306b commit 3727b59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/check-documentation-videos-format.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
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 ${file%.*}_avc1.${file##*.}"
echo "ffmpeg -i $file -c:v libx264 -c:a copy ${output_file}"
echo "rm $file"
echo "mv $output_file $file"
exit 1;
Expand Down

0 comments on commit 3727b59

Please sign in to comment.