Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Fix video playback on Firefox #10152

Merged
merged 1 commit into from
Aug 19, 2024
Merged

[Doc] Fix video playback on Firefox #10152

merged 1 commit into from
Aug 19, 2024

Conversation

ThieryMichel
Copy link
Contributor

@ThieryMichel ThieryMichel commented Aug 19, 2024

Problem

Some mp4 Videos were broken in the documentation because they used the h265 codec instead of h264

Solution

Used mediainfo to detect the video with the bad codec, and ffmpeg to reencode all h265 videos to h264.

The PR used the following script:

for file in ./*; 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"
  fi
done

How To Test

make docker-doc

The updated video files can now be read by Firefox and vscode.

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
    unneeded, this only impact the documentation
  • The PR includes one or several stories (if not possible, describe why)
    unneeded, this only impact the documentation
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@fzaninotto fzaninotto changed the title convert all h265 videos to h264 [Doc] Fix video playback on Firefox Aug 19, 2024
@fzaninotto fzaninotto merged commit 5ab7e24 into master Aug 19, 2024
14 checks passed
@fzaninotto fzaninotto deleted the fix_videos_codec branch August 19, 2024 16:14
@fzaninotto fzaninotto added this to the 5.1.3 milestone Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants