Skip to content

Instantly share code, notes, and snippets.

@wcmatthysen
wcmatthysen / encode_to_h265.sh
Created August 10, 2022 11:24
Re-encode H.264 to H.265 video
ffmpeg -hwaccel cuda -i input.mp4 -c:v hevc_nvenc -vtag hvc1 -preset slow -c:a copy output.mp4
find . -type f -exec mkvpropedit '{}' --edit track:2 --set name="English" \;
@wcmatthysen
wcmatthysen / mediaCheck.sh
Created January 24, 2023 15:24
Confirm all media in a path can be played back using ffmpeg
#!/bin/bash
# Name: mediaCheck
# Purpose: Confirm all media in a path can be played back using ffmpeg
# Requires:
# * ffmpeg in $PATH
# * date in $PATH
# * find in $PATH
function checkReqs {
# checks requirements for the script
@wcmatthysen
wcmatthysen / compute_etag.sh
Last active June 4, 2024 07:35 — forked from rajivnarayan/compute_etag.sh
Calculate checksum corresponding to the entity-tag hash (ETag) of Amazon S3 objects
#!/bin/bash
#
# Calculate checksum corresponding to the entity-tag hash (ETag) of Amazon S3 objects
#
# Usage: compute_etag.sh <filename> <part_size_mb>
#
# filename: file to process
# part_size_mb: chunk size in MiB used for multipart uploads.
# This is 8M by default for the AWS CLI See:
# https://docs.aws.amazon.com/cli/latest/topic/s3-config.html#multipart_chunksize